From 8bdbb718c87d3924d830791636d8133f74ad6a3b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sat, 16 Sep 2017 13:25:53 +0200 Subject: [PATCH 001/143] Add inputValueChanged and modelValueChanged methods to PropertyView --- .../view/PropertyCompositeView.js | 7 ++---- src/style_manager/view/PropertyIntegerView.js | 5 ++-- src/style_manager/view/PropertyStackView.js | 13 ++++------ src/style_manager/view/PropertyView.js | 25 ++++++++++--------- test/specs/style_manager/view/PropertyView.js | 4 +-- 5 files changed, 25 insertions(+), 29 deletions(-) diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index 6ab619aa15..9f008c3176 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -20,12 +20,9 @@ module.exports = PropertyView.extend({ this.className = this.className + ' '+ this.pfx +'composite'; }, - /** - * Fired when the input value is updated - */ - valueUpdated(...args) { + inputValueChanged(...args) { if(!this.model.get('detached')) - PropertyView.prototype.valueUpdated.apply(this, args); + PropertyView.prototype.inputValueChanged.apply(this, args); }, /** diff --git a/src/style_manager/view/PropertyIntegerView.js b/src/style_manager/view/PropertyIntegerView.js index d0adbe56ce..3008415cf0 100644 --- a/src/style_manager/view/PropertyIntegerView.js +++ b/src/style_manager/view/PropertyIntegerView.js @@ -5,8 +5,9 @@ module.exports = PropertyView.extend({ initialize(options) { PropertyView.prototype.initialize.apply(this, arguments); - this.listenTo(this.model, 'change:unit', this.valueChanged); - this.listenTo(this.model, 'el:change', this.elementUpdated); + const model = this.model; + this.listenTo(model, 'change:unit', this.modelValueChanged); + this.listenTo(model, 'el:change', this.elementUpdated); }, renderInput() { diff --git a/src/style_manager/view/PropertyStackView.js b/src/style_manager/view/PropertyStackView.js index 964a0b6516..281cef5fd0 100644 --- a/src/style_manager/view/PropertyStackView.js +++ b/src/style_manager/view/PropertyStackView.js @@ -25,7 +25,7 @@ module.exports = PropertyCompositeView.extend({ this.className = `${pfx}property ${pfx}stack`; this.events[`click #${pfx}add`] = 'addLayer'; this.listenTo(model, 'change:stackIndex', this.indexChanged); - this.listenTo(model, 'updateValue', this.valueUpdated); + this.listenTo(model, 'updateValue', this.inputValueChanged); this.delegateEvents(); }, @@ -176,19 +176,16 @@ module.exports = PropertyCompositeView.extend({ const index = layers.indexOf(layer); layer.set('value', this.model.getDefaultValue(1)); - // In detached mode valueUpdated will add new 'layer value' + // In detached mode inputValueChanged will add new 'layer value' // to all subprops - this.valueUpdated(); + this.inputValueChanged(); // This will set subprops with a new default values this.model.set('stackIndex', index); } }, - /** - * Fired when the input value is updated - */ - valueUpdated() { + inputValueChanged() { var model = this.model; if (!model.get('detached')) { @@ -311,7 +308,7 @@ module.exports = PropertyCompositeView.extend({ // Avoid updating with detached as it will cause issues on next change if (!detached) { - this.valueUpdated(); + this.inputValueChanged(); } this.model.set({stackIndex: null}, {silent: true}); diff --git a/src/style_manager/view/PropertyView.js b/src/style_manager/view/PropertyView.js index ce433afea6..64b55854a0 100644 --- a/src/style_manager/view/PropertyView.js +++ b/src/style_manager/view/PropertyView.js @@ -14,7 +14,7 @@ module.exports = Backbone.View.extend({ - ${this.templateField()} + ${this.templateField(model)} `; }, @@ -30,7 +30,7 @@ module.exports = Backbone.View.extend({ }, events: { - 'change': 'valueUpdated' + 'change': 'inputValueChanged' }, initialize(o) { @@ -57,7 +57,7 @@ module.exports = Backbone.View.extend({ this.listenTo(this.propTarget, 'update', this.targetUpdated); this.listenTo(model, 'destroy remove', this.remove); - this.listenTo(model, 'change:value', this.valueChanged); + this.listenTo(model, 'change:value', this.modelValueChanged); this.listenTo(model, 'targetUpdated', this.targetUpdated); this.listenTo(model, 'change:visible', this.updateVisibility); this.listenTo(model, 'change:status', this.updateStatus); @@ -134,9 +134,10 @@ module.exports = Backbone.View.extend({ }, /** - * Fired when the input value is updated + * Triggers when the value of element input/s is changed, so have to update + * the value of the model which will propogate those changes to the target */ - valueUpdated() { + inputValueChanged() { this.model.set('value', this.getInputValue()); this.elementUpdated(); }, @@ -284,13 +285,13 @@ module.exports = Backbone.View.extend({ }, /** - * Triggers when the 'value' of the model changes, so I have to update - * the target model - * @param {Object} e Events - * @param {Mixed} val Value - * @param {Object} opt Options + * Triggers when the `value` of the model changes, so the target and + * the input element should be updated + * @param {Object} e Event + * @param {Mixed} val Value + * @param {Object} opt Options * */ - valueChanged(e, val, opt) { + modelValueChanged(e, val, opt) { const em = this.config.em; const model = this.model; const value = model.getFullValue(); @@ -434,8 +435,8 @@ module.exports = Backbone.View.extend({ render() { const el = this.el; el.innerHTML = this.template(this.model); - this.renderInput(); el.className = this.className; + this.renderInput(); this.updateStatus(); return this; }, diff --git a/test/specs/style_manager/view/PropertyView.js b/test/specs/style_manager/view/PropertyView.js index 9c5f700016..34a1d939a2 100644 --- a/test/specs/style_manager/view/PropertyView.js +++ b/test/specs/style_manager/view/PropertyView.js @@ -69,13 +69,13 @@ module.exports = { expect(view.model.get('value')).toNotExist(); }); - // Tests valueUpdated() + // Tests inputValueChanged() it('Update model on input change', () => { view.$input.val(propValue).trigger('change'); expect(view.model.get('value')).toEqual(propValue); }); - // Tests valueChanged() -> ... + // Tests modelValueChanged() -> ... it('Update input on value change', () => { view.model.set('value', propValue); expect(view.$input.val()).toEqual(propValue); From d153bd809766da22c957c7027a58f7be908c7d52 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 18 Sep 2017 22:45:26 +0200 Subject: [PATCH 002/143] Refactor Style Manager Property views --- index.html | 2 +- src/style_manager/model/PropertyFactory.js | 2 +- src/style_manager/view/PropertiesView.js | 3 +- src/style_manager/view/PropertyColorView.js | 17 ++-- .../view/PropertyCompositeView.js | 13 +-- src/style_manager/view/PropertyFileView.js | 11 +-- src/style_manager/view/PropertyIntegerView.js | 26 +++--- src/style_manager/view/PropertyRadioView.js | 19 ++--- src/style_manager/view/PropertySelectView.js | 17 ++-- src/style_manager/view/PropertyStackView.js | 34 +++----- src/style_manager/view/PropertyView.js | 79 ++++++++----------- 11 files changed, 93 insertions(+), 130 deletions(-) diff --git a/index.html b/index.html index d3640fea47..4f0a536917 100755 --- a/index.html +++ b/index.html @@ -1324,7 +1324,7 @@

Insert title here

var model = view.model; let targetValue = view.getTargetValue({ignoreDefault: 1}); let computedValue = view.getComputedValue(); - let defaultValue = view.getDefaultValue(); + let defaultValue = view.model.getDefaultValue(); //console.log('Style of ', model.get('property'), 'Target: ', targetValue, 'Computed:', computedValue, 'Default:', defaultValue); }); diff --git a/src/style_manager/model/PropertyFactory.js b/src/style_manager/model/PropertyFactory.js index 4e13cdfe19..26e0a4a317 100644 --- a/src/style_manager/model/PropertyFactory.js +++ b/src/style_manager/model/PropertyFactory.js @@ -121,7 +121,7 @@ module.exports = () => ({ obj.defaults = 1; break; case 'box-shadow-blur': - obj.defaults = 5; + obj.defaults = '5px'; break; case 'min-height': case 'min-width': case 'max-height': case 'max-width': case 'width': case 'height': diff --git a/src/style_manager/view/PropertiesView.js b/src/style_manager/view/PropertiesView.js index d717a8a8c7..2686210b13 100644 --- a/src/style_manager/view/PropertiesView.js +++ b/src/style_manager/view/PropertiesView.js @@ -39,7 +39,8 @@ module.exports = Backbone.View.extend({ view.customValue = this.customValue; } - fragment.appendChild(view.render().el); + view.render(); + fragment.appendChild(view.el); }); this.$el.append(fragment); diff --git a/src/style_manager/view/PropertyColorView.js b/src/style_manager/view/PropertyColorView.js index ea8f6414ae..faffe80440 100644 --- a/src/style_manager/view/PropertyColorView.js +++ b/src/style_manager/view/PropertyColorView.js @@ -1,15 +1,17 @@ var Backbone = require('backbone'); -var PropertyView = require('./PropertyView'); var InputColor = require('domain_abstract/ui/InputColor'); -module.exports = PropertyView.extend({ +module.exports = require('./PropertyIntegerView').extend({ - initialize(options) { - PropertyView.prototype.initialize.apply(this, arguments); + init() { this.className += ` ${this.pfx}file`; }, - renderInput() { + setValue(value) { + this.input.setValue(value, {silent: 1}); + }, + + onRender() { if (!this.input) { var inputColor = new InputColor({ target: this.target, @@ -21,11 +23,6 @@ module.exports = PropertyView.extend({ this.$input = this.input.inputEl; this.$color = this.input.colorEl; } - this.setValue(this.componentValue); - }, - - setValue(value) { - this.input.setValue(value, {silent: 1}); }, }); diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index 9f008c3176..3a9244b86a 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -1,22 +1,17 @@ -var Backbone = require('backbone'); -var PropertyView = require('./PropertyView'); +const PropertyView = require('./PropertyView'); module.exports = PropertyView.extend({ - templateField() { + templateInput() { const pfx = this.pfx; - const ppfx = this.ppfx; return `
-
`; }, - initialize(o) { - PropertyView.prototype.initialize.apply(this, arguments); - this.config = o.config || {}; + init() { this.className = this.className + ' '+ this.pfx +'composite'; }, @@ -28,7 +23,7 @@ module.exports = PropertyView.extend({ /** * Renders input * */ - renderInput() { + onRender() { var model = this.model; var props = model.get('properties') || []; var self = this; diff --git a/src/style_manager/view/PropertyFileView.js b/src/style_manager/view/PropertyFileView.js index 6dc570a7bf..ca334ac18d 100644 --- a/src/style_manager/view/PropertyFileView.js +++ b/src/style_manager/view/PropertyFileView.js @@ -3,7 +3,7 @@ var PropertyView = require('./PropertyView'); module.exports = PropertyView.extend({ - templateField() { + templateInput() { const pfx = this.pfx; const ppfx = this.ppfx; const assetsLabel = this.config.assetsLabel || 'Images'; @@ -22,12 +22,10 @@ module.exports = PropertyView.extend({
-
`; }, - initialize(options) { - PropertyView.prototype.initialize.apply(this, arguments); + init() { this.assets = this.target.get('assets'); this.modal = this.target.get('Modal'); this.am = this.target.get('AssetManager'); @@ -37,8 +35,7 @@ module.exports = PropertyView.extend({ this.delegateEvents(); }, - /** @inheritdoc */ - renderInput() { + onRender() { if (!this.$input) { this.$input = $('', {placeholder: this.model.getDefaultValue(), type: 'text' }); } @@ -56,7 +53,7 @@ module.exports = PropertyView.extend({ setValue(value, f) { PropertyView.prototype.setValue.apply(this, arguments); - this.setPreviewView(value && value != this.getDefaultValue()); + this.setPreviewView(value && value != this.model.getDefaultValue()); this.setPreview(value); }, diff --git a/src/style_manager/view/PropertyIntegerView.js b/src/style_manager/view/PropertyIntegerView.js index 3008415cf0..b3b4173122 100644 --- a/src/style_manager/view/PropertyIntegerView.js +++ b/src/style_manager/view/PropertyIntegerView.js @@ -1,16 +1,27 @@ -var PropertyView = require('./PropertyView'); var InputNumber = require('domain_abstract/ui/InputNumber'); -module.exports = PropertyView.extend({ +module.exports = require('./PropertyView').extend({ - initialize(options) { - PropertyView.prototype.initialize.apply(this, arguments); + template(model) { + const pfx = this.pfx; + return ` +
+ ${this.templateLabel(model)} +
+ `; + }, + + init() { const model = this.model; this.listenTo(model, 'change:unit', this.modelValueChanged); this.listenTo(model, 'el:change', this.elementUpdated); }, - renderInput() { + setValue(value) { + this.input.setValue(value, {silent: 1}); + }, + + onRender() { if (!this.input) { var inputNumber = new InputNumber({ model: this.model, @@ -21,11 +32,6 @@ module.exports = PropertyView.extend({ this.$input = this.input.inputEl; this.$unit = this.input.unitEl; } - this.setValue(this.componentValue); - }, - - setValue(value) { - this.input.setValue(value, {silent: 1}); }, }); diff --git a/src/style_manager/view/PropertyRadioView.js b/src/style_manager/view/PropertyRadioView.js index ebc693ede9..651264ec04 100644 --- a/src/style_manager/view/PropertyRadioView.js +++ b/src/style_manager/view/PropertyRadioView.js @@ -1,28 +1,22 @@ -var Backbone = require('backbone'); -var PropertyView = require('./PropertyView'); +module.exports = require('./PropertyView').extend({ -module.exports = PropertyView.extend({ - - templateField() { + templateInput() { const pfx = this.pfx; const ppfx = this.ppfx; return `
-
`; }, - initialize(options) { - PropertyView.prototype.initialize.apply(this, arguments); + init() { const model = this.model; this.list = model.get('list') || model.get('options') || []; this.className = this.className + ' '+ this.pfx +'list'; }, - /** @inheritdoc */ - renderInput() { + onRender() { var pfx = this.pfx; var ppfx = this.ppfx; var itemCls = ppfx + 'radio-item-label'; @@ -60,7 +54,8 @@ module.exports = PropertyView.extend({ /** @inheritdoc */ setValue(value) { - var v = this.model.get('value') || this.model.getDefaultValue(); + const model = this.model; + var v = model.get('value') || model.getDefaultValue(); if(value) v = value; @@ -68,7 +63,7 @@ module.exports = PropertyView.extend({ if(this.$input) this.$input.filter('[value="'+v+'"]').prop('checked', true); - this.model.set({value: v},{silent: true}); + model.set({value: v}, {silent: true}); }, }); diff --git a/src/style_manager/view/PropertySelectView.js b/src/style_manager/view/PropertySelectView.js index c315a1f002..e968d8cd1a 100644 --- a/src/style_manager/view/PropertySelectView.js +++ b/src/style_manager/view/PropertySelectView.js @@ -1,9 +1,6 @@ -var Backbone = require('backbone'); -var PropertyView = require('./PropertyView'); +module.exports = require('./PropertyView').extend({ -module.exports = PropertyView.extend({ - - templateField() { + templateInput() { const pfx = this.pfx; const ppfx = this.ppfx; return ` @@ -13,20 +10,17 @@ module.exports = PropertyView.extend({
-
`; }, - initialize(options) { - PropertyView.prototype.initialize.apply(this, arguments); + init() { const model = this.model; this.list = model.get('list') || model.get('options') || []; }, - /** @inheritdoc */ - renderInput() { + onRender() { var pfx = this.pfx; - if(!this.$input){ + if (!this.$input) { var input = ' -
`; }, @@ -33,7 +36,7 @@ module.exports = Backbone.View.extend({ 'change': 'inputValueChanged' }, - initialize(o) { + initialize(o = {}) { this.config = o.config || {}; this.em = this.config.em; this.pfx = this.config.stylePrefix || ''; @@ -63,8 +66,16 @@ module.exports = Backbone.View.extend({ this.listenTo(model, 'change:status', this.updateStatus); this.events[`click .${pfx}clear`] = 'clear'; this.delegateEvents(); + + const init = this.init && this.init.bind(this); + init && init(); }, + /** + * Triggers when the status changes. The status indicates if the value of + * the proprerty is changed or inherited + * @private + */ updateStatus() { const status = this.model.get('status'); const pfx = this.pfx; @@ -92,7 +103,7 @@ module.exports = Backbone.View.extend({ }, /** - * Clear the property + * Clear the property from the target */ clear() { const target = this.getTargetModel(); @@ -157,14 +168,14 @@ module.exports = Backbone.View.extend({ return; } + const config = this.config; + const em = config.em; + const model = this.model; let value = ''; let status = ''; let targetValue = this.getTargetValue({ignoreDefault: 1}); - let defaultValue = this.getDefaultValue(); + let defaultValue = model.getDefaultValue(); let computedValue = this.getComputedValue(); - const config = this.config; - const em = config.em; - const model = this.model; if (targetValue) { value = targetValue; @@ -240,7 +251,7 @@ module.exports = Backbone.View.extend({ result = model.parseValue(result); if (!result && !opts.ignoreDefault) { - result = this.getDefaultValue(); + result = model.getDefaultValue(); } if (typeof customFetchValue == 'function' && !opts.ignoreCustomValue) { @@ -255,15 +266,6 @@ module.exports = Backbone.View.extend({ return result; }, - /** - * Returns default value - * @return {String} - * @private - */ - getDefaultValue() { - return this.model.getDefaultValue(); - }, - /** * Returns computed value * @return {String} @@ -411,20 +413,6 @@ module.exports = Backbone.View.extend({ this.model.set('visible', 0); }, - /** - * Renders input, to override - * */ - renderInput() { - if(!this.$input){ - this.$input = $('', { - placeholder: this.model.getDefaultValue(), - type: 'text' - }); - this.$el.find(this.inputHolderId).html(this.$input); - } - this.setValue(this.componentValue, 0); - }, - /** * Clean input * */ @@ -436,9 +424,10 @@ module.exports = Backbone.View.extend({ const el = this.el; el.innerHTML = this.template(this.model); el.className = this.className; - this.renderInput(); this.updateStatus(); - return this; + + const onRender = this.onRender && this.onRender.bind(this); + onRender && onRender(); }, }); From 3e240995f9a0d56aa33f8f1a856a2cfe0ebe017f Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 18 Sep 2017 23:11:42 +0200 Subject: [PATCH 003/143] Add the possibility to add custom StyleManager Types --- src/style_manager/index.js | 44 +++++++++++++++++++++++++++ src/style_manager/model/Sectors.js | 5 ++- src/style_manager/view/SectorsView.js | 3 +- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/src/style_manager/index.js b/src/style_manager/index.js index e54f840116..87ec030d93 100644 --- a/src/style_manager/index.js +++ b/src/style_manager/index.js @@ -7,6 +7,9 @@ * * [getProperty](#getproperty) * * [getProperties](#getproperties) * * [getModelToStyle](#getmodeltostyle) + * * [addType](#addtype) + * * [getType](#gettype) + * * [getTypes](#gettypes) * * [render](#render) * * With Style Manager you basically build categories (called sectors) of CSS properties which could @@ -52,7 +55,9 @@ module.exports = () => { var c = {}, defaults = require('./config/config'), Sectors = require('./model/Sectors'), + Properties = require('./model/Properties'), SectorsView = require('./view/SectorsView'); + let properties; var sectors, SectView; return { @@ -88,6 +93,7 @@ module.exports = () => { if(ppfx) c.stylePrefix = ppfx + c.stylePrefix; + properties = new Properties(); sectors = new Sectors(c.sectors); SectView = new SectorsView({ collection: sectors, @@ -252,6 +258,44 @@ module.exports = () => { return model; }, + /** + * Add new property type + * @param {string} id Type ID + * @param {Object} definition Definition of the type. Each definition contains + * `model` (business logic), `view` (presentation logic) + * and `isType` function which recognize the type of the + * passed entity + * addType('my-type', { + * model: {}, + * view: {}, + * isType: (value) => { + * if (value && value.type == 'my-type') { + * return value; + * } + * }, + * }) + */ + addType(id, definition) { + properties.addType(id, definition); + }, + + /** + * Get type + * @param {string} id Type ID + * @return {Object} Type definition + */ + getType(id) { + return properties.getType(id); + }, + + /** + * Get all types + * @return {Array} + */ + getTypes() { + return properties.getTypes(); + }, + /** * Render sectors and properties * @return {HTMLElement} diff --git a/src/style_manager/model/Sectors.js b/src/style_manager/model/Sectors.js index dbf1b4db60..46f6c0f273 100644 --- a/src/style_manager/model/Sectors.js +++ b/src/style_manager/model/Sectors.js @@ -1,6 +1,5 @@ -var Backbone = require('backbone'); -var Sector = require('./Sector'); +const Sector = require('./Sector'); -module.exports = Backbone.Collection.extend({ +module.exports = require('backbone').Collection.extend({ model: Sector, }); diff --git a/src/style_manager/view/SectorsView.js b/src/style_manager/view/SectorsView.js index f55171371e..fc2a2446e1 100644 --- a/src/style_manager/view/SectorsView.js +++ b/src/style_manager/view/SectorsView.js @@ -117,9 +117,8 @@ module.exports = Backbone.View.extend({ * */ addToCollection(model, fragmentEl) { var fragment = fragmentEl || null; - var viewObject = SectorView; - var view = new viewObject({ + var view = new SectorView({ model, id: this.pfx + model.get('name').replace(' ','_').toLowerCase(), name: model.get('name'), From bbbcb6cc2629be5e2b4f4a5a6be4cdd0b698b2be Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 19 Sep 2017 14:54:47 +0200 Subject: [PATCH 004/143] More updates on Style Properties refactoring --- index.html | 2 +- .../view/PropertyCompositeView.js | 12 +++++-- src/style_manager/view/PropertyRadioView.js | 22 ++++--------- src/style_manager/view/PropertySelectView.js | 26 +++++++-------- src/style_manager/view/PropertyView.js | 32 +++++++++++++++---- 5 files changed, 56 insertions(+), 38 deletions(-) diff --git a/index.html b/index.html index 4f0a536917..394f872680 100755 --- a/index.html +++ b/index.html @@ -1320,7 +1320,7 @@

Insert title here

console.log('STORE ', e); }) - editor.on('styleManager:change:text-shadow', function(view) { + editor.on('styleManager:change:border-width', function(view) { var model = view.model; let targetValue = view.getTargetValue({ignoreDefault: 1}); let computedValue = view.getComputedValue(); diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index 3a9244b86a..9201bd4381 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -29,8 +29,10 @@ module.exports = PropertyView.extend({ var self = this; if (props.length) { - if(!this.$input) + if (!this.$input) { this.$input = $('', {value: 0, type: 'hidden' }); + this.input = this.$input.get(0); + } if (!this.props) { this.props = model.get('properties'); @@ -102,9 +104,13 @@ module.exports = PropertyView.extend({ // to get the value of the sub-property if (targetValue) { const values = targetValue.split(' '); - value = view ? view.model.parseValue(values[index]) : values[index]; + value = values[index]; } else { - value = view.getTargetValue({ignoreCustomValue: 1}); + value = view && view.getTargetValue({ignoreCustomValue: 1, ignoreDefault: 1}); + } + + if (view) { + value = view.model.parseValue(value); } return value; diff --git a/src/style_manager/view/PropertyRadioView.js b/src/style_manager/view/PropertyRadioView.js index 651264ec04..1a6eaba304 100644 --- a/src/style_manager/view/PropertyRadioView.js +++ b/src/style_manager/view/PropertyRadioView.js @@ -24,46 +24,38 @@ module.exports = require('./PropertyView').extend({ if(!this.$input) { if(this.list && this.list.length) { - var input = ''; + let inputStr = ''; _.each(this.list, el => { var cl = el.className ? el.className + ' ' + pfx + 'icon ' + itemCls : '', id = prop + '-' + el.value, labelTxt = el.name ? el.name : el.value; var titleAttr = el.title ? 'title="' + el.title + '"': ''; - input += '
'+ + inputStr += '
'+ ''+ '
'; }); - this.input = input; - this.$inputEl = $(this.input); + this.$inputEl = $(inputStr); + this.input = this.$inputEl.get(0); this.$el.find('#'+ pfx +'input-holder').html(this.$inputEl); this.$input = this.$inputEl.find('input[name="'+this.property+'"]'); } } - - this.setValue(this.componentValue); }, - /** - * Returns value from input - * @return {string} - */ getInputValue() { return this.$input ? this.$el.find('input:checked').val() : ''; }, - /** @inheritdoc */ setValue(value) { const model = this.model; var v = model.get('value') || model.getDefaultValue(); - if(value) + if (value) { v = value; + } if(this.$input) - this.$input.filter('[value="'+v+'"]').prop('checked', true); - - model.set({value: v}, {silent: true}); + this.$input.filter(`[value="${v}"]`).prop('checked', true); }, }); diff --git a/src/style_manager/view/PropertySelectView.js b/src/style_manager/view/PropertySelectView.js index e968d8cd1a..2af82c28f5 100644 --- a/src/style_manager/view/PropertySelectView.js +++ b/src/style_manager/view/PropertySelectView.js @@ -20,22 +20,22 @@ module.exports = require('./PropertyView').extend({ onRender() { var pfx = this.pfx; + const options = this.list; + if (!this.$input) { - var input = ''; - this.input = input; - this.$input = $(this.input); - this.$el.find('#'+ pfx +'input-holder').html(this.$input); + this.$input = $(``); + this.input = this.$input.get(0); + this.$el.find(`#${pfx}input-holder`).html(this.$input); } }, diff --git a/src/style_manager/view/PropertyView.js b/src/style_manager/view/PropertyView.js index 54cec42ede..fcdc030f46 100644 --- a/src/style_manager/view/PropertyView.js +++ b/src/style_manager/view/PropertyView.js @@ -121,11 +121,10 @@ module.exports = Backbone.View.extend({ /** * Returns selected target which should have 'style' property - * @deprecated * @return {Model|null} */ getTarget() { - return this.propTarget && this.propTarget.model; + return this.getTargetModel(); }, /** @@ -283,7 +282,8 @@ module.exports = Backbone.View.extend({ * @return {string} */ getInputValue() { - return this.$input ? this.$input.val() : ''; + const input = this.getInputEl(); + return input ? input.value : ''; }, /** @@ -299,7 +299,7 @@ module.exports = Backbone.View.extend({ const value = model.getFullValue(); const target = this.getTarget(); const onChange = this.onChange; - this.setValue(value); + this.setRawValue(value); // Check if component is allowed to be styled if (!target || !this.isTargetStylable() || !this.isComponentStylable()) { @@ -380,6 +380,18 @@ module.exports = Backbone.View.extend({ return stylable; }, + /** + * Passed a raw value you have to update the input element, generally + * is the value fetched from targets, so you can receive values with + * functions, units, etc. (eg. `rotateY(45deg)`) + * get also + * @param {string} value + * @private + */ + setRawValue(value) { + this.setValue(this.model.parseValue(value)); + }, + /** * Set the value to property input * @param {String} value @@ -396,8 +408,16 @@ module.exports = Backbone.View.extend({ v = value; } - const input = this.$input; - input && input.val(v); + const input = this.getInputEl(); + input && (input.value = v); + }, + + getInputEl() { + if (!this.input) { + this.input = this.el.querySelector('input'); + } + + return this.input; }, updateVisibility() { From 890355764cd7fc85d69bfe585ca885ce9cd3a93d Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 19 Sep 2017 21:56:23 +0200 Subject: [PATCH 005/143] Add `step` option for integer inputs in StyleManager --- src/domain_abstract/ui/InputNumber.js | 55 ++++++++++++++++------ src/style_manager/model/PropertyInteger.js | 9 ++++ 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/src/domain_abstract/ui/InputNumber.js b/src/domain_abstract/ui/InputNumber.js index 14281e33bf..a14aa86191 100644 --- a/src/domain_abstract/ui/InputNumber.js +++ b/src/domain_abstract/ui/InputNumber.js @@ -135,10 +135,13 @@ module.exports = Backbone.View.extend({ * Invoked when the up arrow is clicked * */ upArrowClick() { - var value = this.model.get('value'); - value = isNaN(value) ? 1 : parseInt(value, 10) + 1; + const model = this.model; + const step = model.get('step'); + let value = model.get('value'); + //value = isNaN(value) ? 1 * step : parseFloat(value); + value = this.normalizeValue(value + step); var valid = this.validateInputValue(value); - this.model.set('value', valid.value); + model.set('value', valid.value); this.elementUpdated(); }, @@ -146,10 +149,12 @@ module.exports = Backbone.View.extend({ * Invoked when the down arrow is clicked * */ downArrowClick() { - var value = this.model.get('value'); - value = isNaN(value) ? 0 : parseInt(value, 10) - 1; + const model = this.model; + const step = model.get('step'); + let value = model.get('value'); + value = this.normalizeValue(value - step); var valid = this.validateInputValue(value); - this.model.set('value', valid.value); + model.set('value', valid.value); this.elementUpdated(); }, @@ -163,8 +168,8 @@ module.exports = Backbone.View.extend({ e.preventDefault(); this.moved = 0; var value = this.model.get('value'); - value = isNaN(value) ? 0 : parseInt(value, 10); - var current = {y: e.pageY, val: value }; + value = this.normalizeValue(value); + var current = {y: e.pageY, val: value}; this.docEl.mouseup(current, this.upIncrement); this.docEl.mousemove(current, this.moveIncrement); }, @@ -176,9 +181,11 @@ module.exports = Backbone.View.extend({ * */ moveIncrement(ev) { this.moved = 1; - var pos = parseInt(ev.data.val - ev.pageY + ev.data.y, 10); - this.prValue = this.validateInputValue(pos).value;//Math.max(this.min, Math.min(this.max, pos) ); - this.model.set('value', this.prValue, {avoidStore: 1}); + const model = this.model; + const step = model.get('step'); + var pos = this.normalizeValue(ev.data.val + (ev.data.y - ev.pageY) * step); + this.prValue = this.validateInputValue(pos).value; + model.set('value', this.prValue, {avoidStore: 1}); return false; }, @@ -189,17 +196,37 @@ module.exports = Backbone.View.extend({ * @return void * */ upIncrement(e) { + const model = this.model; + const step = model.get('step'); this.docEl.off('mouseup', this.upIncrement); this.docEl.off('mousemove', this.moveIncrement); if(this.prValue && this.moved) { - var value = this.prValue - 1; - this.model.set('value', value, {avoidStore: 1}) - .set('value', value + 1); + var value = this.prValue - step; + model.set('value', value, {avoidStore: 1}) + .set('value', value + step); this.elementUpdated(); } }, + normalizeValue(value, defValue = 0) { + const model = this.model; + const step = model.get('step'); + let stepDecimals = 0; + + if (isNaN(value)) { + return defValue; + } + + value = parseFloat(value); + + if (Math.floor(value) !== value) { + stepDecimals = step.toString().split('.')[1].length || 0; + } + + return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value; + }, + /** * Validate input value * @param {String} value Raw value diff --git a/src/style_manager/model/PropertyInteger.js b/src/style_manager/model/PropertyInteger.js index ee8a9b95c6..8383b5fee1 100644 --- a/src/style_manager/model/PropertyInteger.js +++ b/src/style_manager/model/PropertyInteger.js @@ -8,6 +8,15 @@ module.exports = Property.extend({ // Selected unit, eg. 'px' unit: '', + + // Integer value steps + step: 1, + + // Minimum value + min: '', + + // Maximum value + max: '', }), getFullValue() { From aee15b97e050e5bfb5527ea6633da3de5fdff261 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 19 Sep 2017 22:46:07 +0200 Subject: [PATCH 006/143] Fix regressions --- src/style_manager/model/PropertyInteger.js | 9 ++++++ src/style_manager/view/PropertyColorView.js | 14 +++++---- src/style_manager/view/PropertyIntegerView.js | 14 +++++---- src/style_manager/view/PropertyStackView.js | 2 +- test/specs/style_manager/model/Models.js | 2 +- .../style_manager/view/PropertyColorView.js | 18 +++++++----- .../view/PropertyCompositeView.js | 14 +++++---- .../style_manager/view/PropertyIntegerView.js | 20 +++++++------ .../style_manager/view/PropertyRadioView.js | 12 ++++---- .../style_manager/view/PropertySelectView.js | 28 +++++++++++------- .../style_manager/view/PropertyStackView.js | 12 +++++--- test/specs/style_manager/view/PropertyView.js | 29 +++++++++++-------- 12 files changed, 106 insertions(+), 68 deletions(-) diff --git a/src/style_manager/model/PropertyInteger.js b/src/style_manager/model/PropertyInteger.js index 8383b5fee1..2c52e55628 100644 --- a/src/style_manager/model/PropertyInteger.js +++ b/src/style_manager/model/PropertyInteger.js @@ -19,6 +19,15 @@ module.exports = Property.extend({ max: '', }), + init() { + const unit = this.get('unit'); + const units = this.get('units'); + + if (units.length && !unit) { + this.set('unit', units[0]); + } + }, + getFullValue() { let value = this.get('value') + this.get('unit'); return Property.prototype.getFullValue.apply(this, [value]); diff --git a/src/style_manager/view/PropertyColorView.js b/src/style_manager/view/PropertyColorView.js index faffe80440..7fef6004bd 100644 --- a/src/style_manager/view/PropertyColorView.js +++ b/src/style_manager/view/PropertyColorView.js @@ -8,20 +8,22 @@ module.exports = require('./PropertyIntegerView').extend({ }, setValue(value) { - this.input.setValue(value, {silent: 1}); + this.inputInst.setValue(value, {silent: 1}); }, onRender() { if (!this.input) { - var inputColor = new InputColor({ + const inputColor = new InputColor({ target: this.target, model: this.model, ppfx: this.ppfx }); - this.input = inputColor.render(); - this.$el.append(this.input.$el); - this.$input = this.input.inputEl; - this.$color = this.input.colorEl; + const input = inputColor.render(); + this.$el.append(input.$el); + this.$input = input.inputEl; + this.$color = input.colorEl; + this.input = this.$input.get(0); + this.inputInst = input; } }, diff --git a/src/style_manager/view/PropertyIntegerView.js b/src/style_manager/view/PropertyIntegerView.js index b3b4173122..d8b4a41b01 100644 --- a/src/style_manager/view/PropertyIntegerView.js +++ b/src/style_manager/view/PropertyIntegerView.js @@ -18,19 +18,21 @@ module.exports = require('./PropertyView').extend({ }, setValue(value) { - this.input.setValue(value, {silent: 1}); + this.inputInst.setValue(value, {silent: 1}); }, onRender() { if (!this.input) { - var inputNumber = new InputNumber({ + const inputNumber = new InputNumber({ model: this.model, ppfx: this.ppfx }); - this.input = inputNumber.render(); - this.$el.append(this.input.$el); - this.$input = this.input.inputEl; - this.$unit = this.input.unitEl; + const input = inputNumber.render(); + this.$el.append(input.$el); + this.$input = input.inputEl; + this.$unit = input.unitEl; + this.input = this.$input.get(0); + this.inputInst = input; } }, diff --git a/src/style_manager/view/PropertyStackView.js b/src/style_manager/view/PropertyStackView.js index b469d60c2b..fcdbd3f70a 100644 --- a/src/style_manager/view/PropertyStackView.js +++ b/src/style_manager/view/PropertyStackView.js @@ -114,7 +114,7 @@ module.exports = PropertyCompositeView.extend({ valueOnIndex(index, propView) { let result; const model = this.model; - const propModel = propView.model; + const propModel = propView && propView.model; const layerIndex = model.get('stackIndex'); // If detached the value in this case is stacked, eg. substack-prop: 1px, 2px, 3px... diff --git a/test/specs/style_manager/model/Models.js b/test/specs/style_manager/model/Models.js index 766d77551d..ecf71d0e16 100644 --- a/test/specs/style_manager/model/Models.js +++ b/test/specs/style_manager/model/Models.js @@ -646,7 +646,7 @@ module.exports = { property: 'box-shadow-blur', type: 'integer', units: ['px'], - defaults: 5, + defaults: '5px', min: 0, },{ property: 'box-shadow-spread', diff --git a/test/specs/style_manager/view/PropertyColorView.js b/test/specs/style_manager/view/PropertyColorView.js index 8d441ebf35..ffaff1d02d 100644 --- a/test/specs/style_manager/view/PropertyColorView.js +++ b/test/specs/style_manager/view/PropertyColorView.js @@ -38,7 +38,8 @@ module.exports = { propTarget }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); afterEach(() => { @@ -72,13 +73,12 @@ module.exports = { it('Input value is empty', () => { expect(view.model.get('value')).toNotExist(); - expect(view.$input.val()).toNotExist(); + expect(view.getInputValue()).toNotExist(); }); it('Update model on setValue', () => { view.setValue(propValue); - expect(view.model.get('value')).toEqual(propValue); - expect(view.$input.val()).toEqual(propValue); + expect(view.getInputValue()).toEqual(propValue); }); it('Update model on input change', () => { @@ -109,7 +109,8 @@ module.exports = { propTarget: target }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('Update value and input on target swap', () => { @@ -148,15 +149,16 @@ module.exports = { model }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('Value as default', () => { expect(view.model.get('value')).toEqual(propValue); }); - it('Input value is as default', () => { - expect(view.$input.val()).toEqual(propValue); + it('Input value is empty', () => { + expect(view.getInputValue()).toEqual(''); }); }); diff --git a/test/specs/style_manager/view/PropertyCompositeView.js b/test/specs/style_manager/view/PropertyCompositeView.js index 8c41c3842e..57b7724460 100644 --- a/test/specs/style_manager/view/PropertyCompositeView.js +++ b/test/specs/style_manager/view/PropertyCompositeView.js @@ -53,7 +53,8 @@ module.exports = { model }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); afterEach(() => { @@ -98,7 +99,7 @@ module.exports = { it('Update input on value change', () => { view.model.set('value', propValue); // Fetch always values from properties - expect(view.$input.val()).toEqual('0% val2'); + expect(view.getInputValue()).toEqual('0% val2'); }); describe('With target setted', () => { @@ -122,7 +123,8 @@ module.exports = { propTarget: target }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); prop2Val = properties[1].defaults; prop2Unit = properties[1].units[0]; prop3Val = properties[2].list[2].value; @@ -163,7 +165,8 @@ module.exports = { model, propTarget: target }); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); $prop1 = view.$props.find('#' + properties[0].property + ' input'); $prop1.val(propValue).trigger('change'); var compStyle = view.getTarget().get('style'); @@ -224,7 +227,8 @@ module.exports = { model }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('Value as default', () => { diff --git a/test/specs/style_manager/view/PropertyIntegerView.js b/test/specs/style_manager/view/PropertyIntegerView.js index b00c5e4641..fd061f9e8d 100644 --- a/test/specs/style_manager/view/PropertyIntegerView.js +++ b/test/specs/style_manager/view/PropertyIntegerView.js @@ -44,7 +44,8 @@ module.exports = { propTarget }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); afterEach(() => { @@ -90,14 +91,13 @@ module.exports = { it('Input value is empty', () => { expect(view.model.get('value')).toNotExist(); - expect(view.model.get('unit')).toEqual('px'); }); it('Update model on setValue', () => { view.setValue(intValue + unitValue); expect(view.model.get('value')).toEqual(parseFloat(intValue)); expect(view.model.get('unit')).toEqual(unitValue); - expect(view.$input.val()).toEqual(intValue); + expect(view.getInputValue()).toEqual(intValue); expect(view.$unit.val()).toEqual(unitValue); }); @@ -134,7 +134,8 @@ module.exports = { propTarget: target }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('Update value and input on target swap', () => { @@ -156,7 +157,7 @@ module.exports = { view.propTarget.trigger('update'); expect(view.model.get('value')).toEqual(20); expect(view.model.get('unit')).toEqual('em'); - expect(view.$input.val()).toEqual('20'); + expect(view.getInputValue()).toEqual('20'); expect(view.$unit.val()).toEqual('em'); }); @@ -179,7 +180,8 @@ module.exports = { model }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('Value as default', () => { @@ -188,20 +190,20 @@ module.exports = { }); it('Input value is as default', () => { - expect(view.$input.val()).toEqual(intValue); + expect(view.getInputValue()).toEqual(''); expect(view.$unit.val()).toEqual(units[1]); }); it('Input follows min', () => { view.$input.val(minValue - 50).trigger('change'); expect(view.model.get('value')).toEqual(minValue); - expect(view.$input.val()).toEqual(minValue + ""); + expect(view.getInputValue()).toEqual(minValue + ""); }); it('Input follows max', () => { view.$input.val(maxValue + 50).trigger('change'); expect(view.model.get('value')).toEqual(maxValue); - expect(view.$input.val()).toEqual(maxValue + ""); + expect(view.getInputValue()).toEqual(maxValue + ""); }); }); diff --git a/test/specs/style_manager/view/PropertyRadioView.js b/test/specs/style_manager/view/PropertyRadioView.js index 38d4b5de52..37e1a60b95 100644 --- a/test/specs/style_manager/view/PropertyRadioView.js +++ b/test/specs/style_manager/view/PropertyRadioView.js @@ -42,7 +42,8 @@ module.exports = { propTarget }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); afterEach(() => { @@ -91,7 +92,6 @@ module.exports = { it('Update model on input change', () => { view.setValue(propValue); - expect(view.model.get('value')).toEqual(propValue); expect(view.getInputValue()).toEqual(propValue); }); @@ -118,7 +118,8 @@ module.exports = { propTarget: target }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('Update value and input on target swap', () => { @@ -158,7 +159,8 @@ module.exports = { model }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render() + $fixture.html(view.el); }); it('Value as default', () => { @@ -166,7 +168,7 @@ module.exports = { }); it('Input value is as default', () => { - expect(view.getInputValue()).toEqual(defValue); + expect(view.model.getDefaultValue()).toEqual(defValue); }); }); diff --git a/test/specs/style_manager/view/PropertySelectView.js b/test/specs/style_manager/view/PropertySelectView.js index 37f71d477d..24266324c4 100644 --- a/test/specs/style_manager/view/PropertySelectView.js +++ b/test/specs/style_manager/view/PropertySelectView.js @@ -43,7 +43,8 @@ module.exports = { propTarget }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); afterEach(() => { @@ -84,7 +85,7 @@ module.exports = { }); it('Input should exist', () => { - expect(view.$input).toExist(); + expect(view.input).toExist(); }); it('Input value is empty', () => { @@ -92,13 +93,14 @@ module.exports = { }); it('Update model on input change', () => { - view.$input.val(propValue).trigger('change'); + view.getInputEl().value = propValue; + view.inputValueChanged(); expect(view.model.get('value')).toEqual(propValue); }); it('Update input on value change', () => { view.model.set('value', propValue); - expect(view.$input.val()).toEqual(propValue); + expect(view.getInputValue()).toEqual(propValue); }); it('Update target on value change', () => { @@ -119,7 +121,8 @@ module.exports = { propTarget: target }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('Update value and input on target swap', () => { @@ -128,7 +131,7 @@ module.exports = { component.set('style', style); view.propTarget.trigger('update'); expect(view.model.get('value')).toEqual(propValue); - expect(view.$input.val()).toEqual(propValue); + expect(view.getInputValue()).toEqual(propValue); }); it('Update value after multiple swaps', () => { @@ -140,7 +143,7 @@ module.exports = { component.set('style', style); view.propTarget.trigger('update'); expect(view.model.get('value')).toEqual('test2value'); - expect(view.$input.val()).toEqual('test2value'); + expect(view.getInputValue()).toEqual('test2value'); }); }) @@ -159,7 +162,8 @@ module.exports = { model }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('Value as default', () => { @@ -168,6 +172,7 @@ module.exports = { it('Empty value as default', () => { options = [ + {value: '', name: 'test'}, {value: 'test1value', name: 'test1'}, {value: 'test2value', name: 'test2'}, {value: '', name: 'TestDef'} @@ -182,12 +187,13 @@ module.exports = { view = new PropertySelectView({ model }); - $fixture.html(view.render().el); - expect(view.$input.val()).toEqual(''); + view.render(); + $fixture.html(view.el); + expect(view.getInputValue()).toEqual(''); }); it('Input value is as default', () => { - expect(view.$input.val()).toEqual(defValue); + expect(view.model.getDefaultValue()).toEqual(defValue); }); }); diff --git a/test/specs/style_manager/view/PropertyStackView.js b/test/specs/style_manager/view/PropertyStackView.js index 6f9cd7bea6..e9c812d394 100644 --- a/test/specs/style_manager/view/PropertyStackView.js +++ b/test/specs/style_manager/view/PropertyStackView.js @@ -59,7 +59,8 @@ module.exports = { model }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); afterEach(() => { @@ -119,7 +120,8 @@ module.exports = { propTarget: target }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); model.get('layers').add(layers); }); @@ -164,7 +166,8 @@ module.exports = { propTarget: target }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); prop3Val = properties[2].list[2].value; prop2Val = properties[1].defaults; prop2Unit = properties[1].units[0]; @@ -278,7 +281,8 @@ module.exports = { model, propTarget: target }); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); prop3Val = properties[2].list[2].value; prop2Val = properties[1].defaults; prop2Unit = properties[1].units[0]; diff --git a/test/specs/style_manager/view/PropertyView.js b/test/specs/style_manager/view/PropertyView.js index 34a1d939a2..b628159fce 100644 --- a/test/specs/style_manager/view/PropertyView.js +++ b/test/specs/style_manager/view/PropertyView.js @@ -36,7 +36,8 @@ module.exports = { }; view = new PropertyView(options); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); afterEach(() => { @@ -56,29 +57,30 @@ module.exports = { }); it('Input should exist', () => { - expect(view.$input).toExist(); + expect(view.getInputEl()).toExist(); }); it('Input value is empty', () => { expect(view.model.get('value')).toNotExist(); - expect(view.$input.val()).toNotExist(); + expect(view.getInputValue()).toNotExist(); }); it('Model not change without update trigger', () => { - view.$input.val(propValue); + view.getInputEl().value = propValue; expect(view.model.get('value')).toNotExist(); }); // Tests inputValueChanged() it('Update model on input change', () => { - view.$input.val(propValue).trigger('change'); + view.getInputEl().value = propValue; + view.inputValueChanged(); expect(view.model.get('value')).toEqual(propValue); }); // Tests modelValueChanged() -> ... it('Update input on value change', () => { view.model.set('value', propValue); - expect(view.$input.val()).toEqual(propValue); + expect(view.getInputValue()).toEqual(propValue); }); it('Update target on value change', () => { @@ -153,7 +155,8 @@ module.exports = { propTarget: target }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('updateTargetStyle', () => { @@ -176,7 +179,7 @@ module.exports = { component.set('style', style); view.propTarget.trigger('update'); expect(view.model.get('value')).toEqual(propValue); - expect(view.$input.val()).toEqual(propValue); + expect(view.getInputValue()).toEqual(propValue); }); it('Update value after multiple swaps', () => { @@ -188,7 +191,7 @@ module.exports = { component.set('style', style); view.propTarget.trigger('update'); expect(view.model.get('value')).toEqual(propValue + '2'); - expect(view.$input.val()).toEqual(propValue + '2'); + expect(view.getInputValue()).toEqual(propValue + '2'); }); }) @@ -205,7 +208,8 @@ module.exports = { model }); $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + view.render(); + $fixture.html(view.el); }); it('Value as default', () => { @@ -213,11 +217,12 @@ module.exports = { }); it('Placeholder as default', () => { - expect(view.$input.attr('placeholder')).toEqual(defValue); + var input = view.getInputEl(); + expect(input.getAttribute('placeholder')).toEqual(defValue); }); it('Input value is empty', () => { - expect(view.$input.val()).toEqual(defValue); + expect(view.getInputValue()).toEqual(''); }); }); From dba391bb975278da6b9d04ad9e8a6538c4e5395f Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 19 Sep 2017 23:45:24 +0200 Subject: [PATCH 007/143] Update style for the range input --- dist/css/grapes.min.css | 2 +- index.html | 5 ++++ src/styles/scss/_gjs_inputs.scss | 48 +++++++++++++++++--------------- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index a3a839be68..07665c0a3e 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-pn-panel,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-5px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.15);border-radius:1px;height:2px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.15);border-radius:1px;height:2px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.15);border-radius:1px;height:2px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-pn-panel,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/index.html b/index.html index 394f872680..800fd59960 100755 --- a/index.html +++ b/index.html @@ -1274,6 +1274,11 @@

Insert title here

}]); var bm = editor.BlockManager; + bm.add('mappy', { + label: 'Map', + attributes: {class:'fa fa-marker'}, + content: {type: 'map'} + }) /* bm.add('link-block', { label: 'Link Block', diff --git a/src/styles/scss/_gjs_inputs.scss b/src/styles/scss/_gjs_inputs.scss index ede882361b..e0dc785066 100644 --- a/src/styles/scss/_gjs_inputs.scss +++ b/src/styles/scss/_gjs_inputs.scss @@ -11,9 +11,9 @@ @mixin rangeTrackStyle() { background-color: $mainDkColor; - border: 1px solid $darkBorder; border-radius: 1px; - height: 2px; + margin-top: 3px; + height: 3px; } .#{$app-prefix}label { @@ -238,33 +238,37 @@ input { margin: 0; - } - input::-moz-range-thumb { - @include rangeThumbStyle(); - } + &:focus { + outline: none; + } - input::-webkit-slider-thumb { - -webkit-appearance: none; - margin-top: -5px; + &::-webkit-slider-thumb { + -webkit-appearance: none; + margin-top: -4px; - @include rangeThumbStyle(); - } + @include rangeThumbStyle(); + } - input::-ms-thumb { - @include rangeThumbStyle(); - } + &::-moz-range-thumb { + @include rangeThumbStyle(); + } - input::-moz-range-track { - @include rangeTrackStyle(); - } + &::-ms-thumb { + @include rangeThumbStyle(); + } - input::-webkit-slider-runnable-track { - @include rangeTrackStyle(); - } + &::-moz-range-track { + @include rangeTrackStyle(); + } + + &::-webkit-slider-runnable-track { + @include rangeTrackStyle(); + } - input::-ms-track { - @include rangeTrackStyle(); + &::-ms-track { + @include rangeTrackStyle(); + } } } From 18801eb45bef3dd75450ccddb0d900ad7b12b728 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 20 Sep 2017 02:18:20 +0200 Subject: [PATCH 008/143] Start slider type for Style Manager --- index.html | 14 ++-- src/style_manager/model/Properties.js | 9 +++ src/style_manager/model/PropertySlider.js | 9 +++ src/style_manager/view/PropertyIntegerView.js | 2 +- src/style_manager/view/PropertySliderView.js | 79 +++++++++++++++++++ src/styles/scss/_gjs_inputs.scss | 1 + 6 files changed, 107 insertions(+), 7 deletions(-) create mode 100644 src/style_manager/model/PropertySlider.js create mode 100644 src/style_manager/view/PropertySliderView.js diff --git a/index.html b/index.html index 800fd59960..1eda77747e 100755 --- a/index.html +++ b/index.html @@ -1037,7 +1037,14 @@

Insert title here

sectors: [{ name: 'General', open: false, - buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom'], + buildProps: ['opacity', 'float', 'display', 'position', 'top', 'right', 'left', 'bottom'], + properties: [{ + type: 'slider', + property: 'opacity', + step: 0.01, + max: 1, + min:0, + }] },{ name: 'Dimension', open: false, @@ -1274,11 +1281,6 @@

Insert title here

}]); var bm = editor.BlockManager; - bm.add('mappy', { - label: 'Map', - attributes: {class:'fa fa-marker'}, - content: {type: 'map'} - }) /* bm.add('link-block', { label: 'Link Block', diff --git a/src/style_manager/model/Properties.js b/src/style_manager/model/Properties.js index f4d30869a8..c7288ca62b 100644 --- a/src/style_manager/model/Properties.js +++ b/src/style_manager/model/Properties.js @@ -57,6 +57,15 @@ module.exports = require('backbone').Collection.extend(TypeableCollection).exten return value; } } + },{ + id: 'slider', + model: require('./PropertySlider'), + view: require('./../view/PropertySliderView'), + isType(value) { + if (value && value.type == 'slider') { + return value; + } + } },{ id: 'integer', model: require('./PropertyInteger'), diff --git a/src/style_manager/model/PropertySlider.js b/src/style_manager/model/PropertySlider.js new file mode 100644 index 0000000000..c21975e711 --- /dev/null +++ b/src/style_manager/model/PropertySlider.js @@ -0,0 +1,9 @@ +const Property = require('./PropertyInteger'); + +module.exports = Property.extend({ + + defaults: Object.assign({}, Property.prototype.defaults, { + showInput: 1, + }), + +}); diff --git a/src/style_manager/view/PropertyIntegerView.js b/src/style_manager/view/PropertyIntegerView.js index d8b4a41b01..cee5624adc 100644 --- a/src/style_manager/view/PropertyIntegerView.js +++ b/src/style_manager/view/PropertyIntegerView.js @@ -1,4 +1,4 @@ -var InputNumber = require('domain_abstract/ui/InputNumber'); +const InputNumber = require('domain_abstract/ui/InputNumber'); module.exports = require('./PropertyView').extend({ diff --git a/src/style_manager/view/PropertySliderView.js b/src/style_manager/view/PropertySliderView.js new file mode 100644 index 0000000000..abaf2d3235 --- /dev/null +++ b/src/style_manager/view/PropertySliderView.js @@ -0,0 +1,79 @@ +const InputNumber = require('domain_abstract/ui/InputNumber'); + +module.exports = require('./PropertyView').extend({ + + events: { + 'change': 'inputValueChanged', + 'input': 'inputValueChangedSoft', + }, + + template(model) { + const pfx = this.pfx; + const ppfx = this.ppfx; + return ` +
+ ${this.templateLabel(model)} +
+
+
+ +
+
+ `; + }, + + init() { + console.log('Init slider'); + const model = this.model; + this.listenTo(model, 'change:unit', this.modelValueChanged); + this.listenTo(model, 'el:change', this.elementUpdated); + }, + + getSliderEl() { + if (!this.slider) { + this.slider = this.el.querySelector('input[type=range]'); + } + + return this.slider; + }, + + inputValueChanged() { + const model = this.model; + const step = model.get('step'); + this.getInputEl().value = this.getSliderEl().value; + const value = this.getInputValue() - step; + model.set('value', value, {avoidStore: 1}).set('value', value + step); + this.elementUpdated(); + }, + + inputValueChangedSoft() { + this.getInputEl().value = this.getSliderEl().value; + this.model.set('value', this.getInputValue(), {avoidStore: 1}); + this.elementUpdated(); + }, + + setValue(value) { + this.inputInst.setValue(value, {silent: 1}); + }, + + onRender() { + const ppfx = this.ppfx; + + if (!this.input) { + const inputNumber = new InputNumber({ + model: this.model, + ppfx: this.ppfx + }); + const input = inputNumber.render(); + this.$el.find(`.${ppfx}fields`).append(input.$el); + this.$input = input.inputEl; + this.$unit = input.unitEl; + this.input = this.$input.get(0); + this.inputInst = input; + } + }, + +}); diff --git a/src/styles/scss/_gjs_inputs.scss b/src/styles/scss/_gjs_inputs.scss index e0dc785066..eb5a41e137 100644 --- a/src/styles/scss/_gjs_inputs.scss +++ b/src/styles/scss/_gjs_inputs.scss @@ -258,6 +258,7 @@ @include rangeThumbStyle(); } + /* -moz-range-progress */ &::-moz-range-track { @include rangeTrackStyle(); } From 714ffccadacfd0c699167a6a5553e446145cdc4c Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 20 Sep 2017 02:56:59 +0200 Subject: [PATCH 009/143] Update color picker target on move --- src/domain_abstract/ui/InputColor.js | 39 +++++++++++++++++++++------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index 314fb13fde..e89a7463f8 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -25,15 +25,14 @@ module.exports = Input.extend({ /** * Updates the view when the model is changed * */ - handleModelChange(...args) { - Input.prototype.handleModelChange.apply(this, args); + handleModelChange() { + Input.prototype.handleModelChange.apply(this, arguments); var value = this.model.get('value'); var colorEl = this.getColorEl(); // If no color selected I will set white for the picker value = value === 'none' ? '#fff' : value; - colorEl.spectrum('set', value); colorEl.get(0).style.backgroundColor = value; }, @@ -52,6 +51,13 @@ module.exports = Input.extend({ throw 'Spectrum missing, probably you load jQuery twice'; } + const getColor = color => { + let cl = color.getAlpha() == 1 ? color.toHexString() : color.toRgbString(); + return cl.replace(/ /g, ''); + } + + let changed = 0; + let previousСolor; colorEl.spectrum({ appendTo: elToAppend || 'body', maxSelectionSize: 8, @@ -61,14 +67,29 @@ module.exports = Input.extend({ cancelText: '⨯', palette: [], move(color) { - var c = color.getAlpha() == 1 ? color.toHexString() : color.toRgbString(); - cpStyle.backgroundColor = c; + const cl = getColor(color); + cpStyle.backgroundColor = cl; + model.set('value', cl, {avoidStore: 1}); }, change(color) { - var c = color.getAlpha() == 1 ? color.toHexString() : color.toRgbString(); - c = c.replace(/ /g,''); - cpStyle.backgroundColor = c; - model.set('value', c); + changed = 1; + const cl = getColor(color); + cpStyle.backgroundColor = cl; + model.set('value', '', {avoidStore: 1}); + model.set('value', cl); + colorEl.spectrum('set', cl); + }, + show(color) { + changed = 0; + console.log('Show color', color, getColor(color)); + previousСolor = getColor(color); + }, + hide(color) { + if (!changed && previousСolor) { + cpStyle.backgroundColor = previousСolor; + colorEl.spectrum('set', previousСolor); + model.set('value', previousСolor, {avoidStore: 1}); + } } }); this.colorEl = colorEl; From 53b2ba08234fb5bb8edaba5ef71ed8721ef01744 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 20 Sep 2017 13:18:29 +0200 Subject: [PATCH 010/143] Updates on color input --- src/domain_abstract/ui/InputColor.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index e89a7463f8..ba32895845 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -25,7 +25,7 @@ module.exports = Input.extend({ /** * Updates the view when the model is changed * */ - handleModelChange() { + handleModelChange(mdl, vl, opts = {}) { Input.prototype.handleModelChange.apply(this, arguments); var value = this.model.get('value'); @@ -34,6 +34,12 @@ module.exports = Input.extend({ // If no color selected I will set white for the picker value = value === 'none' ? '#fff' : value; colorEl.get(0).style.backgroundColor = value; + + // Prevent usuless palette updating + if (!opts.avoidStore) { + console.log('COlor to set', value, mdl, vl, opts); + colorEl.spectrum('set', value); + } }, /** @@ -59,6 +65,7 @@ module.exports = Input.extend({ let changed = 0; let previousСolor; colorEl.spectrum({ + //color: "#f00" appendTo: elToAppend || 'body', maxSelectionSize: 8, showPalette: true, From 8744c2cd40b77885444be128a6568e316819cf76 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 20 Sep 2017 13:20:12 +0200 Subject: [PATCH 011/143] Update escaping function in Selector model. Fixes #325 --- src/selector_manager/model/Selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selector_manager/model/Selector.js b/src/selector_manager/model/Selector.js index 1e63913f1e..193c2ddb36 100644 --- a/src/selector_manager/model/Selector.js +++ b/src/selector_manager/model/Selector.js @@ -62,7 +62,7 @@ const Selector = Backbone.Model.extend({ * @private */ escapeName(name) { - return `${name}`.trim().replace(/([^a-z0-9\w]+)/gi, '-'); + return `${name}`.trim().replace(/([^a-z0-9\w-]+)/gi, '-'); }, }); From 9d8fbe28e372876c92c77c066d9b930e3d23b05b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 20 Sep 2017 22:05:15 +0200 Subject: [PATCH 012/143] Improve Color Input --- src/domain_abstract/ui/Input.js | 4 +- src/domain_abstract/ui/InputColor.js | 53 ++++++++++++--------- src/style_manager/view/PropertyColorView.js | 5 +- src/style_manager/view/PropertyView.js | 15 ++---- 4 files changed, 39 insertions(+), 38 deletions(-) diff --git a/src/domain_abstract/ui/Input.js b/src/domain_abstract/ui/Input.js index d635c7aa28..4b382639dd 100644 --- a/src/domain_abstract/ui/Input.js +++ b/src/domain_abstract/ui/Input.js @@ -41,14 +41,14 @@ module.exports = Backbone.View.extend({ // Generally I get silent when I need to reflect data to view without // reupdating the target if(opt.silent) { - this.handleModelChange(); + this.handleModelChange(model, value, opt); } }, /** * Updates the view when the model is changed * */ - handleModelChange() { + handleModelChange(model, value, opts) { this.getInputEl().value = this.model.get('value'); }, diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index ba32895845..7a40121922 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -15,31 +15,36 @@ module.exports = Input.extend({ initialize(opts) { Input.prototype.initialize.apply(this, arguments); var ppfx = this.ppfx; - this.colorCls = ppfx + 'field-color-picker'; - this.inputClass = ppfx + 'field ' + ppfx + 'field-color'; - this.colorHolderClass = ppfx + 'field-colorp-c'; + this.colorCls = `${ppfx}field-color-picker`; + this.inputClass = `${ppfx}field ${ppfx}field-color`; + this.colorHolderClass = `${ppfx}field-colorp-c`; + }, - this.listenTo(this.model, 'change:value', this.handleModelChange); + /** + * Set value to the model + * @param {string} val + * @param {Object} opts + */ + setValue(val, opts = {}) { + const model = this.model; + const value = val || model.get('defaults'); + const inputEl = this.getInputEl(); + const colorEl = this.getColorEl(); + const valueClr = value != 'none' ? value : ''; + inputEl.value = value; + colorEl.get(0).style.backgroundColor = valueClr; + + if (opts.targetUpdate) { + colorEl.spectrum('set', valueClr); + this.noneColor = value == 'none'; + } }, /** * Updates the view when the model is changed * */ - handleModelChange(mdl, vl, opts = {}) { - Input.prototype.handleModelChange.apply(this, arguments); - - var value = this.model.get('value'); - var colorEl = this.getColorEl(); - - // If no color selected I will set white for the picker - value = value === 'none' ? '#fff' : value; - colorEl.get(0).style.backgroundColor = value; - - // Prevent usuless palette updating - if (!opts.avoidStore) { - console.log('COlor to set', value, mdl, vl, opts); - colorEl.spectrum('set', value); - } + handleModelChange(model, value, opts) { + this.setValue(value, opts); }, /** @@ -47,7 +52,8 @@ module.exports = Input.extend({ * @return {HTMLElement} */ getColorEl() { - if(!this.colorEl) { + if (!this.colorEl) { + const self = this; var model = this.model; var colorEl = $('
', {class: this.colorCls}); var cpStyle = colorEl.get(0).style; @@ -65,7 +71,6 @@ module.exports = Input.extend({ let changed = 0; let previousСolor; colorEl.spectrum({ - //color: "#f00" appendTo: elToAppend || 'body', maxSelectionSize: 8, showPalette: true, @@ -84,15 +89,17 @@ module.exports = Input.extend({ cpStyle.backgroundColor = cl; model.set('value', '', {avoidStore: 1}); model.set('value', cl); - colorEl.spectrum('set', cl); + self.noneColor = 0; }, show(color) { changed = 0; - console.log('Show color', color, getColor(color)); previousСolor = getColor(color); }, hide(color) { if (!changed && previousСolor) { + if (self.noneColor) { + previousСolor = ''; + } cpStyle.backgroundColor = previousСolor; colorEl.spectrum('set', previousСolor); model.set('value', previousСolor, {avoidStore: 1}); diff --git a/src/style_manager/view/PropertyColorView.js b/src/style_manager/view/PropertyColorView.js index 7fef6004bd..cd249be19a 100644 --- a/src/style_manager/view/PropertyColorView.js +++ b/src/style_manager/view/PropertyColorView.js @@ -7,8 +7,9 @@ module.exports = require('./PropertyIntegerView').extend({ this.className += ` ${this.pfx}file`; }, - setValue(value) { - this.inputInst.setValue(value, {silent: 1}); + setValue(value, opts = {}) { + opts = Object.assign({}, opts, {silent: 1}); + this.inputInst.setValue(value, opts); }, onRender() { diff --git a/src/style_manager/view/PropertyView.js b/src/style_manager/view/PropertyView.js index fcdc030f46..4bf352b02f 100644 --- a/src/style_manager/view/PropertyView.js +++ b/src/style_manager/view/PropertyView.js @@ -195,7 +195,7 @@ module.exports = Backbone.View.extend({ } model.set('value', value, {silent: 1}); - this.setValue(value, 1); + this.setValue(value, {targetUpdate: 1}); model.set('status', status); if (em) { @@ -398,18 +398,11 @@ module.exports = Backbone.View.extend({ * @param {Boolean} force * @private * */ - setValue(value, force) { + setValue(value, opts = {}) { const model = this.model; - const f = force === 0 ? 0 : 1; - const def = model.getDefaultValue(); - let v = model.get('value') || def; - - if (value || f) { - v = value; - } - + let val = value || model.get('value') || model.getDefaultValue(); const input = this.getInputEl(); - input && (input.value = v); + input && (input.value = val); }, getInputEl() { From 7bda70df257bc8fba0fefd1dd5176557672575c9 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 20 Sep 2017 22:29:31 +0200 Subject: [PATCH 013/143] Update slider property --- dist/css/grapes.min.css | 2 +- index.html | 1 + src/style_manager/view/PropertyIntegerView.js | 14 +++--- src/style_manager/view/PropertySliderView.js | 46 ++++--------------- src/style_manager/view/PropertyView.js | 4 +- src/styles/scss/_gjs_inputs.scss | 8 ++++ 6 files changed, 27 insertions(+), 48 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 07665c0a3e..815939719e 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-pn-panel,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-pn-panel,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/index.html b/index.html index 1eda77747e..b8870339f8 100755 --- a/index.html +++ b/index.html @@ -1041,6 +1041,7 @@

Insert title here

properties: [{ type: 'slider', property: 'opacity', + defaults: 1, step: 0.01, max: 1, min:0, diff --git a/src/style_manager/view/PropertyIntegerView.js b/src/style_manager/view/PropertyIntegerView.js index cee5624adc..438069f548 100644 --- a/src/style_manager/view/PropertyIntegerView.js +++ b/src/style_manager/view/PropertyIntegerView.js @@ -2,13 +2,8 @@ const InputNumber = require('domain_abstract/ui/InputNumber'); module.exports = require('./PropertyView').extend({ - template(model) { - const pfx = this.pfx; - return ` -
- ${this.templateLabel(model)} -
- `; + templateInput() { + return ''; }, init() { @@ -22,13 +17,16 @@ module.exports = require('./PropertyView').extend({ }, onRender() { + const ppfx = this.ppfx; + if (!this.input) { const inputNumber = new InputNumber({ model: this.model, ppfx: this.ppfx }); const input = inputNumber.render(); - this.$el.append(input.$el); + const fields = this.el.querySelector(`.${ppfx}fields`); + fields.appendChild(input.el); this.$input = input.inputEl; this.$unit = input.unitEl; this.input = this.$input.get(0); diff --git a/src/style_manager/view/PropertySliderView.js b/src/style_manager/view/PropertySliderView.js index abaf2d3235..0f985def0d 100644 --- a/src/style_manager/view/PropertySliderView.js +++ b/src/style_manager/view/PropertySliderView.js @@ -1,37 +1,24 @@ const InputNumber = require('domain_abstract/ui/InputNumber'); -module.exports = require('./PropertyView').extend({ +module.exports = require('./PropertyIntegerView').extend({ events: { 'change': 'inputValueChanged', 'input': 'inputValueChangedSoft', }, - template(model) { - const pfx = this.pfx; + templateInput(model) { const ppfx = this.ppfx; return ` -
- ${this.templateLabel(model)} -
-
-
- -
+
+
`; }, - init() { - console.log('Init slider'); - const model = this.model; - this.listenTo(model, 'change:unit', this.modelValueChanged); - this.listenTo(model, 'el:change', this.elementUpdated); - }, - getSliderEl() { if (!this.slider) { this.slider = this.el.querySelector('input[type=range]'); @@ -56,24 +43,7 @@ module.exports = require('./PropertyView').extend({ }, setValue(value) { + this.getSliderEl().value = value; this.inputInst.setValue(value, {silent: 1}); }, - - onRender() { - const ppfx = this.ppfx; - - if (!this.input) { - const inputNumber = new InputNumber({ - model: this.model, - ppfx: this.ppfx - }); - const input = inputNumber.render(); - this.$el.find(`.${ppfx}fields`).append(input.$el); - this.$input = input.inputEl; - this.$unit = input.unitEl; - this.input = this.$input.get(0); - this.inputInst = input; - } - }, - }); diff --git a/src/style_manager/view/PropertyView.js b/src/style_manager/view/PropertyView.js index 4bf352b02f..1f23af0f4b 100644 --- a/src/style_manager/view/PropertyView.js +++ b/src/style_manager/view/PropertyView.js @@ -8,7 +8,9 @@ module.exports = Backbone.View.extend({
${this.templateLabel(model)}
- ${this.templateInput(model)} +
+ ${this.templateInput(model)} +
`; }, diff --git a/src/styles/scss/_gjs_inputs.scss b/src/styles/scss/_gjs_inputs.scss index eb5a41e137..5433caa4eb 100644 --- a/src/styles/scss/_gjs_inputs.scss +++ b/src/styles/scss/_gjs_inputs.scss @@ -20,6 +20,10 @@ line-height: 18px; } +.#{$app-prefix}fields { + display: flex; +} + .#{$app-prefix}field { background-color: $mainDkColor; border: none; @@ -43,6 +47,10 @@ position: relative; padding: $inputPadding; z-index: 1; + + &:focus { + outline: none; + } } textarea { From 2da2d598954a4e899ec8f2083321c93006bb96f1 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 20 Sep 2017 23:04:06 +0200 Subject: [PATCH 014/143] Refactor Stack layers rendering --- dist/css/grapes.min.css | 2 +- src/style_manager/view/PropertyColorView.js | 4 -- .../view/PropertyCompositeView.js | 4 -- src/style_manager/view/PropertyFileView.js | 1 - src/style_manager/view/PropertyRadioView.js | 44 +++++++++---------- src/style_manager/view/PropertySelectView.js | 8 +--- src/style_manager/view/PropertyStackView.js | 9 ++-- src/style_manager/view/PropertyView.js | 7 +-- src/styles/scss/_gjs_style_manager.scss | 2 + 9 files changed, 35 insertions(+), 46 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 815939719e..0d2fa7a763 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-pn-panel,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-pn-panel,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/src/style_manager/view/PropertyColorView.js b/src/style_manager/view/PropertyColorView.js index cd249be19a..cc9bab2a25 100644 --- a/src/style_manager/view/PropertyColorView.js +++ b/src/style_manager/view/PropertyColorView.js @@ -3,10 +3,6 @@ var InputColor = require('domain_abstract/ui/InputColor'); module.exports = require('./PropertyIntegerView').extend({ - init() { - this.className += ` ${this.pfx}file`; - }, - setValue(value, opts = {}) { opts = Object.assign({}, opts, {silent: 1}); this.inputInst.setValue(value, opts); diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index 9201bd4381..2cd4a0edab 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -11,10 +11,6 @@ module.exports = PropertyView.extend({ `; }, - init() { - this.className = this.className + ' '+ this.pfx +'composite'; - }, - inputValueChanged(...args) { if(!this.model.get('detached')) PropertyView.prototype.inputValueChanged.apply(this, args); diff --git a/src/style_manager/view/PropertyFileView.js b/src/style_manager/view/PropertyFileView.js index ca334ac18d..ced75d8969 100644 --- a/src/style_manager/view/PropertyFileView.js +++ b/src/style_manager/view/PropertyFileView.js @@ -29,7 +29,6 @@ module.exports = PropertyView.extend({ this.assets = this.target.get('assets'); this.modal = this.target.get('Modal'); this.am = this.target.get('AssetManager'); - this.className = this.className + ' '+ this.pfx +'file'; this.events['click #'+this.pfx+'close'] = 'removeFile'; this.events['click #'+this.pfx+'images'] = 'openAssetManager'; this.delegateEvents(); diff --git a/src/style_manager/view/PropertyRadioView.js b/src/style_manager/view/PropertyRadioView.js index 1a6eaba304..292660d7c3 100644 --- a/src/style_manager/view/PropertyRadioView.js +++ b/src/style_manager/view/PropertyRadioView.js @@ -10,34 +10,34 @@ module.exports = require('./PropertyView').extend({ `; }, - init() { - const model = this.model; - this.list = model.get('list') || model.get('options') || []; - this.className = this.className + ' '+ this.pfx +'list'; - }, - onRender() { - var pfx = this.pfx; - var ppfx = this.ppfx; - var itemCls = ppfx + 'radio-item-label'; - var prop = this.property; + const pfx = this.pfx; + const ppfx = this.ppfx; + const itemCls = `${ppfx}radio-item-label`; + const model = this.model; + const prop = model.get('property'); + const options = model.get('list') || model.get('options') || []; - if(!this.$input) { - if(this.list && this.list.length) { + if (!this.$input) { + if(options && options.length) { let inputStr = ''; - _.each(this.list, el => { - var cl = el.className ? el.className + ' ' + pfx + 'icon ' + itemCls : '', - id = prop + '-' + el.value, - labelTxt = el.name ? el.name : el.value; - var titleAttr = el.title ? 'title="' + el.title + '"': ''; - inputStr += '
'+ - ''+ - '
'; + + options.forEach(el => { + let cl = el.className ? `${el.className} ${pfx}icon ${itemCls}` : ''; + let id = `${prop}-${el.value}`; + let labelTxt = el.name || el.value; + let titleAttr = el.title ? `title="${el.title}"` : ''; + inputStr += ` +
+ + +
`; }); + this.$inputEl = $(inputStr); this.input = this.$inputEl.get(0); - this.$el.find('#'+ pfx +'input-holder').html(this.$inputEl); - this.$input = this.$inputEl.find('input[name="'+this.property+'"]'); + this.$el.find(`#${pfx}input-holder`).html(this.$inputEl); + this.$input = this.$inputEl.find(`input[name="${prop}"]`); } } }, diff --git a/src/style_manager/view/PropertySelectView.js b/src/style_manager/view/PropertySelectView.js index 2af82c28f5..cf737ddb8f 100644 --- a/src/style_manager/view/PropertySelectView.js +++ b/src/style_manager/view/PropertySelectView.js @@ -13,14 +13,10 @@ module.exports = require('./PropertyView').extend({ `; }, - init() { - const model = this.model; - this.list = model.get('list') || model.get('options') || []; - }, - onRender() { var pfx = this.pfx; - const options = this.list; + const model = this.model; + const options = model.get('list') || model.get('options') || []; if (!this.$input) { let optionsStr = ''; diff --git a/src/style_manager/view/PropertyStackView.js b/src/style_manager/view/PropertyStackView.js index fcdbd3f70a..2916b8b3e6 100644 --- a/src/style_manager/view/PropertyStackView.js +++ b/src/style_manager/view/PropertyStackView.js @@ -20,7 +20,6 @@ module.exports = PropertyCompositeView.extend({ const model = this.model; const pfx = this.pfx; model.set('stackIndex', null); - this.className = `${pfx}property ${pfx}stack`; this.events[`click #${pfx}add`] = 'addLayer'; this.listenTo(model, 'change:stackIndex', this.indexChanged); this.listenTo(model, 'updateValue', this.inputValueChanged); @@ -210,8 +209,9 @@ module.exports = PropertyCompositeView.extend({ * @return self * */ renderLayers() { - if(!this.$field) - this.$field = this.$el.find('> .' + this.pfx + 'field'); + if (!this.fieldEl) { + this.fieldEl = this.el.querySelector(`.${this.pfx}field`); + } if(!this.$layers) this.$layers = new LayersView({ @@ -221,9 +221,8 @@ module.exports = PropertyCompositeView.extend({ config: this.config }); - this.$field.append(this.$layers.render().el); + this.fieldEl.appendChild(this.$layers.render().el); this.$props.hide(); - return this; }, /** diff --git a/src/style_manager/view/PropertyView.js b/src/style_manager/view/PropertyView.js index 1f23af0f4b..32070ba19f 100644 --- a/src/style_manager/view/PropertyView.js +++ b/src/style_manager/view/PropertyView.js @@ -52,7 +52,6 @@ module.exports = Backbone.View.extend({ this.property = model.get('property'); this.input = this.$input = null; const pfx = this.pfx; - this.className = pfx + 'property'; this.inputHolderId = '#' + pfx + 'input-holder'; this.sector = model.collection && model.collection.sector; @@ -436,9 +435,11 @@ module.exports = Backbone.View.extend({ }, render() { + const pfx = this.pfx; + const model = this.model; const el = this.el; - el.innerHTML = this.template(this.model); - el.className = this.className; + el.innerHTML = this.template(model); + el.className = `${pfx}property ${pfx}${model.get('type')}`; this.updateStatus(); const onRender = this.onRender && this.onRender.bind(this); diff --git a/src/styles/scss/_gjs_style_manager.scss b/src/styles/scss/_gjs_style_manager.scss index c537c8b679..a4dfdf3a4f 100644 --- a/src/styles/scss/_gjs_style_manager.scss +++ b/src/styles/scss/_gjs_style_manager.scss @@ -246,7 +246,9 @@ &.#{$sm-prefix}composite, &.#{$sm-prefix}file, &.#{$sm-prefix}list, + &.#{$sm-prefix}radio, &.#{$sm-prefix}stack, + &.#{$sm-prefix}slider, &.#{$sm-prefix}color { width: 100%; } From 3faeec6aeca918cf76d279ec0cd9a33a30805e44 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 20 Sep 2017 23:15:05 +0200 Subject: [PATCH 015/143] Stylistic update --- dist/css/grapes.min.css | 2 +- src/styles/scss/_gjs_inputs.scss | 40 ++++++++++++++++++++++++++++---- src/styles/scss/main.scss | 30 ------------------------ 3 files changed, 37 insertions(+), 35 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 0d2fa7a763..a361e7c037 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-pn-panel,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/src/styles/scss/_gjs_inputs.scss b/src/styles/scss/_gjs_inputs.scss index 5433caa4eb..66faa569b7 100644 --- a/src/styles/scss/_gjs_inputs.scss +++ b/src/styles/scss/_gjs_inputs.scss @@ -16,12 +16,44 @@ height: 3px; } -.#{$app-prefix}label { - line-height: 18px; +.#{$app-prefix} { + &label { + line-height: 18px; + } + + &fields { + display: flex; + } + + &select { + padding: 0; + width: 100%; + + select { + padding-right: 10px; + } + } + + &select:-moz-focusring, + &select select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 $mainLhlColor; + } + + &input:focus, + &button:focus, + &btn-prim:focus, + &select:focus, + &select select:focus { + outline: none; + } } -.#{$app-prefix}fields { - display: flex; +.#{$app-prefix}select option, +.#{$clm-prefix}select option, +.#{$sm-prefix}select option, +.#{$sm-prefix}unit option { + @extend .#{$app-prefix}bg-main; } .#{$app-prefix}field { diff --git a/src/styles/scss/main.scss b/src/styles/scss/main.scss index 3e35942aef..eb107ea97c 100644 --- a/src/styles/scss/main.scss +++ b/src/styles/scss/main.scss @@ -206,36 +206,6 @@ pointer-events: none; } -div.#{$app-prefix}select { - padding: 0; -} - -.#{$app-prefix}select select { - padding-right: 10px; -} - -.#{$app-prefix}select:-moz-focusring, -.#{$app-prefix}select select:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 $mainLhlColor; -} - -.#{$app-prefix}input:focus, -.#{$app-prefix}button:focus, -.#{$app-prefix}btn-prim:focus, -.#{$app-prefix}select:focus, -.#{$app-prefix}select select:focus { - outline: none; -} - -.#{$app-prefix}select option, -.#{$clm-prefix}select option, -.#{$sm-prefix}select option, -.#{$sm-prefix}unit option { - @extend .#{$app-prefix}bg-main; - //background-color: $mainDkColor; -} - /************* TRAITS ****************/ .#{$app-prefix}traits-label { border-bottom: 1px solid $mainDkColor; From acdd554bce3581093e515b23567b67b86a9206f9 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 20 Sep 2017 23:30:49 +0200 Subject: [PATCH 016/143] Update slider style --- dist/css/grapes.min.css | 2 +- src/domain_abstract/ui/InputNumber.js | 2 +- src/styles/scss/_gjs_inputs.scss | 6 ++++++ src/styles/scss/_gjs_style_manager.scss | 8 ++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index a361e7c037..651be89038 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/src/domain_abstract/ui/InputNumber.js b/src/domain_abstract/ui/InputNumber.js index a14aa86191..5b4aabfe72 100644 --- a/src/domain_abstract/ui/InputNumber.js +++ b/src/domain_abstract/ui/InputNumber.js @@ -16,7 +16,7 @@ module.exports = Backbone.View.extend({ _.bindAll(this, 'moveIncrement', 'upIncrement'); var opt = opts || {}; var ppfx = opt.ppfx || ''; - var contClass = opt.contClass || (ppfx + 'field'); + var contClass = opt.contClass || (`${ppfx}field ${ppfx}field-integer`); this.ppfx = ppfx; this.docEl = $(document); this.inputCls = ppfx + 'field-number'; diff --git a/src/styles/scss/_gjs_inputs.scss b/src/styles/scss/_gjs_inputs.scss index 66faa569b7..a3aea38579 100644 --- a/src/styles/scss/_gjs_inputs.scss +++ b/src/styles/scss/_gjs_inputs.scss @@ -47,6 +47,12 @@ &select select:focus { outline: none; } + + &field { + &-range { + flex: 9 1 auto; + } + } } .#{$app-prefix}select option, diff --git a/src/styles/scss/_gjs_style_manager.scss b/src/styles/scss/_gjs_style_manager.scss index a4dfdf3a4f..b032916279 100644 --- a/src/styles/scss/_gjs_style_manager.scss +++ b/src/styles/scss/_gjs_style_manager.scss @@ -236,6 +236,14 @@ /* ------------------Property-------------------- */ + .#{$sm-prefix} { + &slider { + .#{$app-prefix}field-integer { + flex: 1 1 65px; + } + } + } + .#{$sm-prefix}property { box-sizing: border-box; float: left; From 8b1c31f02954e9443a9cd833464f42f53d0c5c48 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Sep 2017 14:41:23 +0200 Subject: [PATCH 017/143] More style updates --- dist/css/grapes.min.css | 2 +- src/styles/scss/_gjs_inputs.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 651be89038..3811e2a137 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/src/styles/scss/_gjs_inputs.scss b/src/styles/scss/_gjs_inputs.scss index a3aea38579..f8acf50cf2 100644 --- a/src/styles/scss/_gjs_inputs.scss +++ b/src/styles/scss/_gjs_inputs.scss @@ -284,6 +284,7 @@ input { margin: 0; + height: 100%; &:focus { outline: none; From a45490ebb1f4258c8218f48136a9df9f693cc469 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Sep 2017 14:47:53 +0200 Subject: [PATCH 018/143] Make the slider input toggable --- src/style_manager/view/PropertySliderView.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/style_manager/view/PropertySliderView.js b/src/style_manager/view/PropertySliderView.js index 0f985def0d..7db84f2d75 100644 --- a/src/style_manager/view/PropertySliderView.js +++ b/src/style_manager/view/PropertySliderView.js @@ -1,6 +1,7 @@ const InputNumber = require('domain_abstract/ui/InputNumber'); +const Property = require('./PropertyIntegerView'); -module.exports = require('./PropertyIntegerView').extend({ +module.exports = Property.extend({ events: { 'change': 'inputValueChanged', @@ -46,4 +47,13 @@ module.exports = require('./PropertyIntegerView').extend({ this.getSliderEl().value = value; this.inputInst.setValue(value, {silent: 1}); }, + + onRender() { + Property.prototype.onRender.apply(this, arguments); + const model = this.model; + + if (!model.get('showInput')) { + this.inputInst.el.style.display = 'none'; + } + } }); From 834f46410f9557dbd93757e91a37fcbae03030cd Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Sep 2017 14:50:27 +0200 Subject: [PATCH 019/143] Fix regressions --- test/specs/style_manager/view/PropertyColorView.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/specs/style_manager/view/PropertyColorView.js b/test/specs/style_manager/view/PropertyColorView.js index ffaff1d02d..ea791196ff 100644 --- a/test/specs/style_manager/view/PropertyColorView.js +++ b/test/specs/style_manager/view/PropertyColorView.js @@ -82,7 +82,8 @@ module.exports = { }); it('Update model on input change', () => { - view.$input.val(propValue).trigger('change'); + view.getInputEl().value = propValue; + view.inputValueChanged(); expect(view.model.get('value')).toEqual(propValue); }); From f0e73a868a2a010697efcc1fa6f7edae60408761 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Sep 2017 15:12:56 +0200 Subject: [PATCH 020/143] Add the possibility to select parent component --- index.html | 20 ++++++++++---------- src/commands/index.js | 2 +- src/commands/view/SelectParent.js | 9 +++++++++ src/dom_components/model/Component.js | 6 ++++++ 4 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 src/commands/view/SelectParent.js diff --git a/index.html b/index.html index b8870339f8..51a4ca9566 100755 --- a/index.html +++ b/index.html @@ -1037,15 +1037,7 @@

Insert title here

sectors: [{ name: 'General', open: false, - buildProps: ['opacity', 'float', 'display', 'position', 'top', 'right', 'left', 'bottom'], - properties: [{ - type: 'slider', - property: 'opacity', - defaults: 1, - step: 0.01, - max: 1, - min:0, - }] + buildProps: ['float', 'display', 'position', 'top', 'right', 'left', 'bottom'] },{ name: 'Dimension', open: false, @@ -1070,7 +1062,15 @@

Insert title here

},{ name: 'Extra', open: false, - buildProps: ['transition', 'perspective', 'transform'], + buildProps: ['opacity', 'transition', 'perspective', 'transform'], + properties: [{ + type: 'slider', + property: 'opacity', + defaults: 1, + step: 0.01, + max: 1, + min:0, + }] },{ name: 'Flex', open: false, diff --git a/src/commands/index.js b/src/commands/index.js index d7616ff0a3..c9218e231a 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -100,6 +100,7 @@ module.exports = () => { defaultCommands['open-blocks'] = require('./view/OpenBlocks'); defaultCommands['open-assets'] = require('./view/OpenAssets'); defaultCommands['show-offset'] = require('./view/ShowOffset'); + defaultCommands['select-parent'] = require('./view/SelectParent'); defaultCommands.fullscreen = require('./view/Fullscreen'); defaultCommands.preview = require('./view/Preview'); defaultCommands.resize = require('./view/Resize'); @@ -117,7 +118,6 @@ module.exports = () => { ed.select(null); sel.destroy(); ed.trigger('change:canvasOffset'); - //ed.refresh();//change:canvasOffset }, }; diff --git a/src/commands/view/SelectParent.js b/src/commands/view/SelectParent.js new file mode 100644 index 0000000000..2629f7fee5 --- /dev/null +++ b/src/commands/view/SelectParent.js @@ -0,0 +1,9 @@ +module.exports = { + + run(editor) { + const comp = editor.getSelected(); + const coll = comp && comp.collection; + coll && coll.parent && editor.select(coll.parent); + } + +}; diff --git a/src/dom_components/model/Component.js b/src/dom_components/model/Component.js index d675d6d683..0f6a4620ce 100644 --- a/src/dom_components/model/Component.js +++ b/src/dom_components/model/Component.js @@ -190,6 +190,12 @@ module.exports = Backbone.Model.extend(Styleable).extend({ var model = this; if(!model.get('toolbar')) { var tb = []; + if(model.collection) { + tb.push({ + attributes: {class: 'fa fa-arrow-up'}, + command: 'select-parent', + }); + } if(model.get('draggable')) { tb.push({ attributes: {class: 'fa fa-arrows'}, From be7d243efc7321dde0c3da14fe30646fc4e0efd8 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Sep 2017 15:35:04 +0200 Subject: [PATCH 021/143] Add `component:selected` event --- src/commands/index.js | 1 - src/editor/index.js | 1 + src/editor/model/Editor.js | 6 ++++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/commands/index.js b/src/commands/index.js index c9218e231a..e5d5dfab3e 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -117,7 +117,6 @@ module.exports = () => { ed.select(null); sel.destroy(); - ed.trigger('change:canvasOffset'); }, }; diff --git a/src/editor/index.js b/src/editor/index.js index ed6e7d4cd5..79cd820c0f 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -37,6 +37,7 @@ * * `component:update:{propertyName}` - Listen any property change * * `component:styleUpdate` - Triggered when the style of the component is updated * * `component:styleUpdate:{propertyName}` - Listen for a specific style property change + * * `component:selected` - New component selected * * `asset:add` - New asset added * * `asset:remove` - Asset removed * * `asset:upload:start` - Before the upload is started diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js index bcfaf96adb..72b2a0066a 100644 --- a/src/editor/model/Editor.js +++ b/src/editor/model/Editor.js @@ -291,10 +291,12 @@ module.exports = Backbone.Model.extend({ * @private * */ componentSelected(model, val, options) { - if(!this.get('selectedComponent')) + if (!this.get('selectedComponent')) { this.trigger('deselect-comp'); - else + } else { this.trigger('select-comp',[model,val,options]); + this.trigger('component:selected', arguments); + } }, /** From f6d8f10a4ddd92f11d17d78bae9f2bdabb09851f Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Sep 2017 15:38:42 +0200 Subject: [PATCH 022/143] Prevent propagation with toolbar buttons --- src/dom_components/view/ToolbarButtonView.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/dom_components/view/ToolbarButtonView.js b/src/dom_components/view/ToolbarButtonView.js index 252ce4dd9f..af9fc41b83 100644 --- a/src/dom_components/view/ToolbarButtonView.js +++ b/src/dom_components/view/ToolbarButtonView.js @@ -14,15 +14,18 @@ module.exports = Backbone.View.extend({ }, handleClick(event) { - var opts = {event}; - var command = this.model.get('command'); + event.preventDefault(); + event.stopPropagation(); + const opts = {event}; + const command = this.model.get('command'); + const editor = this.editor; if (typeof command === 'function') { - command(this.editor, null, opts); + command(editor, null, opts); } if (typeof command === 'string') { - this.editor.runCommand(command, opts); + editor.runCommand(command, opts); } }, From e5af4c6bc332533bc4dbd240bf7c476c5578683d Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Sep 2017 22:31:20 +0200 Subject: [PATCH 023/143] Add `grapesjs.version` --- index.html | 2 ++ package.json | 1 + src/grapesjs/index.js | 3 +++ webpack.config.js | 7 +++++++ yarn.lock | 9 ++++++++- 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 51a4ca9566..b7e0b315f2 100755 --- a/index.html +++ b/index.html @@ -1337,6 +1337,8 @@

Insert title here

}); editor.render(); + + console.log('version', grapesjs.version); diff --git a/package.json b/package.json index 37f8b99ebe..d6e9a52ecf 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "mocha": "^3.1.2", "node-sass": "^4.5.3", "sinon": "^3.2.1", + "string-replace-loader": "^1.3.0", "webpack": "^3.5.5", "webpack-dev-server": "^2.7.1" }, diff --git a/src/grapesjs/index.js b/src/grapesjs/index.js index a0b056d2ab..8fb20022e3 100644 --- a/src/grapesjs/index.js +++ b/src/grapesjs/index.js @@ -9,6 +9,9 @@ module.exports = (() => { return { + // Will be replaced on build + version: '<# VERSION #>', + editors, plugins, diff --git a/webpack.config.js b/webpack.config.js index 91b94c6aac..0f33bc9ea7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -35,6 +35,13 @@ module.exports = { plugins: plugins, module: { loaders: [{ + test: /grapesjs\/index\.js$/, + loader: 'string-replace-loader', + query: { + search: '<# VERSION #>', + replace: pkg.version + } + },{ test: /\.js$/, loader: 'babel-loader', include: /src/, diff --git a/yarn.lock b/yarn.lock index a50741d421..5b678eec38 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3625,7 +3625,7 @@ lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" -lodash@^4.0.0, lodash@^4.11.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.3.0, lodash@~4.17.4: +lodash@^4, lodash@^4.0.0, lodash@^4.11.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.3.0, lodash@~4.17.4: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -5393,6 +5393,13 @@ stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" +string-replace-loader@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string-replace-loader/-/string-replace-loader-1.3.0.tgz#1d404a7bf5e2ec21b08ffc76d89445fbe49bc01d" + dependencies: + loader-utils "^1.1.0" + lodash "^4" + string-template@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" From 8e16ded5cfd95199236a212b89a4d32f817d2d2b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Sep 2017 23:13:17 +0200 Subject: [PATCH 024/143] Bump v0.10.7 --- dist/css/grapes.min.css | 2 +- dist/grapes.min.js | 6 +++--- index.html | 2 -- package.json | 2 +- src/styles/scss/_gjs_variables.scss | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 3811e2a137..b1978b4cb6 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.3);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.3);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.3);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.3);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.3)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.3);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.3);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.3)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.3),1px 1px 0 rgba(43,43,43,0.3) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.3);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.3)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.3);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.3)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.3);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.3);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.3);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.3)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.3);box-shadow:0 0 7px rgba(0,0,0,0.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.3)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.3);border-color:rgba(0,0,0,0.3);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.2)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 0b86cf5db8..6b302a188f 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,5 +1,5 @@ -/*! grapesjs - 0.10.6 */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?exports.grapesjs=e(require("jquery")):t.grapesjs=e(t.jQuery)}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=54)}([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(11),e],void 0!==(o=function(t,e,n){a.Backbone=s(a,n,t,e)}.apply(e,r))&&(t.exports=o)}(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){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],l(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],l(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=s(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(I,"/"),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),O.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(!O.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(_,"")),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 O;var z=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=O.extend=z;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})}).call(e,n(10))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if($(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=$(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=$(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},F=C.invert(z),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(z),C.unescape=R(F),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(42),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(141),l=n(16),c=n(44),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;n\n \n '+n+'\n \n \n
\n '+this.templateField()+"\n "},templateField:function(){var t=this.pfx;return'\n
\n \n
\n
\n '},events:{change:"valueUpdated"},initialize:function(t){this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=this.$input=null;var n=this.pfx;this.className=n+"property",this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.valueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",o=n+"color-warn",s=this.$el.find("> ."+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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.propTarget&&this.propTarget.model},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},valueUpdated:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},targetUpdated:function(){if(this.checkVisibility()){var t="",e="",n=this.getTargetValue({ignoreDefault:1}),i=this.getDefaultValue(),r=this.getComputedValue(),o=this.config,s=o.em,a=this.model;n?(t=n,o.highlightChanged&&(e="updated")):r&&o.showComputed&&r!=i?(t=r,o.highlightComputed&&(e="computed")):(t=i,e=""),a.set("value",t,{silent:1}),this.setValue(t,1),a.set("status",e),s&&(s.trigger("styleManager:change",this),s.trigger("styleManager:change:"+a.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")],t=n.parseValue(t),t||e.ignoreDefault||(t=this.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getDefaultValue:function(){return this.model.getDefaultValue()},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){return this.$input?this.$input.val():""},valueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=e.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,n=t&&t.get("selectedComponent");if(!n)return!0;var i=n.get("stylable");return i instanceof Array&&(i=e.indexOf(i,this.property)>=0),i},setValue:function(t,e){var n=this.model,i=0===e?0:1,r=n.getDefaultValue(),o=n.get("value")||r;(t||i)&&(o=t);var s=this.$input;s&&s.val(o)},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)},renderInput:function(){this.$input||(this.$input=$("",{placeholder:this.model.getDefaultValue(),type:"text"}),this.$el.find(this.inputHolderId).html(this.$input)),this.setValue(this.componentValue,0)},cleanValue:function(){this.setValue("")},render:function(){var t=this.el;return t.innerHTML=this.template(this.model),this.renderInput(),t.className=this.className,this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?I(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?I(t.line,e):n<0?I(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=_(c.from,a.from),f=_(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?_(c.to,n)>=0:_(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?_(c.from,i)<=0:_(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:L(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return L(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new I(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new I(i,s,c)}}return new I(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 I(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new I(n.line,l(t,1),"before"):new I(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function $t(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function It(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function _t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function zt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ft(t){It(t),_t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Os){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Os=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Os?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=L(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=I(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 pn(i.first,0,null,!0,-1);var r=N(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=L(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new I(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 Nn(t){t.state.focused||(t.display.input.focus(),Dn(t))}function On(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,In(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||($t(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Ln(t))}function In(t,e){t.state.delayingBlurEvent||(t.state.focused&&($t(t,"blur",t,e),t.state.focused=!1,$s(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function _n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&($(r.line,o),zn(r.line),r.rest))for(var c=0;c=s&&(o=N(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?I(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?I(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&_n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&$s(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&_n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),$i(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=Fn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){_n(t);var r=ti(t);En(t),ei(t,r),Ni(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){_n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Ni(t,i),n.finish()}}function $i(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Li(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Ni(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+je(t)+"px"}function Oi(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function Ii(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function _i(t){var e=Ii(t);return e.x*=xa,e.y*=xa,e}function zi(t,e){var n=Ii(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?I(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if(_(t,e.from)<0)return t;if(_(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),I(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==_(e.from,e.to)&&0==_(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||$t(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=_(e,r)<0;o!=_(n,r)<0?(r=e,e=n):o!=_(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&($t(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=_(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,I(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,I(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)$r(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else $r(t,e)}}function $r(t,e){if(1!=e.text.length||""!=e.text[0]||0!=_(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Or(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(Fr(t.history,e),i.push(t.history)),Or(t,e,null,Q(t,e))})}}function Lr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Or(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(Fr(t.history,r),a.push(t.history)),Or(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Nr(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(I(t.anchor.line+e,t.anchor.ch),I(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:I(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,zs)}}function Dr(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=L(ht(E(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&&Nt(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=Ot(t,"changes"),h=Ot(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function Ir(t,e,n,i,r){if(i||(i=n),_(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function _r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&$(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&$(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)Ir(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=L(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=L(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return I(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=_a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=_s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&(_((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&(_(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):Lo(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(It(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),On(t),setTimeout(function(){return r.input.focus()},20)}function $o(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(I(e.line,0),B(t.doc,I(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function Lo(t,e,n,i){function r(e){if(0!=_(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(I(m,x),I(m,x))):b.length>x&&r.push(new Ca(I(m,x),I(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,Fi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=$o(t,e,i.unit),S=C.anchor;_(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,Fi(T,d),Fs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=_(a,v)){t.curOp.focus=s(),r(a);var u=Fn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,It(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;It(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=$o(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,Fi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,Fi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,Fs):(d=0,br(c,new wa([u],0),Fs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function No(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&It(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ot(t,n))return zt(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return $t(t,n,t,N(t.doc,o),t.options.gutters[l],e),zt(e)}}}function Oo(t,e){return No(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||Io(t,e)||Lt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function Io(t,e){return!!Ot(t,"gutterContextMenu")&&No(t,e,"gutterContextMenu",!1)}function _o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function zo(t){Oi(t),mi(t),Rn(t)}function Fo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):($s(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Oi(this),_o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Ns,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):In(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Lt(t,e)){var n=Tn(t,e);if(n&&!Oo(t,e)&&!Re(t.display,e)){It(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Lt(t,e)||It(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Lt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(I(a.line,0),B(t.doc,I(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),It(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),$t(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return zi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return zi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Lt(t,e)||Ft(e)},over:function(e){Lt(t,e)||(Jr(t,e),Ft(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Lt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return In(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==_s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=I(f.line,f.ch-n):t.state.overwrite&&!s?p=I(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=I(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new I(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return z(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(I(i,0),I(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,$s=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ls=function(t){t.select()};xs?Ls=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ls=function(t){try{t.select()}catch(t){}});var Ns=function(){this.id=null};Ns.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Os,Ds,Is=30,_s={toString:function(){return"CodeMirror.Pass"}},zs={scroll:!1},Fs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return L(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ns,this.disableVert=new Ns},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=Fn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){Ot(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&_(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Lr(this,"undo")}),redo:gi(function(){Lr(this,"redo")}),undoSelection:gi(function(){Lr(this,"undo",!0)}),redoSelection:gi(function(){Lr(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=B(this,t),e=B(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}),B(this,I(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new I(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),I(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new I(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),I(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==_(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ns,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Lt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,zs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ls(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Lt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=I(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=L(e.view[0].line),a=e.view[0].node):(s=L(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=L(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,I(s,0),I(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=I(s,f),k=I(l,d.length?g(d).length-p:0);return h.length>1||h[0]||_(C,k)?(Ir(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Ns,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Lt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,zs):(i.prevInput="",s.value=e.text.join("\n"),Ls(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Lt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Lt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||It(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ls(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),zs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){Ft(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(I(i,o))}i++});for(var r=n.length-1;r>=0;r--)Ir(t.doc,e,n[r],I(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){_o(t),zo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),zo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),zo(t)},!0),e("firstLineNumber",1,zo,!0),e("lineNumberFormatter",function(t){return t},zo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(In(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,Fo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),$t(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),zs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,I(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if(_a.hasOwnProperty(t))return _a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),$t(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=_i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=_s,t.signal=$t,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=I,t.cmpPos=_,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=_a,t.keyMap=Ia,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=It,t.e_stopPropagation=_t,t.e_stop=Ft,t.addClass=a,t.contains=o,t.rmClass=$s,t.keyNames=La}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,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),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,n=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))n.set(i,r);else{var o=e.clone(n.get("attributes"));o[i]=r,n.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),i={placeholder:t.get("placeholder")||t.get("default"),type:t.get("type")||"text"};if(t.get("changeProp"))i.value=e.get(n);else{var r=e.get("attributes");i.value=t.get("value")||r[n]}t.get("min")&&(i.min=t.get("min")),t.get("max")&&(i.max=t.get("max")),this.$input=$("",i)}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return t},renderField:function(){if(!this.$input){this.$el.append(this.tmpl);var t=this.getInputEl();this.$el.find("."+this.inputhClass).prepend(t)}},render:function(){return this.renderLabel(),this.renderField(),this.el.className=this.className,this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},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(e,n){e.exports=t},function(t,e,n){"use strict";var i=(n(0),n(4));t.exports=i.extend({templateField:function(){var t=this.pfx;this.ppfx;return'\n
\n \n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.config=t.config||{},this.className=this.className+" "+this.pfx+"composite"},valueUpdated:function(){for(var t=arguments.length,e=Array(t),n=0;n",{value:0,type:"hidden"})),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=n(29),r=new i(this.getPropsConfig());this.$props=r.render().$el,this.$el.find("#"+this.pfx+"input-holder").html(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});if(i){var r=i.split(" ");n=e?e.model.parseValue(r[t]):r[t]}else n=e.getTargetValue({ignoreCustomValue:1});return n}})},function(t,e,n){"use strict";(function(e){var i=n(2);t.exports=i.extend({defaults:e.extend({},i.prototype.defaults,{type:"image",tagName:"img",src:"",void:1,droppable:0,highlightable:0,resizable:1,traits:["alt"]}),initialize:function(t,e){i.prototype.initialize.apply(this,arguments);var n=this.get("attributes");n.src&&this.set("src",n.src)},initToolbar:function(){for(var t=arguments.length,e=Array(t),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===h?"undefined":i(h))&&(d=Object.assign(d,h)),r.runCommand("resize",{el:t,options:d}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),s=i.style;if(!n)return void(s.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(s.opacity="",s.display="",!this.toolbar){i.innerHTML="",this.toolbar=new o(a);var l=new r({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else s.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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.contWindow||(this.contWindow=$(this.frameEl.contentWindow)),this.contWindow},run:function(t){this.editor=t&&t.get("Editor"),this.enable()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(49));t.exports=e.extend({},i,{init:function(t){e.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return L[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,$=!0===n.supportsAtComponent,L={};return L.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if($&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},L.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?L.top(t,e,n):(g="error","block")},L.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},L.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},L.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},L.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},L.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},L.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):L.atBlock(t,e,n)},L.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},L.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},L.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):L.atBlock(t,e,n)},L.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},L.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},L.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},L.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},L.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=L[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(19);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(99);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(21);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(101);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({tagName:"a",initialize:function(t,e){this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"btn "+this.model.get("class")},render:function(){return this.$el.addClass(this.className),this}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(110),o=n(111),s=n(121);return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new o(i.sectors),e=new s({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},render:function(){return e.render().el}}}},function(t,e,n){"use strict";var i=n(25),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(8);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(113),view:n(28),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(26),view:n(12),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(36),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(34),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(37),view:n(33),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(37),view:n(32),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"integer",model:n(119),view:n(30),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(4),isType:function(t){return t.type="base",t}}]})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Backbone.Model,r=Backbone.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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;n\n \n \n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.model,n=this.pfx;e.set("stackIndex",null),this.className=n+"property "+n+"stack",this.events["click #"+n+"add"]="addLayer",this.listenTo(e,"change:stackIndex",this.indexChanged),this.listenTo(e,"updateValue",this.valueUpdated),this.delegateEvents()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n ."+this.pfx+"field")),this.$layers||(this.$layers=new r({collection:this.getLayers(),stackModel:this.model,preview:this.model.get("preview"),config:this.config})),this.$field.append(this.$layers.render().el),this.$props.hide(),this},renderInput:function(){for(var t=arguments.length,e=Array(t),n=0;n",{class:"clear"})),this.$el.attr("class",this.pfx+"properties"),this}})},function(t,e,n){"use strict";var i=n(4),r=n(31);t.exports=i.extend({initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:unit",this.valueChanged),this.listenTo(this.model,"el:change",this.elementUpdated)},renderInput:function(){if(!this.input){var t=new r({model:this.model,ppfx:this.ppfx});this.input=t.render(),this.$el.append(this.input.$el),this.$input=this.input.inputEl,this.$unit=this.input.unitEl}this.setValue(this.componentValue)},setValue:function(t){this.input.setValue(t,{silent:1})}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({events:{},template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field";this.ppfx=i,this.docEl=$(document),this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){return this.inputEl||(this.inputEl=$("",{type:"text",class:this.inputCls,placeholder:this.model.get("defaults")})),this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='",this.unitEl=$(i)}}return this.unitEl&&this.unitEl.get(0)},upArrowClick:function(){var t=this.model.get("value");t=isNaN(t)?1:parseInt(t,10)+1;var e=this.validateInputValue(t);this.model.set("value",e.value),this.elementUpdated()},downArrowClick:function(){var t=this.model.get("value");t=isNaN(t)?0:parseInt(t,10)-1;var e=this.validateInputValue(t);this.model.set("value",e.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get("value");e=isNaN(e)?0:parseInt(e,10);var n={y:t.pageY,val:e};this.docEl.mouseup(n,this.upIncrement),this.docEl.mousemove(n,this.moveIncrement)},moveIncrement:function(t){this.moved=1;var e=parseInt(t.data.val-t.pageY+t.data.y,10);return this.prValue=this.validateInputValue(e).value,this.model.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(t){if(this.docEl.off("mouseup",this.upIncrement),this.docEl.off("mousemove",this.moveIncrement),this.prValue&&this.moved){var e=this.prValue-1;this.model.set("value",e,{avoidStore:1}).set("value",e+1),this.elementUpdated()}},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s\n \n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.model;this.list=e.get("list")||e.get("options")||[],this.className=this.className+" "+this.pfx+"list"},renderInput:function(){var t=this.pfx,n=this.ppfx,i=n+"radio-item-label",r=this.property;if(!this.$input&&this.list&&this.list.length){var o="";e.each(this.list,function(e){var s=e.className?e.className+" "+t+"icon "+i:"",a=r+"-"+e.value,l=e.name?e.name:e.value,c=e.title?'title="'+e.title+'"':"";o+='
"}),this.input=o,this.$inputEl=$(this.input),this.$el.find("#"+t+"input-holder").html(this.$inputEl),this.$input=this.$inputEl.find('input[name="'+this.property+'"]')}this.setValue(this.componentValue)},getInputValue:function(){return this.$input?this.$el.find("input:checked").val():""},setValue:function(t){var e=this.model.get("value")||this.model.getDefaultValue();t&&(e=t),this.$input&&this.$input.filter('[value="'+e+'"]').prop("checked",!0),this.model.set({value:e},{silent:!0})}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(4));t.exports=i.extend({templateField:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.model;this.list=e.get("list")||e.get("options")||[]},renderInput:function(){var t=this.pfx;if(!this.$input){var n="",this.input=n,this.$input=$(this.input),this.$el.find("#"+t+"input-holder").html(this.$input)}this.setValue(this.componentValue,0)}})}).call(e,n(1))},function(t,e,n){"use strict";var i=(n(0),n(4)),r=n(35);t.exports=i.extend({initialize:function(t){i.prototype.initialize.apply(this,arguments),this.className+=" "+this.pfx+"file"},renderInput:function(){if(!this.input){var t=new r({target:this.target,model:this.model,ppfx:this.ppfx});this.input=t.render(),this.$el.append(this.input.$el),this.$input=this.input.inputEl,this.$color=this.input.colorEl}this.setValue(this.componentValue)},setValue:function(t){this.input.setValue(t,{silent:1})}})},function(t,e,n){"use strict";(function(e){var i=(n(0),n(115));n(116);t.exports=i.extend({template:e.template('\n
input-holder\'>
\n
\n
\n
\n
\n
'),initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c",this.listenTo(this.model,"change:value",this.handleModelChange)},handleModelChange:function(){for(var t=arguments.length,e=Array(t),n=0;n",{class:this.colorCls}),n=e.get(0).style,i=this.target&&this.target.config?this.target.config.el:"";if(void 0===e.spectrum)throw"Spectrum missing, probably you load jQuery twice";e.spectrum({appendTo:i||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var e=1==t.getAlpha()?t.toHexString():t.toRgbString();n.backgroundColor=e},change:function(e){var i=1==e.getAlpha()?e.toHexString():e.toRgbString();i=i.replace(/ /g,""),n.backgroundColor=i,t.set("value",i)}}),this.colorEl=e}return this.colorEl},render:function(){for(var t=arguments.length,e=Array(t),n=0;n\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n \n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.assets=this.target.get("assets"),this.modal=this.target.get("Modal"),this.am=this.target.get("AssetManager"),this.className=this.className+" "+this.pfx+"file",this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},renderInput:function(){this.$input||(this.$input=$("",{placeholder:this.model.getDefaultValue(),type:"text"})),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){i.prototype.setValue.apply(this,arguments),this.setPreviewView(t&&t!=this.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e){t.exports=Backbone.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(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(129),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=Backbone.View.extend({template:e.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="text"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,o=this.config,s=o.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(42),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(43);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(7)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(142),o=n(143);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,void 0===this.model.get("open")&&this.model.set("open",!1),this.listenTo(this.model.get("components"),"remove add change reset",this.checkChildren),this.listenTo(this.model,"destroy remove",this.remove),this.listenTo(this.model,"change:status",this.updateStatus),this.listenTo(this.model,"change:open",this.updateOpening),this.className=this.pfx+"item no-select",this.editBtnCls=this.pfx+"nav-item-edit",this.inputNameCls=this.ppfx+"nav-comp-name",this.caretCls=this.ppfx+"nav-item-caret",this.titleCls=this.pfx+"title",this.events={},this.events["click > #"+this.pfx+"btn-eye"]="toggleVisibility",this.events["click ."+this.caretCls]="toggleOpening",this.events["click ."+this.titleCls]="handleSelect",this.events["click ."+this.editBtnCls]="handleEdit",this.events["blur ."+this.inputNameCls]="handleEditEnd",this.$el.data("model",this.model),this.$el.data("collection",this.model.get("components")),t.config.sortable&&(this.events["mousedown > #"+this.pfx+"move"]="startSort"),this.delegateEvents()},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){this.$eye||(this.$eye=this.$el.find("> #"+this.pfx+"btn-eye"));var n=e.clone(this.model.get("style")),i=this.pfx+"hide";this.isVisible()?(this.$el.addClass(i),this.$eye.addClass("fa-eye-slash"),n.display="none"):(this.$el.removeClass(i),this.$eye.removeClass("fa-eye-slash"),delete n.display),this.model.set("style",n)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.countChildren(this.model),e=this.pfx,n="> ."+e+"title-c > ."+e+"title";this.$counter||(this.$counter=this.$el.find("> #"+e+"counter")),t?(this.$el.find(n).removeClass(e+"no-chld"),this.$counter.html(t)):(this.$el.find(n).addClass(e+"no-chld"),this.$counter.empty(),this.model.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){var t=this.pfx;this.caret=this.$el.find("> ."+t+"title-c > ."+t+"title > ."+t+"title-inn > #"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.level+1;return this.$el.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:a})),void 0===i&&(i=n(52)),this.$components=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:a}).render().$el,this.$el.find("."+r+"children").html(this.$components),t.get("draggable")&&this.config.sortable||this.$el.find("> #"+r+"move").detach(),o||(this.className+=" "+r+"hide"),this.$el.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(51);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r,a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l},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=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.isCountable(e,this.config.hideTextnode)&&this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(55)},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t=n(56),e=n(57),r=n(212),o=new r,s=[];return{editors:s,plugins:o,init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.container;if((0,i.isUndefined)($))throw"jQuery not found";if(!r)throw new Error("'container' is required");(0,i.defaults)(n,t),n.el=r instanceof window.HTMLElement?r:document.querySelector(r);var a=new e(n).init();return n.plugins.forEach(function(t){var e=o.get(t);e?e(a,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),a.getModel().loadOnStart(),n.autorender&&a.render(),s.push(a),a}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(58),r=n(59),o=n(211);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("rte"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i,r=[n(60),n(64),n(68),n(73),n(77),n(81),n(85),n(97),n(103),n(23),n(123),n(134),n(139),n(163),n(169),n(194),n(202)],o=n(0),s=n(209),a=n(48);o.$||(o.$=$),t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.temporary||(i&&clearInterval(i),i=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=$(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()}})},function(t,e,n){"use strict";t.exports=function(){var t=n(61),e=n(62),i=n(63);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},e.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var n=t||{};this.elT=0,this.elL=0,this.borderOffset=n.borderOffset||10;var i=n.container;this.el="string"==typeof i?document.querySelector(i):i,this.$el=$(this.el),this.containerSel=n.containerSel||"div",this.itemSel=n.itemSel||"div",this.draggable=n.draggable||!0,this.nested=n.nested||0,this.pfx=n.pfx||"",this.ppfx=n.ppfx||"",this.freezeClass=n.freezeClass||this.pfx+"freezed",this.onStart=n.onStart||"",this.onEndMove=n.onEndMove||"",this.direction=n.direction||"v",this.onMoveClb=n.onMove||"",this.relative=n.relative||0,this.ignoreViewChildren=n.ignoreViewChildren||0,this.ignoreModels=n.ignoreModels||0,this.plh=n.placer||"",this.wmargin=n.wmargin||0,this.offTop=n.offsetTop||0,this.offLeft=n.offsetLeft||0,this.document=n.document||document,this.$document=$(this.document),this.dropContent=null,this.em=n.em||"",this.dragHelper=null,this.canvasRelative=n.canvasRelative||0,this.selectOnEnd=!n.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=$(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",i=t.cloneNode(1),r="",o=getComputedStyle(t),s=0;ss||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]:{};return i(this,t),this.setOptions(e),this}return r(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=$([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){$([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}},function(t,e,n){"use strict";var i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=$(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";t.exports=function(){var t={},e=n(65),i=n(66),r=n(67),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(74),o=n(75),s=n(76);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(80);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.hide(),this.$input.show().focus()},endNewTag:function(t){this.$addBtn.show(),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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(7);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),events:{},initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this.target.get("selectedComponent");e&&e.get("classes").remove(this.model),this.coll&&(this.coll.remove(this.model),this.target.trigger("targetClassRemoved")),this.remove()},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input"));var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(82),o=n(83),s=n(84);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},getCollector:function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},getContent:function(){return this.$content||(this.$content=this.$el.find("."+this.pfx+"content #"+this.pfx+"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();this.getCollector().append(t.children()),t.html(this.model.get("content"))},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(86),i=n(87),r=n(88),o=n(89),s=n(90),a=n(91),l=n(96),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(5);n(92),n(17),n(95);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(5),n(93),n(94),n(17))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(5))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(5))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(It),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(It.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(It),r("operator","operator",t.current());if(Ot.test(n)){t.eatWhile(Ot);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if($t&&"@"==e.peek()&&e.match(_t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Nt){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=zt.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(Ot.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Lt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Nt&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Nt&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),z):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?O:N;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return Ft.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f($,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?O:N,v):"operator"==t?/\+\+|--/.test(e)||Nt&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f($,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(F,i):"["==t?p(y("]"),M,x("]"),b,i):Nt&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function $(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p($):p(C,L)}function L(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p($)}function N(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?_:I):"variable"==e&&Nt?p(J,t?A:P):f(t?k:C)}}function I(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function _(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function z(t){return":"==t?p(b,w):f(P,x(";"),b)}function F(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=$t?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Nt&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Nt&&","==t?p(Nt?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Nt?gt:ct,pt)):"["==t?p(C,x("]"),Nt?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||It.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,$t=n.jsonld,Lt=n.json||$t,Nt=n.typescript,Ot=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Nt){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),It=/[+\-*&%=<>!?|~^@]/,_t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,zt="([{}])",Ft={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Lt?null:"/*",blockCommentEnd:Lt?null:"*/",lineComment:Lt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Lt?"json":"javascript",jsonldMode:$t,jsonMode:Lt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(5))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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").html(this.model.get("input")),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(98),o=n(18),s=n(100),a=(n(20),n(102));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(19);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(18);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e){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=n(0);t.exports=r.View.extend({tagName:"span",initialize:function(t){e.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var n=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(n?" "+n:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append($("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",$(document).on("mouseup",this.stopDrag)},stopDrag:function(){$(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),$(document).on("mouseup",this.stopTimer)},stopTimer:function(){$(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),$(document).on("mousedown",this.hideButtons),$(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&$(t.target).trigger("click"),this.model.set("bntsVis",!1),$(document).off("mousedown",this.hideButtons),$(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":i(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(21),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append($("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(20);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i,r,o={},s=n(104),a=(n(105),n(106)),l=n(108);return{customRte:null,name:"rte",init:function(n){r=this,o=n||{};for(var c in s)c in o||(o[c]=s[c]);var u=o.pStylePrefix;return u&&(o.stylePrefix=u+o.stylePrefix),t=o.stylePrefix,i=new a(o.commands),e=new l({collection:i,config:o}),this},add:function(t,e){var n=e||{};return n.command=t,i.add(n)},get:function(t){return i.where({command:t})[0]},getAll:function(){return i},udpatePosition:function(){var t=o.em.get("Canvas"),n=t.getTargetToElementDim(e.el,this.lastEl,{event:"rteToolbarPosUpdate"});o.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var i=e.el.style;i.top=n.top+"px",i.left=n.left+"px"},attach:function(t,n){this.lastEl=t.el;var i=t.getChildrenContainer(),r=this.customRte;return r?n=r.enable(i,n):$(i).wysiwyg({}).focus(),this.show(),o.em&&(setTimeout(this.udpatePosition.bind(this),0),o.em.off("change:canvasOffset",this.udpatePosition,this),o.em.on("change:canvasOffset",this.udpatePosition,this),o.em.off("canvasScroll",this.udpatePosition,this),o.em.on("canvasScroll",this.udpatePosition,this)),e.$el.on("mousedown",this.disableProp),n},detach:function(t,n){var i=this.customRte,r=t.getChildrenContainer();i?(t.model.set("content",r.innerHTML),i.disable(r,n)):$(r).wysiwyg("destroy"),this.hide(),e.$el.off("mousedown",this.disableProp)},focus:function(t,e){var n=this.customRte,i=t.getChildrenContainer();n?n.focus&&n.focus(i,e):this.attach(t)},show:function(){e.el.style.display="block"},hide:function(){e.el.style.display="none"},disableProp:function(t){t.stopPropagation()},getToolbarEl:function(){return e.el},render:function(){return e.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",toolbarId:"toolbar",adjustToolbar:1,commands:[{command:"bold",title:"Bold",class:"fa fa-bold"},{command:"italic",title:"Italic",class:"fa fa-italic"},{command:"underline",title:"Underline",class:"fa fa-underline"},{command:"strikethrough",title:"Strikethrough",class:"fa fa-strikethrough",group:"format"},{command:"insertHTML",title:"Link",class:"fa fa-link",args:'${content}'}]}},function(t,e,n){"use strict";var i=function(t){var e=$.Deferred(),n=new FileReader;return n.onload=function(t){e.resolve(t.target.result)},n.onerror=e.reject,n.onprogress=e.notify,n.readAsDataURL(t),e.promise()};$.fn.cleanHtml=function(){var t=$(this).html();return t&&t.replace(/(
|\s|

<\/div>| )*$/,"")},$.fn.wysiwyg=function(t){var e,n,r,o=this,s=function(){var t=n.activeToolbarClass;t&&$(n.toolbarSelector).find(r).each(function(){var e=$(this),i=e.data(n.commandRole);o.get(0).ownerDocument.queryCommandState(i)?e.addClass(t):e.removeClass(t)})},a=function(t,e){var n=t.split(" "),i=n.shift(),r=n.join(" ")+(e||"");o.get(0).ownerDocument.execCommand("styleWithCSS",!1,!0),o.get(0).ownerDocument.execCommand(i,0,r),s(),o.trigger("change")},l=function(){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount)return t.getRangeAt(0)},c=function(){e=l()},u=function(){var t=window.getSelection();if(e){try{t.removeAllRanges()}catch(t){document.body.createTextRange().select(),document.selection.empty()}t.addRange(e)}},h=function(t){o.focus(),$.each(t,function(t,e){/^image\//.test(e.type)?$.when(i(e)).done(function(t){a("insertimage",t)}).fail(function(t){n.fileUploadError("file-reader",t)}):n.fileUploadError("unsupported-file-type",e.type)})},d=function(t,e){u(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,e||"transparent"),c(),t.data(n.selectionMarker,e)};if("string"==typeof t&&"destroy"==t)return o.attr("contenteditable",!1).unbind("mouseup keyup mouseout dragenter dragover"),$(window).unbind("touchend"),this;n=$.extend({},$.fn.wysiwyg.defaults,t);var f="[data-"+n.commandRole+"]";return r="a"+f+",button"+f+",input[type=button]"+f+", select"+f,n.dragAndDropImages&&function(){o.on("dragenter dragover",!1).on("drop",function(t){var e=t.originalEvent.dataTransfer;t.stopPropagation(),t.preventDefault(),e&&e.files&&e.files.length>0&&h(e.files)})}(),function(t,e){t.find(r).unbind().click(function(){u();var t=o.get(0).ownerDocument,n=$(this),i=n.data(e.commandRole),r=n.data("args");r?(r=r.replace("${content}",t.getSelection()),a(i,r)):t.execCommand(i),c()}),t.find("[data-toggle=dropdown]").click(u);var n="[data-"+e.commandRole+"]";t.find("select"+n).on("webkitspeechchange change",function(){var t=this.value;u(),t&&(o.focus(),a($(this).data(e.commandRole),t)),c()}),t.find("input[type=text]"+n,", select"+n).on("webkitspeechchange change",function(){var t=this.value;this.value="",u(),t&&(o.focus(),a($(this).data(e.commandRole),t)),c()}).on("focus",function(){var t=$(this);t.data(e.selectionMarker)||(d(t,e.selectionColor),t.focus())}).on("blur",function(){var t=$(this);t.data(e.selectionMarker)&&d(t,!1)}),t.find("input[type=file][data-"+e.commandRole+"]").change(function(){u(),"file"===this.type&&this.files&&this.files.length>0&&h(this.files),c(),this.value=""})}($(n.toolbarSelector),n),o.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){c(),s()}),$(window).bind("touchend",function(t){var e=o.is(t.target)||o.has(t.target).length>0,n=l();n&&n.startContainer===n.endContainer&&n.startOffset===n.endOffset&&!e||(c(),s())}),this},$.fn.wysiwyg.defaults={toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(t,e){console.log("File upload error",t,e)}},t.exports=$},function(t,e,n){"use strict";var i=n(0),r=n(107);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({idAttribute:"command",defaults:{command:"",type:"",title:"",class:"",options:[]},initialize:function(){this.get("options").length&&this.set("type","select")}})},function(t,e,n){"use strict";var i=n(0),r=n(22),o=n(109);t.exports=i.View.extend({attributes:{"data-role":"editor-toolbar"},initialize:function(t){this.config=t.config||{};var e=this.config.stylePrefix||"";this.id=e+this.config.toolbarId,this.listenTo(this.collection,"add",this.addTo),this.$el.data("helper",1)},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=r;switch(t.get("type")){case"select":i=o}var s=t.get("args"),a={title:t.get("title"),"data-edit":t.get("command")};s&&(a["data-args"]=s);var l=new i({model:t,attributes:a},this.config),c=l.render().el;n?n.appendChild(c):this.$el.append(c)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this.$el.attr("id",this.id),this}})},function(t,e,n){"use strict";var i=(n(0),n(22));t.exports=i.extend({initialize:function(t,e){i.prototype.initialize.apply(this,arguments)},getInput:function(){var t=this.model;if(!this.input){var e=t.get("command"),n='",this.input=$(n)}return this.input},getInputCont:function(){var t=this.getInput(),e=this.ppfx;return $('
').append(t)},render:function(){for(var t=arguments.length,e=Array(t),n=0;n"),initialize:function(t){var e=t||{},n=e.ppfx||"";this.target=e.target||{},this.inputClass=n+"field",this.inputHolderClass=n+"input-holder",this.ppfx=n,this.listenTo(this.model,"change:value",this.handleModelChange)},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value)},setValue:function(t,e){var n=e||{},i=this.model;i.set({value:t||i.get("defaults")},n),n.silent&&this.handleModelChange()},handleModelChange:function(){this.getInputEl().value=this.model.get("value")},getInputEl:function(){return this.inputEl||(this.inputEl=$("",{type:"text",class:this.inputCls,placeholder:this.model.get("defaults")})),this.inputEl.get(0)},render:function(){var t=this.$el;return t.addClass(this.inputClass),t.html(this.template({holderClass:this.inputHolderClass,ppfx:this.ppfx})),t.find("."+this.inputHolderClass).html(this.getInputEl()),this}})}).call(e,n(1))},function(t,e,n){var i,r,o;!function(s){"use strict";r=[n(11)],i=s,void 0!==(o="function"==typeof i?i.apply(e,r):i)&&(t.exports=o)}(function(t,e){"use strict";function n(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function i(){for(var t=0;t1&&(delete window.localStorage[G],t.each(e,function(t,e){b(e)}))}catch(t){}try{gt=window.localStorage[G].split(";")}catch(t){}}}function b(e){if(K){var n=tinycolor(e).toRgbString();if(!pt[n]&&-1===t.inArray(n,gt))for(gt.push(n);gt.length>mt;)gt.shift();if(G&&window.localStorage)try{window.localStorage[G]=gt.join(";")}catch(t){}}}function x(){var t=[];if(U.showPalette)for(var e=0;eMath.abs(e-r);yt=o?"x":"y"}}else yt=null;var s=!yt||"x"===yt,a=!yt||"y"===yt;s&&(ct=parseFloat(t/tt)),a&&(ut=parseFloat((et-e)/et)),Gt=!1,U.showAlpha||(ht=1),I()},k,S),Wt?(N(Wt),_(),qt=U.preferredFormat||tinycolor(Wt).format,b(Wt)):_(),q&&E();var i=g?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Nt.delegate(".sp-thumb-el",i,e),Ot.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Xt={show:E,hide:$,toggle:M,reflow:R,option:V,enable:B,disable:j,offset:W,set:function(t){N(t),F()},get:O,destroy:H,container:Ct};return Xt.id=p.push(Xt)-1,Xt}function s(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth+t(s).scrollLeft(),c=a.clientHeight+t(s).scrollTop(),u=n.offset();return u.top+=o,u.left-=Math.min(u.left,u.left+i>l&&l>i?Math.abs(u.left+i-l):0),u.top-=Math.min(u.top,u.top+r>c&&c>r?Math.abs(r+o-0):0),u}function a(){}function l(t){t.stopPropagation()}function c(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function u(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(g&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),m=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,m,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(m),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(m),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,m={};m.selectstart=o,m.dragstart=o,m["touchmove mousemove"]=s,m["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function h(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function d(){return t.fn.spectrum.inputTypeColorSupport()}var f={beforeShow:a,move:a,change:a,show:a,hide:a,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},p=[],g=!!/msie/i.exec(window.navigator.userAgent),m=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),v=["
","
","
","
"].join(""),y=function(){var t="";if(g)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=p[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=o(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=u,t.fn.spectrum.defaults=f,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&&!d()&&e.spectrum({preferredFormat:"hex6"})},function(){function t(t){var n={r:0,g:0,b:0},r=1,s=!1,a=!1;return"string"==typeof t&&(t=L(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=e(t.r,t.g,t.b),s=!0,a="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=P(t.s),t.v=P(t.v),n=o(t.h,t.s,t.v),s=!0,a="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=P(t.s),t.l=P(t.l),n=i(t.h,t.s,t.l),s=!0,a="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=w(r),{ok:s,format:t.format||a,r:z(255,F(n.r,0)),g:z(255,F(n.g,0)),b:z(255,F(n.b,0)),a:r}}function e(t,e,n){return{r:255*C(t,255),g:255*C(e,255),b:255*C(n,255)}}function n(t,e,n){t=C(t,255),e=C(e,255),n=C(n,255);var i,r,o=F(t,e,n),s=z(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=C(t,360),e=C(e,100),n=C(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function r(t,e,n){t=C(t,255),e=C(e,255),n=C(n,255);var i,r,o=F(t,e,n),s=z(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(H(i));return o}function x(t,e){e=e||6;for(var n=H(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(H({h:i,s:r,v:o})),o=(o+a)%1;return s}function w(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(t,e){T(t)&&(t="100%");var n=M(t);return t=z(e,F(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),I.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function k(t){return z(1,F(0,t))}function S(t){return parseInt(t,16)}function T(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function M(t){return"string"==typeof t&&-1!=t.indexOf("%")}function E(t){return 1==t.length?"0"+t:""+t}function P(t){return t<=1&&(t=100*t+"%"),t}function A(t){return Math.round(255*parseFloat(t)).toString(16)}function $(t){return S(t)/255}function L(t){t=t.replace(N,"").replace(O,"").toLowerCase();var e=!1;if(V[t])t=V[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=j.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=j.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=j.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=j.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=j.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=j.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=j.hex8.exec(t))?{a:$(n[1]),r:S(n[2]),g:S(n[3]),b:S(n[4]),format:e?"name":"hex8"}:(n=j.hex6.exec(t))?{r:S(n[1]),g:S(n[2]),b:S(n[3]),format:e?"name":"hex"}:!!(n=j.hex3.exec(t))&&{r:S(n[1]+""+n[1]),g:S(n[2]+""+n[2]),b:S(n[3]+""+n[3]),format:e?"name":"hex"}}var N=/^[\s,#]+/,O=/\s+$/,D=0,I=Math,_=I.round,z=I.min,F=I.max,R=I.random,H=function(e,n){if(e=e||"",n=n||{},e instanceof H)return e;if(!(this instanceof H))return new H(e,n);var i=t(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=_(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=_(this._r)),this._g<1&&(this._g=_(this._g)),this._b<1&&(this._b=_(this._b)),this._ok=i.ok,this._tc_id=D++};H.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=_(100*this._a)/100,this},toHsv:function(){var t=r(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=r(this._r,this._g,this._b),e=_(360*t.h),n=_(100*t.s),i=_(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=_(360*t.h),i=_(100*t.s),r=_(100*t.l);return 1==this._a?"hsl("+e+", "+i+"%, "+r+"%)":"hsla("+e+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return s(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:_(this._r),g:_(this._g),b:_(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+_(this._r)+", "+_(this._g)+", "+_(this._b)+")":"rgba("+_(this._r)+", "+_(this._g)+", "+_(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:_(100*C(this._r,255))+"%",g:_(100*C(this._g,255))+"%",b:_(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+_(100*C(this._r,255))+"%, "+_(100*C(this._g,255))+"%, "+_(100*C(this._b,255))+"%)":"rgba("+_(100*C(this._r,255))+"%, "+_(100*C(this._g,255))+"%, "+_(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B[s(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, ":"";if(t){n=H(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(h,arguments)},brighten:function(){return this._applyModification(d,arguments)},darken:function(){return this._applyModification(f,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(b,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(y,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(v,arguments)}},H.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]="a"===i?t[i]:P(t[i]));t=n}return H(t,e)},H.equals=function(t,e){return!(!t||!e)&&H(t).toRgbString()==H(e).toRgbString()},H.random=function(){return H.fromRatio({r:R(),g:R(),b:R()})},H.mix=function(t,e,n){n=0===n?0:n||50;var i,r=H(t).toRgb(),o=H(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 H(u)},H.readability=function(t,e){var n=H(t),i=H(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}},H.isReadable=function(t,e){var n=H.readability(t,e);return n.brightness>125&&n.color>500},H.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=H(e[o]))}return n};var V=H.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=H.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(V),j=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=H}(),t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})})},function(t,e,n){"use strict";var i=n(0),r=n(118);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||"";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=r;void 0!==this.preview&&t.set("preview",this.preview);var s=new o({model:t,stackModel:this.stackModel,config:this.config,sorter:this.sorter}),a=s.render().el;if(i)i.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},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";(function(e){var i=n(0);t.exports=i.View.extend({events:{click:"updateIndex"},template:e.template('\n
\n \n
\n
<%= label %>
\n
\n \t
\n
\n
\n
\n
'),initialize:function(t){var e=this.model;this.stackModel=t.stackModel||{},this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"layer",this.sorter=t.sorter||null,this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.valueChanged),this.listenTo(e,"change:props",this.showProps),this.events["click #"+this.pfx+"close-layer"]="remove",this.events["mousedown > #"+this.pfx+"move"]="initSorter",e.get("preview")||this.$el.addClass(this.pfx+"no-preview"),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e),this.delegateEvents()},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},getProps:function(){return this.stackModel.get?this.stackModel.get("properties"):null},valueChanged:function(){var t=this.model.get("preview");if(t){this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview"));var e=this.getProps(),n=this.$preview;"function"==typeof t?t(e,n):this.onPreview(e,n)}},onPreview:function(t,e){var n=this.model.get("value").split(" "),i="";if(t.each(function(t,e){var r=n[e]||"";if(r&&"integer"==t.get("type")){var o=parseInt(r,10),s=r.replace(o,"");o=isNaN(o)?0:o,o>3&&(o=3),o<-3&&(o=-3),r=o+s}i+=r+" "}),this.stackModel.get){var r=this.stackModel.get("property");r&&(this.$preview.get(0).style[r]=i)}},showProps:function(){this.$props=this.model.get("props"),this.$el.find("#"+this.pfx+"inputs").html(this.$props.show()),this.model.set({props:null},{silent:!0})},remove:function(t){this.$props&&this.$props.detach(),t&&t.stopPropagation&&t.stopPropagation(),i.View.prototype.remove.apply(this,arguments),this.model.collection.contains(this.model)&&this.model.collection.remove(this.model),this.stackModel&&this.stackModel.set&&(this.stackModel.set({stackIndex:null},{silent:!0}),this.stackModel.trigger("updateValue"))},updateIndex:function(t){var e=this.getIndex();this.stackModel.set("stackIndex",e),this.model.collection&&this.model.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"active")},getIndex:function(){var t=0,e=this.model;return e.collection&&(t=e.collection.indexOf(e)),t},render:function(){return this.$el.html(this.template({label:"Layer "+this.model.get("index"),pfx:this.pfx})),this.$el.attr("class",this.className),this.valueChanged(),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(8);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{units:[],unit:""}),getFullValue:function(){var t=this.get("value")+this.get("unit");return i.prototype.getFullValue.apply(this,[t])}})},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 <%= label %>\n
'),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.open=this.model.get("open"),this.caretR="fa-caret-right",this.caretD="fa-caret-down",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"updateVisibility",this.updateVisibility),this.events["click ."+this.pfx+"title"]="toggle",this.delegateEvents()},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.$el.find("."+this.pfx+"properties").show(),this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+"open"),this.$el.find("."+this.pfx+"properties").hide(),this.$caret.removeClass(this.caretD).addClass(this.caretR)},toggle:function(){var t=this.model.get("open")?0:1;this.model.set("open",t)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(124),i=n(125),r=n(128),o=n(40),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(25),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(126),view:n(38),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(127);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";n(39),n(38),n(40);t.exports=Backbone.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},toggleNoAssets:function(t){var e=this.$el.find("."+this.pfx+"assets");t?e.empty():e.append(this.config.noAssets)},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";Object.defineProperty(e,"__esModule",{value:!0});var i=n(130),r=function(t){return t&&t.__esModule?t:{default:t}}(i);window.Promise=window.Promise||r.default,e.default="function"==typeof fetch?fetch.bind():function(t,e){return new r.default(function(n,i){var o=new XMLHttpRequest;o.open(e.method||"get",t),o.withCredentials="include"==e.credentials;for(var s in e.headers||{})o.setRequestHeader(s,e.headers[s]);o.onload=function(t){return n({status:o.status,statusText:o.statusText,text:function(){return r.default.resolve(o.responseText)}})},o.onerror=i,o.upload&&e.onProgress&&(o.upload.onprogress=e.onProgress),o.send(e.body)})}},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(132),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;na.top+a.height?a.top+a.height:g;var m={top:g,left:p,elementTop:a.top,elementLeft:a.left,elementWidth:a.width,elementHeight:a.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&i.em&&i.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=s.getFrameOffset(1),t.on("mousemove",this.autoscroll),t.on("mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},stopAutoscroll:function(){this.dragging=0;var t=this.getScrollListeners();t.off("mousemove",this.autoscroll),t.off("mouseup",this.stopAutoscroll)},getScrollListeners:function(){return this.scrollListeners||(this.scrollListeners=$(this.getFrameEl().contentWindow,this.getElement())),this.scrollListeners},getFrameWrapperEl:function(){return s.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(166);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(168);t.exports=i.View.extend({initialize:function(t){e.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=$(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),o=e.get("Config"),s=this.config,a=o.protectedCss,l="";s.styles.forEach(function(t){l+=''});var c="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(o.canvasCss||"")+"\n "+(a||"")+"\n ";l&&i.append(l),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 u=document,h=this.frame.el.contentDocument,d=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};h.addEventListener("keydown",function(t){u.dispatchEvent(d(t))}),h.addEventListener("keyup",function(t){u.dispatchEvent(d(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=$("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html(""),t.scriptContainer.append(" diff --git a/package.json b/package.json index d6e9a52ecf..bd8c427ceb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grapesjs", "description": "Free and Open Source Web Builder Framework", - "version": "0.10.6", + "version": "0.10.7", "author": "Artur Arseniev", "license": "BSD-3-Clause", "homepage": "http://grapesjs.com", diff --git a/src/styles/scss/_gjs_variables.scss b/src/styles/scss/_gjs_variables.scss index 414b7fcfb4..f03c8e05e6 100644 --- a/src/styles/scss/_gjs_variables.scss +++ b/src/styles/scss/_gjs_variables.scss @@ -31,7 +31,7 @@ $fontColor: #9299a3; $fontColorActive: #4f8ef7; */ -$mainDkColor: rgba(0, 0, 0, 0.3) !default;/* darken($mainColor, 4%) - #383838 */ +$mainDkColor: rgba(0, 0, 0, 0.2) !default;/* darken($mainColor, 4%) - #383838 */ $mainDklColor: rgba(0, 0, 0, 0.1) !default; $mainLhColor: rgba(255, 255, 255, 0.1) !default; /* #515151 */ $mainLhlColor: rgba(255, 255, 255, 0.7) !default; From 10eb0adc1ac3b2b2ece52dd3d3c01ab632efcd70 Mon Sep 17 00:00:00 2001 From: Santiago Petrone Date: Fri, 22 Sep 2017 11:13:51 -0300 Subject: [PATCH 025/143] Indent variables Replace tabs with spaces and ident values to a single column --- src/styles/scss/_gjs_variables.scss | 102 ++++++++++++++-------------- 1 file changed, 50 insertions(+), 52 deletions(-) diff --git a/src/styles/scss/_gjs_variables.scss b/src/styles/scss/_gjs_variables.scss index f03c8e05e6..fb79eb54d7 100644 --- a/src/styles/scss/_gjs_variables.scss +++ b/src/styles/scss/_gjs_variables.scss @@ -1,78 +1,76 @@ - - /* Class names prefixes */ -$app-prefix: 'gjs-' !default; -$nv-prefix: $app-prefix + 'nv-' !default; -$rte-prefix: $app-prefix + 'rte-' !default; -$comp-prefix: $app-prefix + 'comp-' !default; -$mdl-prefix: $app-prefix + 'mdl-' !default; -$am-prefix: $app-prefix + 'am-' !default; -$cm-prefix: $app-prefix + 'cm-' !default; -$pn-prefix: $app-prefix + 'pn-' !default; -$com-prefix: $app-prefix + 'com-' !default; -$sm-prefix: $app-prefix + 'sm-' !default; -$cv-prefix: $app-prefix + 'cv-' !default; -$clm-prefix: $app-prefix + 'clm-' !default; -$trt-prefix: $app-prefix + 'trt-' !default; +$app-prefix: 'gjs-' !default; +$nv-prefix: $app-prefix + 'nv-' !default; +$rte-prefix: $app-prefix + 'rte-' !default; +$comp-prefix: $app-prefix + 'comp-' !default; +$mdl-prefix: $app-prefix + 'mdl-' !default; +$am-prefix: $app-prefix + 'am-' !default; +$cm-prefix: $app-prefix + 'cm-' !default; +$pn-prefix: $app-prefix + 'pn-' !default; +$com-prefix: $app-prefix + 'com-' !default; +$sm-prefix: $app-prefix + 'sm-' !default; +$cv-prefix: $app-prefix + 'cv-' !default; +$clm-prefix: $app-prefix + 'clm-' !default; +$trt-prefix: $app-prefix + 'trt-' !default; /* Colors / Theme */ /* Dark theme */ -$mainColor: #444 !default; /* Light: #573454 Dark: #3b2639 -moz-linear-gradient(top, #fca99b 0%, #6e2842 100%) */ -$fontColor: #ddd !default; /* l: #d8d7db */ -$fontColorActive: #f8f8f8 !default; +$mainColor: #444 !default; /* Light: #573454 Dark: #3b2639 -moz-linear-gradient(top, #fca99b 0%, #6e2842 100%) */ +$fontColor: #ddd !default; /* l: #d8d7db */ +$fontColorActive: #f8f8f8 !default; /* Light theme -$mainColor: #fff; -$fontColor: #9299a3; -$fontColorActive: #4f8ef7; +$mainColor: #fff; +$fontColor: #9299a3; +$fontColorActive: #4f8ef7; */ -$mainDkColor: rgba(0, 0, 0, 0.2) !default;/* darken($mainColor, 4%) - #383838 */ -$mainDklColor: rgba(0, 0, 0, 0.1) !default; -$mainLhColor: rgba(255, 255, 255, 0.1) !default; /* #515151 */ -$mainLhlColor: rgba(255, 255, 255, 0.7) !default; -$fontColorDk: #777 !default; -$mainFont: Helvetica, sans-serif !default; -$colorBlue: #3b97e3 !default; -$colorRed: #dd3636 !default; -$colorYell: #ffca6f !default; -$colorGreen: #62c462 !default; -$tagBg: #804f7b !default; -$secColor: $tagBg !default; -$imageCompDim: 50px !default; -$leftWidth: 15% !default; +$mainDkColor: rgba(0, 0, 0, 0.2) !default;/* darken($mainColor, 4%) - #383838 */ +$mainDklColor: rgba(0, 0, 0, 0.1) !default; +$mainLhColor: rgba(255, 255, 255, 0.1) !default; /* #515151 */ +$mainLhlColor: rgba(255, 255, 255, 0.7) !default; +$fontColorDk: #777 !default; +$mainFont: Helvetica, sans-serif !default; +$colorBlue: #3b97e3 !default; +$colorRed: #dd3636 !default; +$colorYell: #ffca6f !default; +$colorGreen: #62c462 !default; +$tagBg: #804f7b !default; +$secColor: $tagBg !default; +$imageCompDim: 50px !default; +$leftWidth: 15% !default; /* Color Helpers */ -$colorHighlight: #71b7f1 !default; -$colorWarn: #ffca6f !default; +$colorHighlight: #71b7f1 !default; +$colorWarn: #ffca6f !default; /* Canvas */ -$hndlMargin: -5px !default; +$hndlMargin: -5px !default; /* Components / Inputs */ -$lightBorder: rgba(255, 255, 255, 0.05) !default; -$inputFontColor: $mainLhlColor !default; /* #d5d5d5 */ -$arrowColor: $mainLhlColor !default; /* b1b1b1 */ -$darkTextShadow: $mainDkColor !default; /* #252525 */ -$darkBorder: rgba(0, 0, 0, 0.15) !default; /* 303030 */ -$colorpSize: 22px !default; -$inputPadding: 5px !default; // Has to be a single value +$lightBorder: rgba(255, 255, 255, 0.05) !default; +$inputFontColor: $mainLhlColor !default; /* #d5d5d5 */ +$arrowColor: $mainLhlColor !default; /* b1b1b1 */ +$darkTextShadow: $mainDkColor !default; /* #252525 */ +$darkBorder: rgba(0, 0, 0, 0.15) !default; /* 303030 */ +$colorpSize: 22px !default; +$inputPadding: 5px !default; // Has to be a single value /* Class manager */ -$addBtnBg: lighten($mainDkColor, 10%) !default; -$paddElClm: 5px 6px !default; +$addBtnBg: lighten($mainDkColor, 10%) !default; +$paddElClm: 5px 6px !default; /* File uploader */ -$uploadPadding: 150px 10px !default; +$uploadPadding: 150px 10px !default; /* Commands */ -$animSpeed: 0.2s !default; +$animSpeed: 0.2s !default; /* Fonts */ -$fontPath: '../fonts' !default; -$fontName: 'main-fonts' !default; -$fontV: 20 !default;//random(1000) +$fontPath: '../fonts' !default; +$fontName: 'main-fonts' !default; +$fontV: 20 !default;//random(1000) From d6596381549bfbcf22e21f633f594811b1fa2b5f Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sat, 23 Sep 2017 11:16:10 +0200 Subject: [PATCH 026/143] StyleManager style update --- dist/css/grapes.min.css | 2 +- src/styles/scss/_gjs_style_manager.scss | 44 ++++++++++++++----------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index b1978b4cb6..2f99df5267 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-label,.gjs-clm-tags .gjs-sm-label{margin:5px 5px 2px 0}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-properties,.gjs-clm-tags .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.2)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:11px;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.2)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/src/styles/scss/_gjs_style_manager.scss b/src/styles/scss/_gjs_style_manager.scss index b032916279..bbc9ebaaab 100644 --- a/src/styles/scss/_gjs_style_manager.scss +++ b/src/styles/scss/_gjs_style_manager.scss @@ -5,6 +5,26 @@ line-height: 0; cursor: pointer; } + + &header { + font-size: 11px; + font-weight: lighter; + padding: 10px; + } + + &properties { + font-size: 11px; + padding: 10px 5px; + display: flex; + flex-wrap: wrap; + align-items: flex-end; + box-sizing: border-box; + width: 100%; + } + + &label { + margin: 5px 5px 3px 0; + } } .#{$sm-prefix}close-btn { @@ -22,12 +42,6 @@ } } -.#{$sm-prefix}header { - font-size: 11px; - font-weight: lighter; - padding: 10px; -} - .#{$sm-prefix}sector { clear: both; font-weight: lighter; @@ -46,10 +60,6 @@ @extend .#{$app-prefix}category-title; } - .#{$sm-prefix}label { - margin: 5px 5px 2px 0; - } - /* ------------------Field-------------------- */ .#{$sm-prefix}field { @@ -229,11 +239,6 @@ } } - .#{$sm-prefix}properties { - font-size: 11px; - padding: 10px 5px; - } - /* ------------------Property-------------------- */ .#{$sm-prefix} { @@ -283,7 +288,6 @@ box-sizing: border-box; float: left; width: 100%; - padding: 0 5px; } &.#{$sm-prefix}file ##{$sm-prefix}preview-box { @@ -295,12 +299,13 @@ &.#{$sm-prefix}show { border: 1px solid darken($lightBorder, 1%); - padding: 3px 5px; + padding: 3px 20px; } ##{$sm-prefix}close { @extend .#{$sm-prefix}close-btn; + top: -5px; display: block; } } @@ -387,7 +392,7 @@ /* ------------------END Property-------------------- */ .#{$sm-prefix}stack .#{$sm-prefix}properties { - padding-top: 5px; + padding: 5px 0 0; } .#{$sm-prefix}stack ##{$sm-prefix}add { @@ -396,11 +401,12 @@ background: none; border: none; cursor: pointer; + outline: none; font-size: 22px; line-height: 10px; position: absolute; right: 0; - top: -20px; + top: -17px; opacity: 0.75; &:hover { From 0b54f5946bc15c27770b0243522e7a1bf73f70cb Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 24 Sep 2017 12:31:34 +0200 Subject: [PATCH 027/143] Remove jQuery and fix some methods --- index.html | 2 +- package.json | 1 + src/domain_abstract/ui/InputColor.js | 2 ++ src/editor/model/Editor.js | 8 +++--- src/grapesjs/index.js | 9 ++++-- src/style_manager/view/PropertyRadioView.js | 32 +++++++++++---------- src/utils/cashAdds.js | 9 ++++++ webpack.config.js | 8 ------ 8 files changed, 41 insertions(+), 30 deletions(-) create mode 100644 src/utils/cashAdds.js diff --git a/index.html b/index.html index 51a4ca9566..6e896a7ef9 100755 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ GrapesJS - + diff --git a/package.json b/package.json index bd8c427ceb..8ef1991ed0 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dependencies": { "backbone": "^1.3.3", "backbone-undo": "^0.2.5", + "cash-dom": "^1.3.5", "codemirror": "^5.21.0", "codemirror-formatting": "^1.0.0", "font-awesome": "^4.7.0", diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index 7a40121922..a63830c4fc 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -1,6 +1,7 @@ var Backbone = require('backbone'); var Input = require('./Input'); var Spectrum = require('spectrum-colorpicker'); +const $ = Backbone.$; module.exports = Input.extend({ @@ -55,6 +56,7 @@ module.exports = Input.extend({ if (!this.colorEl) { const self = this; var model = this.model; + var colorEl = $('
', {class: this.colorCls}); var cpStyle = colorEl.get(0).style; var elToAppend = this.target && this.target.config ? this.target.config.el : ''; diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js index 72b2a0066a..93c30ebeda 100644 --- a/src/editor/model/Editor.js +++ b/src/editor/model/Editor.js @@ -18,10 +18,10 @@ require('block_manager'), require('trait_manager'), ]; -var Backbone = require('backbone'); -var UndoManager = require('backbone-undo'); -var key = require('keymaster'); -var timedInterval; +const Backbone = require('backbone'); +const UndoManager = require('backbone-undo'); +const key = require('keymaster'); +let timedInterval; if (!Backbone.$) { Backbone.$ = $; diff --git a/src/grapesjs/index.js b/src/grapesjs/index.js index 8fb20022e3..f9b0bb8e13 100644 --- a/src/grapesjs/index.js +++ b/src/grapesjs/index.js @@ -4,9 +4,12 @@ module.exports = (() => { const defaultConfig = require('./config/config'); const Editor = require('editor'); const PluginManager = require('plugin_manager'); + const cash = require('cash-dom'); const plugins = new PluginManager(); const editors = []; + require('utils/cashAdds')(cash); + return { // Will be replaced on build @@ -36,10 +39,12 @@ module.exports = (() => { */ init(config = {}) { const els = config.container; + let $ = $ || ''; // Make a missing $ more verbose - if (isUndefined($)) { - throw 'jQuery not found'; + if (!$) { + $ = cash; + window.$ = $; } if (!els) { diff --git a/src/style_manager/view/PropertyRadioView.js b/src/style_manager/view/PropertyRadioView.js index 292660d7c3..3b489d2c12 100644 --- a/src/style_manager/view/PropertyRadioView.js +++ b/src/style_manager/view/PropertyRadioView.js @@ -18,7 +18,7 @@ module.exports = require('./PropertyView').extend({ const prop = model.get('property'); const options = model.get('list') || model.get('options') || []; - if (!this.$input) { + if (!this.input) { if(options && options.length) { let inputStr = ''; @@ -31,31 +31,33 @@ module.exports = require('./PropertyView').extend({
-
`; +
+ `; }); - this.$inputEl = $(inputStr); - this.input = this.$inputEl.get(0); - this.$el.find(`#${pfx}input-holder`).html(this.$inputEl); - this.$input = this.$inputEl.find(`input[name="${prop}"]`); + const inputHld = this.el.querySelector(`#${pfx}input-holder`); + inputHld.innerHTML = `
${inputStr}
`; + this.input = inputHld.firstChild; } } }, - + /* getInputValue() { return this.$input ? this.$el.find('input:checked').val() : ''; }, +*/ + getInputValue() { + const input = this.getInputEl(); + const inputIn = input ? input.querySelector('input:checked') : ''; + return inputIn ? inputIn.value : ''; + }, setValue(value) { const model = this.model; - var v = model.get('value') || model.getDefaultValue(); - - if (value) { - v = value; - } - - if(this.$input) - this.$input.filter(`[value="${v}"]`).prop('checked', true); + let val = value || model.get('value') || model.getDefaultValue(); + const input = this.getInputEl(); + const inputIn = input ? input.querySelector(`[value="${val}"]`) : ''; + inputIn && (inputIn.checked = true); }, }); diff --git a/src/utils/cashAdds.js b/src/utils/cashAdds.js new file mode 100644 index 0000000000..c3bb0fd09a --- /dev/null +++ b/src/utils/cashAdds.js @@ -0,0 +1,9 @@ +module.exports = ($) => { + $.fn.hide = function() { + return this.css('display', 'none'); + } + + $.fn.show = function() { + return this.css('display', 'block'); + } +} diff --git a/webpack.config.js b/webpack.config.js index 0f33bc9ea7..03ede1cf11 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -24,14 +24,6 @@ module.exports = { library: 'grapesjs', libraryTarget: 'umd', }, - externals: { - jquery: { - commonjs2: 'jquery', - commonjs: 'jquery', - amd: 'jquery', - root: 'jQuery' - } - }, plugins: plugins, module: { loaders: [{ From daeb85f83e5f7248b0bfd98f0d9bea8f320fea0e Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 24 Sep 2017 14:27:02 +0200 Subject: [PATCH 028/143] Update Select Component --- src/commands/view/SelectComponent.js | 6 ++- src/dom_components/view/ComponentView.js | 13 ++++- src/editor/model/Editor.js | 60 +++++++++++++++++------- src/grapesjs/index.js | 6 +-- 4 files changed, 61 insertions(+), 24 deletions(-) diff --git a/src/commands/view/SelectComponent.js b/src/commands/view/SelectComponent.js index e5409475b6..f77a990524 100644 --- a/src/commands/view/SelectComponent.js +++ b/src/commands/view/SelectComponent.js @@ -1,7 +1,9 @@ var ToolbarView = require('dom_components/view/ToolbarView'); var Toolbar = require('dom_components/model/Toolbar'); var key = require('keymaster'); +var Backbone = require('backbone'); let showOffsets; +const $ = Backbone.$; module.exports = { @@ -140,11 +142,12 @@ module.exports = { * @private */ onHover(e) { + const model = $(e.target).data('model'); e.stopPropagation(); var trg = e.target; // Adjust tools scroll top - if(!this.adjScroll){ + if (!this.adjScroll) { this.adjScroll = 1; this.onFrameScroll(e); this.updateAttached(); @@ -282,6 +285,7 @@ module.exports = { updateHighlighter(el, pos) { var $el = $(el); var model = $el.data('model'); + if(!model || (model && model.get('status') == 'selected')) { return; } diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index 582d04cb89..bc216642cf 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -29,9 +29,18 @@ module.exports = Backbone.View.extend({ this.listenTo(model, 'change:script', this.render); this.listenTo(model, 'change', this.handleChange); this.listenTo(model.get('classes'), 'add remove change', this.updateClasses); - this.$el.data('model', model); + + const $el = this.$el; + const el = this.el; + const em = this.em; + $el.data('model', model); + $el.data('collection', this.components); model.view = this; - this.$el.data("collection", this.components); + + if (em) { + em.data(el, 'model', model); + em.data(el, 'collection', model.get('components')); + } if(model.get('classes').length) this.importClasses(); diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js index 93c30ebeda..a99df7d40e 100644 --- a/src/editor/model/Editor.js +++ b/src/editor/model/Editor.js @@ -1,21 +1,23 @@ -var deps = [ -require('utils'), -require('storage_manager'), -require('device_manager'), -require('parser'), -require('selector_manager'), -require('modal_dialog'), -require('code_manager'), -require('panels'), -require('rich_text_editor'), -require('style_manager'), -require('asset_manager'), -require('css_composer'), -require('dom_components'), -require('canvas'), -require('commands'), -require('block_manager'), -require('trait_manager'), +import { isUndefined, defaults } from 'underscore'; + +const deps = [ + require('utils'), + require('storage_manager'), + require('device_manager'), + require('parser'), + require('selector_manager'), + require('modal_dialog'), + require('code_manager'), + require('panels'), + require('rich_text_editor'), + require('style_manager'), + require('asset_manager'), + require('css_composer'), + require('dom_components'), + require('canvas'), + require('commands'), + require('block_manager'), + require('trait_manager'), ]; const Backbone = require('backbone'); @@ -607,4 +609,26 @@ module.exports = Backbone.Model.extend({ w.getSelection().removeAllRanges(); }, + /** + * Set/get data from the HTMLElement + * @param {HTMLElement} el + * @param {string} name Data name + * @param {any} value Date value + * @return {any} + * @private + */ + data(el, name, value) { + const varName = '_gjs-data'; + + if (!el[varName]) { + el[varName] = {}; + } + + if (isUndefined(value)) { + return el[varName][name]; + } else { + el[varName][name] = value; + } + } + }); diff --git a/src/grapesjs/index.js b/src/grapesjs/index.js index f9b0bb8e13..b59109273f 100644 --- a/src/grapesjs/index.js +++ b/src/grapesjs/index.js @@ -1,15 +1,15 @@ import { isUndefined, defaults } from 'underscore'; module.exports = (() => { + const cash = require('cash-dom'); + require('utils/cashAdds')(cash); + const defaultConfig = require('./config/config'); const Editor = require('editor'); const PluginManager = require('plugin_manager'); - const cash = require('cash-dom'); const plugins = new PluginManager(); const editors = []; - require('utils/cashAdds')(cash); - return { // Will be replaced on build From eaa794963f2f4b2508a10796dba1b4fdd08d4778 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 24 Sep 2017 15:01:50 +0200 Subject: [PATCH 029/143] Update canvas view elements --- src/canvas/view/CanvasView.js | 51 +++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/src/canvas/view/CanvasView.js b/src/canvas/view/CanvasView.js index b330c2429e..c7648dc67b 100644 --- a/src/canvas/view/CanvasView.js +++ b/src/canvas/view/CanvasView.js @@ -1,5 +1,5 @@ -var Backbone = require('backbone'); -var FrameView = require('./FrameView'); +const Backbone = require('backbone'); +const FrameView = require('./FrameView'); module.exports = Backbone.View.extend({ @@ -346,6 +346,7 @@ module.exports = Backbone.View.extend({ } } var ppfx = this.ppfx; + /* var toolsEl = $('
', { id: ppfx + 'tools' }).get(0); this.hlEl = $('
', { class: ppfx + 'highlighter' }).get(0); this.badgeEl = $('
', {class: ppfx + 'badge'}).get(0); @@ -365,7 +366,53 @@ module.exports = Backbone.View.extend({ toolsEl.appendChild(this.resizerEl); toolsEl.appendChild(this.offsetEl); toolsEl.appendChild(this.fixedOffsetEl); + */ + var toolsEl = $(`
`).get(0); + this.hlEl = $(`
`).get(0); + this.badgeEl = $(`
`).get(0); + this.placerEl = $(`
`).get(0); + this.placerIntEl = $(`
`).get(0); + this.ghostEl = $(`
`).get(0); + this.toolbarEl = $(`
`).get(0); + this.resizerEl = $(`
`).get(0); + this.offsetEl = $(`
`).get(0); + this.fixedOffsetEl = $(`
`).get(0); + this.placerEl.appendChild(this.placerIntEl); + toolsEl.appendChild(this.hlEl); + toolsEl.appendChild(this.badgeEl); + toolsEl.appendChild(this.placerEl); + toolsEl.appendChild(this.ghostEl); + toolsEl.appendChild(this.toolbarEl); + toolsEl.appendChild(this.resizerEl); + toolsEl.appendChild(this.offsetEl); + toolsEl.appendChild(this.fixedOffsetEl); this.$el.append(toolsEl); + /* + this.$el.append(` +
+
+
+
+
+
+
+
+
+
+
+
+ `); + const el = this.el; + const toolsEl = el.querySelector(`#${ppfx}tools`); + this.hlEl = el.querySelector(`.${ppfx}highlighter`); + this.badgeEl = el.querySelector(`.${ppfx}badge`); + this.placerEl = el.querySelector(`.${ppfx}placeholder`); + this.ghostEl = el.querySelector(`.${ppfx}ghost`); + this.toolbarEl = el.querySelector(`.${ppfx}toolbar`); + this.resizerEl = el.querySelector(`.${ppfx}resizer`); + this.offsetEl = el.querySelector(`.${ppfx}offset-v`); + this.fixedOffsetEl = el.querySelector(`.${ppfx}offset-fixed-v`); + */ var rte = this.em.get('rte'); if(rte) From ae8ea5413bf3a97070c471578fa3f7c6c4107737 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 25 Sep 2017 00:03:14 +0200 Subject: [PATCH 030/143] Fix ShowOffset command --- src/canvas/view/CanvasView.js | 51 +++------------------------- src/commands/view/SelectComponent.js | 1 - src/commands/view/ShowOffset.js | 20 ++++++----- src/grapesjs/index.js | 2 +- 4 files changed, 17 insertions(+), 57 deletions(-) diff --git a/src/canvas/view/CanvasView.js b/src/canvas/view/CanvasView.js index c7648dc67b..1a1d611cdb 100644 --- a/src/canvas/view/CanvasView.js +++ b/src/canvas/view/CanvasView.js @@ -346,63 +346,22 @@ module.exports = Backbone.View.extend({ } } var ppfx = this.ppfx; - /* - var toolsEl = $('
', { id: ppfx + 'tools' }).get(0); - this.hlEl = $('
', { class: ppfx + 'highlighter' }).get(0); - this.badgeEl = $('
', {class: ppfx + 'badge'}).get(0); - this.placerEl = $('
', {class: ppfx + 'placeholder'}).get(0); - this.placerIntEl = $('
', {class: ppfx + 'placeholder-int'}).get(0); - this.ghostEl = $('
', {class: ppfx + 'ghost'}).get(0); - this.toolbarEl = $('
', {class: ppfx + 'toolbar'}).get(0); - this.resizerEl = $('
', {class: ppfx + 'resizer'}).get(0); - this.offsetEl = $('
', {class: ppfx + 'offset-v'}).get(0); - this.fixedOffsetEl = $('
', {class: ppfx + 'offset-fixed-v'}).get(0); - this.placerEl.appendChild(this.placerIntEl); - toolsEl.appendChild(this.hlEl); - toolsEl.appendChild(this.badgeEl); - toolsEl.appendChild(this.placerEl); - toolsEl.appendChild(this.ghostEl); - toolsEl.appendChild(this.toolbarEl); - toolsEl.appendChild(this.resizerEl); - toolsEl.appendChild(this.offsetEl); - toolsEl.appendChild(this.fixedOffsetEl); - */ - var toolsEl = $(`
`).get(0); - this.hlEl = $(`
`).get(0); - this.badgeEl = $(`
`).get(0); - this.placerEl = $(`
`).get(0); - this.placerIntEl = $(`
`).get(0); - this.ghostEl = $(`
`).get(0); - this.toolbarEl = $(`
`).get(0); - this.resizerEl = $(`
`).get(0); - this.offsetEl = $(`
`).get(0); - this.fixedOffsetEl = $(`
`).get(0); - this.placerEl.appendChild(this.placerIntEl); - toolsEl.appendChild(this.hlEl); - toolsEl.appendChild(this.badgeEl); - toolsEl.appendChild(this.placerEl); - toolsEl.appendChild(this.ghostEl); - toolsEl.appendChild(this.toolbarEl); - toolsEl.appendChild(this.resizerEl); - toolsEl.appendChild(this.offsetEl); - toolsEl.appendChild(this.fixedOffsetEl); - this.$el.append(toolsEl); - /* this.$el.append(` -
+
-
+
`); const el = this.el; + const rte = this.em.get('rte'); const toolsEl = el.querySelector(`#${ppfx}tools`); this.hlEl = el.querySelector(`.${ppfx}highlighter`); this.badgeEl = el.querySelector(`.${ppfx}badge`); @@ -412,14 +371,12 @@ module.exports = Backbone.View.extend({ this.resizerEl = el.querySelector(`.${ppfx}resizer`); this.offsetEl = el.querySelector(`.${ppfx}offset-v`); this.fixedOffsetEl = el.querySelector(`.${ppfx}offset-fixed-v`); - */ - var rte = this.em.get('rte'); if(rte) toolsEl.appendChild(rte.render()); this.toolsEl = toolsEl; - this.$el.attr({class: this.className}); + this.el.className = this.className; return this; }, diff --git a/src/commands/view/SelectComponent.js b/src/commands/view/SelectComponent.js index f77a990524..79381416ff 100644 --- a/src/commands/view/SelectComponent.js +++ b/src/commands/view/SelectComponent.js @@ -142,7 +142,6 @@ module.exports = { * @private */ onHover(e) { - const model = $(e.target).data('model'); e.stopPropagation(); var trg = e.target; diff --git a/src/commands/view/ShowOffset.js b/src/commands/view/ShowOffset.js index 40c7b4bb2b..f818626d22 100644 --- a/src/commands/view/ShowOffset.js +++ b/src/commands/view/ShowOffset.js @@ -1,3 +1,5 @@ +const $ = require('backbone').$; + module.exports = { getOffsetMethod(state) { @@ -42,14 +44,16 @@ module.exports = { var paddingV = $('
', {class: ppfx + paddingName}).get(0); var marginEls = ppfx + marginName + '-el'; var paddingEls = ppfx + paddingName + '-el'; - marginT = $('
', {class: ppfx + marginName + '-top ' + marginEls}).get(0); - marginB = $('
', {class: ppfx + marginName + '-bottom ' + marginEls}).get(0); - marginL = $('
', {class: ppfx + marginName + '-left ' + marginEls}).get(0); - marginR = $('
', {class: ppfx + marginName + '-right ' + marginEls}).get(0); - padT = $('
', {class: ppfx + paddingName + '-top ' + paddingEls}).get(0); - padB = $('
', {class: ppfx + paddingName + '-bottom ' + paddingEls}).get(0); - padL = $('
', {class: ppfx + paddingName + '-left ' + paddingEls}).get(0); - padR = $('
', {class: ppfx + paddingName + '-right ' + paddingEls}).get(0); + const fullMargName = `${marginEls} ${ppfx + marginName}`; + const fullPadName = `${paddingEls} ${ppfx + paddingName}`; + marginT = $(`
`).get(0); + marginB = $(`
`).get(0); + marginL = $(`
`).get(0); + marginR = $(`
`).get(0); + padT = $(`
`).get(0); + padB = $(`
`).get(0); + padL = $(`
`).get(0); + padR = $(`
`).get(0); this['marginT' + state] = marginT; this['marginB' + state] = marginB; this['marginL' + state] = marginL; diff --git a/src/grapesjs/index.js b/src/grapesjs/index.js index b59109273f..096cd4e8a3 100644 --- a/src/grapesjs/index.js +++ b/src/grapesjs/index.js @@ -1,4 +1,4 @@ -import { isUndefined, defaults } from 'underscore'; +import { defaults } from 'underscore'; module.exports = (() => { const cash = require('cash-dom'); From 5abc6fd5d31e39dd12b89231e97b47530608cbce Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 25 Sep 2017 00:35:51 +0200 Subject: [PATCH 031/143] Remove some not compatible jquery method --- src/canvas/view/CanvasView.js | 2 +- src/commands/view/ExportTemplate.js | 2 +- src/commands/view/OpenStyleManager.js | 7 ++--- src/commands/view/SelectComponent.js | 8 ++--- src/commands/view/ShowOffset.js | 4 +-- src/domain_abstract/ui/Input.js | 8 ++--- src/domain_abstract/ui/InputColor.js | 2 +- src/domain_abstract/ui/InputNumber.js | 8 ++--- .../view/PropertyCompositeView.js | 2 +- src/style_manager/view/PropertyFileView.js | 3 +- src/trait_manager/view/TraitView.js | 31 ++++++++++--------- src/utils/Sorter.js | 3 +- 12 files changed, 39 insertions(+), 41 deletions(-) diff --git a/src/canvas/view/CanvasView.js b/src/canvas/view/CanvasView.js index 1a1d611cdb..cc668643cf 100644 --- a/src/canvas/view/CanvasView.js +++ b/src/canvas/view/CanvasView.js @@ -326,7 +326,7 @@ module.exports = Backbone.View.extend({ */ getJsContainer() { if (!this.jsContainer) { - this.jsContainer = $('
', {class: this.ppfx + 'js-cont'}).get(0); + this.jsContainer = $(`
`).get(0); } return this.jsContainer; }, diff --git a/src/commands/view/ExportTemplate.js b/src/commands/view/ExportTemplate.js index 00d152ae94..d8a8ab597a 100644 --- a/src/commands/view/ExportTemplate.js +++ b/src/commands/view/ExportTemplate.js @@ -50,7 +50,7 @@ module.exports = { var oCsslEd = this.buildEditor('css', 'hopscotch', 'CSS'); this.htmlEditor = oHtmlEd.el; this.cssEditor = oCsslEd.el; - this.$editors = $('
', {class: this.pfx + 'export-dl'}); + this.$editors = $(`
`); this.$editors.append(oHtmlEd.$el).append(oCsslEd.$el); } diff --git a/src/commands/view/OpenStyleManager.js b/src/commands/view/OpenStyleManager.js index 52c25c695a..b9c2732921 100644 --- a/src/commands/view/OpenStyleManager.js +++ b/src/commands/view/OpenStyleManager.js @@ -27,12 +27,9 @@ module.exports = { this.$cn2.append(em.StyleManager.render()); var smConfig = em.StyleManager.getConfig(); + const pfx = smConfig.stylePrefix; // Create header - this.$header = $('
', { - class: smConfig.stylePrefix + 'header', - text: smConfig.textNoElement, - }); - //this.$cn = this.$cn.add(this.$header); + this.$header = $(`
${smConfig.textNoElement}
`); this.$cn.append(this.$header); // Create panel if not exists diff --git a/src/commands/view/SelectComponent.js b/src/commands/view/SelectComponent.js index 79381416ff..7ce7900226 100644 --- a/src/commands/view/SelectComponent.js +++ b/src/commands/view/SelectComponent.js @@ -1,7 +1,7 @@ -var ToolbarView = require('dom_components/view/ToolbarView'); -var Toolbar = require('dom_components/model/Toolbar'); -var key = require('keymaster'); -var Backbone = require('backbone'); +const ToolbarView = require('dom_components/view/ToolbarView'); +const Toolbar = require('dom_components/model/Toolbar'); +const key = require('keymaster'); +const Backbone = require('backbone'); let showOffsets; const $ = Backbone.$; diff --git a/src/commands/view/ShowOffset.js b/src/commands/view/ShowOffset.js index f818626d22..2ec5a7c61d 100644 --- a/src/commands/view/ShowOffset.js +++ b/src/commands/view/ShowOffset.js @@ -40,8 +40,8 @@ module.exports = { var stateLow = state.toLowerCase(); var marginName = stateLow + 'margin-v'; var paddingName = stateLow + 'padding-v'; - var marginV = $('
', {class: ppfx + marginName}).get(0); - var paddingV = $('
', {class: ppfx + paddingName}).get(0); + var marginV = $(`
`).get(0); + var paddingV = $(`
`).get(0); var marginEls = ppfx + marginName + '-el'; var paddingEls = ppfx + paddingName + '-el'; const fullMargName = `${marginEls} ${ppfx + marginName}`; diff --git a/src/domain_abstract/ui/Input.js b/src/domain_abstract/ui/Input.js index 4b382639dd..c5f92dc321 100644 --- a/src/domain_abstract/ui/Input.js +++ b/src/domain_abstract/ui/Input.js @@ -58,11 +58,9 @@ module.exports = Backbone.View.extend({ */ getInputEl() { if(!this.inputEl) { - this.inputEl = $('', { - type: 'text', - class: this.inputCls, - placeholder: this.model.get('defaults') - }); + const plh = this.model.get('defaults'); + const cls = this.inputCls; + this.inputEl = $(``); } return this.inputEl.get(0); }, diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index a63830c4fc..351584148a 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -57,7 +57,7 @@ module.exports = Input.extend({ const self = this; var model = this.model; - var colorEl = $('
', {class: this.colorCls}); + var colorEl = $(`
`); var cpStyle = colorEl.get(0).style; var elToAppend = this.target && this.target.config ? this.target.config.el : ''; diff --git a/src/domain_abstract/ui/InputNumber.js b/src/domain_abstract/ui/InputNumber.js index 5b4aabfe72..733ce97940 100644 --- a/src/domain_abstract/ui/InputNumber.js +++ b/src/domain_abstract/ui/InputNumber.js @@ -101,11 +101,9 @@ module.exports = Backbone.View.extend({ */ getInputEl() { if(!this.inputEl) { - this.inputEl = $('', { - type: 'text', - class: this.inputCls, - placeholder: this.model.get('defaults') - }); + const cls = this.inputCls; + const plh = this.model.get('defaults'); + this.inputEl = $(``); } return this.inputEl.get(0); }, diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index 2cd4a0edab..2f5f46a648 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -26,7 +26,7 @@ module.exports = PropertyView.extend({ if (props.length) { if (!this.$input) { - this.$input = $('', {value: 0, type: 'hidden' }); + this.$input = $(''); this.input = this.$input.get(0); } diff --git a/src/style_manager/view/PropertyFileView.js b/src/style_manager/view/PropertyFileView.js index ced75d8969..8e8f30a435 100644 --- a/src/style_manager/view/PropertyFileView.js +++ b/src/style_manager/view/PropertyFileView.js @@ -36,7 +36,8 @@ module.exports = PropertyView.extend({ onRender() { if (!this.$input) { - this.$input = $('', {placeholder: this.model.getDefaultValue(), type: 'text' }); + const plh = this.model.getDefaultValue(); + this.$input = $(``); } if (!this.$preview) { diff --git a/src/trait_manager/view/TraitView.js b/src/trait_manager/view/TraitView.js index dd35f65f84..727e70cf17 100644 --- a/src/trait_manager/view/TraitView.js +++ b/src/trait_manager/view/TraitView.js @@ -81,21 +81,24 @@ module.exports = Backbone.View.extend({ var md = this.model; var trg = this.target; var name = md.get('name'); - var opts = { - placeholder: md.get('placeholder') || md.get('default'), - type: md.get('type') || 'text' - }; - if(md.get('changeProp')){ - opts.value = trg.get(name); - }else{ - var attrs = trg.get('attributes'); - opts.value = md.get('value') || attrs[name]; + const plh = md.get('placeholder') || md.get('default'); + const type = md.get('type') || 'text'; + const attrs = trg.get('attributes'); + const min = md.get('min'); + const max = md.get('max'); + const value = md.get('changeProp') ? + trg.get(name) : md.get('value') || attrs[name]; + const input = $(``); + + if (min) { + input.prop('min', min); + } + + if (max) { + input.prop('max', max); } - if(md.get('min')) - opts.min = md.get('min'); - if(md.get('max')) - opts.max = md.get('max'); - this.$input = $('', opts); + + this.$input = input; } return this.$input.get(0); }, diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js index 877ebf3aef..72e59396e6 100644 --- a/src/utils/Sorter.js +++ b/src/utils/Sorter.js @@ -1,4 +1,5 @@ -var Backbone = require('backbone'); +const Backbone = require('backbone'); +const $ = Backbone.$; module.exports = Backbone.View.extend({ From 6c42b31bc8d57873566a5e91ba6bd226d3182932 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 25 Sep 2017 01:47:44 +0200 Subject: [PATCH 032/143] Fix input --- src/canvas/index.js | 17 +++++------- src/domain_abstract/ui/InputNumber.js | 37 +++++++++++++-------------- src/utils/mixins.js | 19 ++++++++++++++ 3 files changed, 44 insertions(+), 29 deletions(-) create mode 100644 src/utils/mixins.js diff --git a/src/canvas/index.js b/src/canvas/index.js index a2fe554299..fc3b591f7e 100644 --- a/src/canvas/index.js +++ b/src/canvas/index.js @@ -1,3 +1,5 @@ +import {on, off} from 'utils/mixins' + module.exports = () => { var c = {}, defaults = require('./config/config'), @@ -353,8 +355,8 @@ module.exports = () => { this.dragging = 1; let toListen = this.getScrollListeners(); frameRect = CanvasView.getFrameOffset(1); - toListen.on('mousemove', this.autoscroll); - toListen.on('mouseup', this.stopAutoscroll); + on(toListen, 'mousemove', this.autoscroll); + on(toListen, 'mouseup', this.stopAutoscroll); }, autoscroll(e) { @@ -386,17 +388,12 @@ module.exports = () => { stopAutoscroll() { this.dragging = 0; let toListen = this.getScrollListeners(); - toListen.off('mousemove', this.autoscroll); - toListen.off('mouseup', this.stopAutoscroll); + off(toListen, 'mousemove', this.autoscroll); + off(toListen, 'mouseup', this.stopAutoscroll); }, getScrollListeners() { - if (!this.scrollListeners) { - this.scrollListeners = - $(this.getFrameEl().contentWindow, this.getElement()); - } - - return this.scrollListeners; + return [this.getFrameEl().contentWindow, this.getElement()]; }, /** diff --git a/src/domain_abstract/ui/InputNumber.js b/src/domain_abstract/ui/InputNumber.js index 733ce97940..41bac9c911 100644 --- a/src/domain_abstract/ui/InputNumber.js +++ b/src/domain_abstract/ui/InputNumber.js @@ -1,4 +1,7 @@ -var Backbone = require('backbone'); +import {on, off} from 'utils/mixins' + +const Backbone = require('backbone'); +const $ = Backbone.$; module.exports = Backbone.View.extend({ @@ -18,16 +21,15 @@ module.exports = Backbone.View.extend({ var ppfx = opt.ppfx || ''; var contClass = opt.contClass || (`${ppfx}field ${ppfx}field-integer`); this.ppfx = ppfx; - this.docEl = $(document); + this.doc = document; this.inputCls = ppfx + 'field-number'; this.unitCls = ppfx + 'input-unit'; this.contClass = contClass; - this.events['click .' + ppfx + 'field-arrow-u'] = 'upArrowClick'; - this.events['click .' + ppfx + 'field-arrow-d'] = 'downArrowClick'; - this.events['mousedown .' + ppfx + 'field-arrows'] = 'downIncrement'; - this.events['change .' + this.inputCls] = 'handleChange'; - this.events['change .' + this.unitCls] = 'handleUnitChange'; - + this.events[`click .${ppfx}field-arrow-u`] = 'upArrowClick'; + this.events[`click .${ppfx}field-arrow-d`] = 'downArrowClick'; + this.events[`mousedown .${ppfx}field-arrows`] = 'downIncrement'; + this.events[`change .${this.inputCls}`] = 'handleChange'; + this.events[`change .${this.unitCls}`] = 'handleUnitChange'; this.listenTo(this.model, 'change:unit change:value', this.handleModelChange); this.delegateEvents(); }, @@ -136,7 +138,6 @@ module.exports = Backbone.View.extend({ const model = this.model; const step = model.get('step'); let value = model.get('value'); - //value = isNaN(value) ? 1 * step : parseFloat(value); value = this.normalizeValue(value + step); var valid = this.validateInputValue(value); model.set('value', valid.value); @@ -167,9 +168,9 @@ module.exports = Backbone.View.extend({ this.moved = 0; var value = this.model.get('value'); value = this.normalizeValue(value); - var current = {y: e.pageY, val: value}; - this.docEl.mouseup(current, this.upIncrement); - this.docEl.mousemove(current, this.moveIncrement); + this.current = {y: e.pageY, val: value}; + on(this.doc, 'mousemove', this.moveIncrement); + on(this.doc, 'mouseup', this.upIncrement); }, /** While the increment is clicked, moving the mouse will update input value @@ -181,7 +182,8 @@ module.exports = Backbone.View.extend({ this.moved = 1; const model = this.model; const step = model.get('step'); - var pos = this.normalizeValue(ev.data.val + (ev.data.y - ev.pageY) * step); + const data = this.current; + var pos = this.normalizeValue(data.val + (data.y - ev.pageY) * step); this.prValue = this.validateInputValue(pos).value; model.set('value', this.prValue, {avoidStore: 1}); return false; @@ -189,15 +191,12 @@ module.exports = Backbone.View.extend({ /** * Stop moveIncrement method - * @param Object - * - * @return void * */ - upIncrement(e) { + upIncrement() { const model = this.model; const step = model.get('step'); - this.docEl.off('mouseup', this.upIncrement); - this.docEl.off('mousemove', this.moveIncrement); + off(this.doc, 'mouseup', this.upIncrement); + off(this.doc, 'mousemove', this.moveIncrement); if(this.prValue && this.moved) { var value = this.prValue - step; diff --git a/src/utils/mixins.js b/src/utils/mixins.js new file mode 100644 index 0000000000..5ea27ee360 --- /dev/null +++ b/src/utils/mixins.js @@ -0,0 +1,19 @@ +const on = (el, ev, fn) => { + ev = ev.split(/\s+/); + el = el instanceof Array ? el : [el]; + + for (let i = 0; i < ev.length; ++i) { + el.forEach(elem => elem.addEventListener(ev[i], fn)); + } +} + +const off = (el, ev, fn) => { + ev = ev.split(/\s+/); + el = el instanceof Array ? el : [el]; + + for (let i = 0; i < ev.length; ++i) { + el.forEach(elem => elem.removeEventListener(ev[i], fn)); + } +} + +export {on, off} From 4c2960400d428e8029537849c57d681b6678601b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 25 Sep 2017 01:50:32 +0200 Subject: [PATCH 033/143] Update trait render view --- src/trait_manager/view/TraitView.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/trait_manager/view/TraitView.js b/src/trait_manager/view/TraitView.js index 727e70cf17..abe8b2c1a3 100644 --- a/src/trait_manager/view/TraitView.js +++ b/src/trait_manager/view/TraitView.js @@ -81,14 +81,18 @@ module.exports = Backbone.View.extend({ var md = this.model; var trg = this.target; var name = md.get('name'); - const plh = md.get('placeholder') || md.get('default'); + const plh = md.get('placeholder') || md.get('default') || ''; const type = md.get('type') || 'text'; const attrs = trg.get('attributes'); const min = md.get('min'); const max = md.get('max'); const value = md.get('changeProp') ? trg.get(name) : md.get('value') || attrs[name]; - const input = $(``); + const input = $(``); + + if (value) { + input.prop('value', value); + } if (min) { input.prop('min', min); From 912cf5324bd6c84223b8e53312a1d04783be4b60 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 25 Sep 2017 02:31:28 +0200 Subject: [PATCH 034/143] Fix RTE --- src/canvas/view/CanvasView.js | 7 +++++-- src/dom_components/view/ComponentTextView.js | 12 +++++++----- src/rich_text_editor/index.js | 1 + src/rich_text_editor/view/TextEditorView.js | 15 +++++++++------ src/utils/cashAdds.js | 11 +++++++++-- 5 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/canvas/view/CanvasView.js b/src/canvas/view/CanvasView.js index cc668643cf..1afd43f8f1 100644 --- a/src/canvas/view/CanvasView.js +++ b/src/canvas/view/CanvasView.js @@ -372,8 +372,11 @@ module.exports = Backbone.View.extend({ this.offsetEl = el.querySelector(`.${ppfx}offset-v`); this.fixedOffsetEl = el.querySelector(`.${ppfx}offset-fixed-v`); - if(rte) - toolsEl.appendChild(rte.render()); + if (rte) { + const rteEl = rte.render(); + rteEl.style.pointerEvents = 'all'; + toolsEl.appendChild(rteEl); + } this.toolsEl = toolsEl; this.el.className = this.className; diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index 593a4c4318..c152dfb138 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -1,5 +1,6 @@ -var Backbone = require('backbone'); -var ComponentView = require('./ComponentView'); +import {on, off} from 'utils/mixins' + +const ComponentView = require('./ComponentView'); module.exports = ComponentView.extend({ @@ -100,11 +101,12 @@ module.exports = ComponentView.extend({ */ toggleEvents(enable) { var method = enable ? 'on' : 'off'; + const mixins = {on, off}; // The ownerDocument is from the frame - var elDocs = [this.el.ownerDocument, document, this.rte]; - $(elDocs).off('mousedown', this.disableEditing); - $(elDocs)[method]('mousedown', this.disableEditing); + var elDocs = [this.el.ownerDocument, document]; + mixins.off(elDocs, 'mousedown', this.disableEditing); + mixins[method](elDocs, 'mousedown', this.disableEditing); // Avoid closing edit mode on component click this.$el.off('mousedown', this.disablePropagation); diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 242f7d60b1..002d6a368e 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -27,6 +27,7 @@ module.exports = () => { rte = require('./view/TextEditorView'), CommandButtons = require('./model/CommandButtons'), CommandButtonsView = require('./view/CommandButtonsView'); + const $ = require('backbone').$; var tlbPfx, toolbar, commands; var mainSelf; diff --git a/src/rich_text_editor/view/TextEditorView.js b/src/rich_text_editor/view/TextEditorView.js index a84619a1f1..b1c3354765 100644 --- a/src/rich_text_editor/view/TextEditorView.js +++ b/src/rich_text_editor/view/TextEditorView.js @@ -1,3 +1,6 @@ +const Backbone = require('backbone'); +const $ = Backbone.$; + var readFileIntoDataUrl = fileInfo => { var loader = $.Deferred(), fReader = new FileReader(); @@ -106,7 +109,7 @@ $.fn.wysiwyg = function (userOptions) { input.data(options.selectionMarker, color); }, bindToolbar = (toolbar, options) => { - toolbar.find(toolbarBtnSelector).unbind().click(function () { + toolbar.find(toolbarBtnSelector).off().on('click',function () { restoreSelection(); //editor.focus(); // cause defocus on selects var doc = editor.get(0).ownerDocument; @@ -121,7 +124,7 @@ $.fn.wysiwyg = function (userOptions) { } saveSelection(); }); - toolbar.find('[data-toggle=dropdown]').click(restoreSelection); + toolbar.find('[data-toggle=dropdown]').on('click', restoreSelection); var dName = '[data-' + options.commandRole + ']'; toolbar.find('select'+dName).on('webkitspeechchange change', function(){ var newValue = this.value; @@ -153,7 +156,7 @@ $.fn.wysiwyg = function (userOptions) { markSelection(input, false); } }); - toolbar.find('input[type=file][data-' + options.commandRole + ']').change(function () { + toolbar.find('input[type=file][data-' + options.commandRole + ']').on('change', function () { restoreSelection(); if (this.type === 'file' && this.files && this.files.length > 0) { insertFiles(this.files); @@ -176,8 +179,8 @@ $.fn.wysiwyg = function (userOptions) { /** Disable the editor * @date 2015-03-19 */ if(typeof userOptions=='string' && userOptions=='destroy'){ - editor.attr('contenteditable', false).unbind('mouseup keyup mouseout dragenter dragover'); - $(window).unbind('touchend'); + editor.attr('contenteditable', false).off('mouseup keyup mouseout dragenter dragover'); + $(window).off('touchend'); return this; } options = $.extend({}, $.fn.wysiwyg.defaults, userOptions); @@ -192,7 +195,7 @@ $.fn.wysiwyg = function (userOptions) { saveSelection(); updateToolbar(); }); - $(window).bind('touchend', e => { + $(window).on('touchend', e => { var isInside = (editor.is(e.target) || editor.has(e.target).length > 0), currentRange = getCurrentRange(), clear = currentRange && (currentRange.startContainer === currentRange.endContainer && currentRange.startOffset === currentRange.endOffset); diff --git a/src/utils/cashAdds.js b/src/utils/cashAdds.js index c3bb0fd09a..02b1337e36 100644 --- a/src/utils/cashAdds.js +++ b/src/utils/cashAdds.js @@ -1,9 +1,16 @@ module.exports = ($) => { - $.fn.hide = function() { + const fn = $.fn; + fn.hide = function() { return this.css('display', 'none'); } - $.fn.show = function() { + fn.show = function() { return this.css('display', 'block'); } + + fn.focus = function() { + const el = this.get(0); + el && el.focus(); + return this; + } } From 36b1862038e59739362827d73c2b2904d7ffd9ad Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 25 Sep 2017 22:38:06 +0200 Subject: [PATCH 035/143] Refactor remote storage and make use of fetch --- src/editor/index.js | 3 + src/storage_manager/config/config.js | 5 +- src/storage_manager/index.js | 3 +- src/storage_manager/model/RemoteStorage.js | 154 +++++++++++++-------- 4 files changed, 108 insertions(+), 57 deletions(-) diff --git a/src/editor/index.js b/src/editor/index.js index 79cd820c0f..d41b4346c3 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -46,8 +46,11 @@ * * `asset:upload:response` - On upload response, passes the result as an argument * * `styleManager:change` - Triggered on style property change from new selected component, the view of the property is passed as an argument to the callback * * `styleManager:change:{propertyName}` - As above but for a specific style property + * * `storage:start` - Before the storage request is started * * `storage:load` - Triggered when something was loaded from the storage, loaded object passed as an argumnet * * `storage:store` - Triggered when something is stored to the storage, stored object passed as an argumnet + * * `storage:end` - After the storage request is ended + * * `storage:error` - On any error on storage request, passes the error as an argument * * `selector:add` - Triggers when a new selector/class is created * * `canvasScroll` - Triggered when the canvas is scrolled * * `run:{commandName}` - Triggered when some command is called to run (eg. editor.runCommand('preview')) diff --git a/src/storage_manager/config/config.js b/src/storage_manager/config/config.js index d41a91cbcf..0edbbd9e03 100644 --- a/src/storage_manager/config/config.js +++ b/src/storage_manager/config/config.js @@ -32,9 +32,12 @@ module.exports = { checkLocal: 1, // ONLY FOR REMOTE STORAGE - // Custom params that should be passed with each store/load request + // Custom parameters to pass with the remote storage request, eg. csrf token params: {}, + // Custom headers for the remote storage request + headers: {}, + // Endpoint where to save all stuff urlStore: '', diff --git a/src/storage_manager/index.js b/src/storage_manager/index.js index 8a41068e94..479674ac96 100644 --- a/src/storage_manager/index.js +++ b/src/storage_manager/index.js @@ -57,7 +57,8 @@ module.exports = () => { */ init(config) { c = config || {}; - for (var name in defaults){ + + for (var name in defaults) { if (!(name in c)) c[name] = defaults[name]; } diff --git a/src/storage_manager/model/RemoteStorage.js b/src/storage_manager/model/RemoteStorage.js index a44e95c778..645fd938ff 100644 --- a/src/storage_manager/model/RemoteStorage.js +++ b/src/storage_manager/model/RemoteStorage.js @@ -1,6 +1,7 @@ -var Backbone = require('backbone'); +import fetch from 'utils/fetch'; +import { isUndefined } from 'underscore'; -module.exports = Backbone.Model.extend({ +module.exports = require('backbone').Model.extend({ defaults: { urlStore: '', @@ -12,67 +13,110 @@ module.exports = Backbone.Model.extend({ }, /** + * Triggered before the request is started * @private */ - store(data, clb) { - var fd = {}, - params = this.get('params'); - - for(var k in data) - fd[k] = data[k]; - - for(var key in params) - fd[key] = params[key]; - - let req = $.ajax({ - url: this.get('urlStore'), - beforeSend: this.get('beforeSend'), - complete: this.get('onComplete'), - method: 'POST', - dataType: 'json', - contentType: this.get('contentTypeJson') ? 'application/json; charset=utf-8': 'x-www-form-urlencoded', - data: this.get('contentTypeJson') ? JSON.stringify(fd): fd, - }); - - // Assign always callback when possible - req && req.always && req.always(() => { - if (typeof clb == 'function') { - clb(); - } - }); + onStart() { + const em = this.get('em'); + const before = this.get('beforeSend'); + before && before(); + em && em.trigger('storage:start'); + }, + + /** + * Triggered on request error + * @param {Object} err Error + * @private + */ + onError(err) { + const em = this.get('em'); + console.error(err); + em && em.trigger('storage:error', err); + this.onEnd(err); + }, + + /** + * Triggered after the request is ended + * @param {Object|string} res End result + * @private + */ + onEnd(res) { + const em = this.get('em'); + em && em.trigger('storage:end', res); }, /** + * Triggered on request response + * @param {string} text Response text * @private */ + onResponse(text, clb) { + const em = this.get('em'); + const complete = this.get('onComplete'); + const typeJson = this.get('contentTypeJson'); + const res = typeJson && typeof text === 'text' ? JSON.parse(text): text; + complete && complete(res); + clb && clb(res); + em && em.trigger('storage:response', res); + this.onEnd(text); + }, + + store(data, clb) { + const body = new FormData(); + + for (let key in data) { + body.append(key, data[key]); + } + + this.request(this.get('urlStore'), {body}, clb); + }, + load(keys, clb) { - var result = {}, - fd = {}, - params = this.get('params'); - - for(var key in params) - fd[key] = params[key]; - - fd.keys = keys; - - let req = $.ajax({ - url: this.get('urlLoad'), - beforeSend: this.get('beforeSend'), - complete: this.get('onComplete'), - data: fd, - async: false, - method: 'GET', - }).done(d => { - result = d; - }); - - // Assign always callback when possible - req && req.always && req.always((res) => { - if (typeof clb == 'function') { - clb(res); - } - }); - return result; + const body = new FormData(); + body.append('keys', keys); + this.request(this.get('urlLoad'), {body}, clb); + }, + + /** + * Execute remote request + * @param {string} url Url + * @param {Object} [opts={}] Options + * @param {[type]} [clb=null] Callback + * @private + */ + request(url, opts = {}, clb = null) { + const typeJson = this.get('contentTypeJson'); + const headers = this.get('headers'); + const params = this.get('params'); + const reqHead = 'X-Requested-With'; + const typeHead = 'Content-Type'; + const body = opts.body; + + for (let param in params) { + body.append(param, params[param]); + } + + if (isUndefined(headers[reqHead])) { + headers[reqHead] = 'XMLHttpRequest'; + } + + if (isUndefined(headers[typeHead])) { + headers[typeHead] = typeJson ? + 'application/json; charset=utf-8' : 'x-www-form-urlencoded'; + } + + this.onStart(); + fetch(url, { + method: opts.method || 'post', + credentials: 'include', + headers, + body, + }).then(res => (res.status/200|0) == 1 ? + res.text() : res.text().then((text) => + Promise.reject(text) + )) + .then((text) => this.onResponse(text, clb)) + .catch(err => this.onError(err)); }, }); From 38db0cc66c9725413ccc015e728eb47d14d695aa Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 25 Sep 2017 23:17:48 +0200 Subject: [PATCH 036/143] Prepare test environment without jquery --- src/domain_abstract/ui/InputColor.js | 6 +++--- src/editor/model/Editor.js | 9 +++++++++ src/grapesjs/index.js | 10 ---------- test/helper.js | 17 +++++++++-------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index 351584148a..a0c520ec58 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -1,6 +1,6 @@ -var Backbone = require('backbone'); -var Input = require('./Input'); -var Spectrum = require('spectrum-colorpicker'); +const Backbone = require('backbone'); +const Input = require('./Input'); +const Spectrum = require('spectrum-colorpicker'); const $ = Backbone.$; module.exports = Input.extend({ diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js index a99df7d40e..066e098744 100644 --- a/src/editor/model/Editor.js +++ b/src/editor/model/Editor.js @@ -25,6 +25,15 @@ const UndoManager = require('backbone-undo'); const key = require('keymaster'); let timedInterval; +const cash = require('cash-dom'); +require('utils/cashAdds')(cash); +let $ = $ || ''; + +if (!$) { + $ = cash; + window.$ = $; +} + if (!Backbone.$) { Backbone.$ = $; } diff --git a/src/grapesjs/index.js b/src/grapesjs/index.js index 096cd4e8a3..e856fd70f3 100644 --- a/src/grapesjs/index.js +++ b/src/grapesjs/index.js @@ -1,9 +1,6 @@ import { defaults } from 'underscore'; module.exports = (() => { - const cash = require('cash-dom'); - require('utils/cashAdds')(cash); - const defaultConfig = require('./config/config'); const Editor = require('editor'); const PluginManager = require('plugin_manager'); @@ -39,13 +36,6 @@ module.exports = (() => { */ init(config = {}) { const els = config.container; - let $ = $ || ''; - - // Make a missing $ more verbose - if (!$) { - $ = cash; - window.$ = $; - } if (!els) { throw new Error("'container' is required"); diff --git a/test/helper.js b/test/helper.js index f0c589883d..4eb70ff121 100644 --- a/test/helper.js +++ b/test/helper.js @@ -4,13 +4,10 @@ import sinon from 'sinon'; import Backbone from 'backbone'; import grapesjs from './../src'; import { JSDOM } from 'jsdom'; -import jquery from 'jquery'; const dom = new JSDOM(''); const window = dom.window; -const $ = jquery(window); - -//https://www.npmjs.com/package/proxyquire +//const $ = jquery(window); // Fix for the spectrum lib var Module = require('module'); @@ -18,7 +15,7 @@ var originalRequire = Module.prototype.require; Module.prototype.require = function(name) { if (name == 'jquery') { - return $; + return Backbone.$; } return originalRequire.apply(this, arguments); }; @@ -37,7 +34,6 @@ var localStorage = { global.window = window; global.document = window.document; -global.$ = $; global._ = _; global.expect = expect; global.sinon = sinon; @@ -45,8 +41,13 @@ global.grapesjs = grapesjs; global.Backbone = Backbone; global.localStorage = localStorage; global.SVGElement = global.Element; -window.$ = $; -Backbone.$ = $; +global.navigator = { + userAgent: 'node.js' +}; + +// Need this to trigger the cash generation +grapesjs.init({container: 'body', autorender: 0}); +window.$ = Backbone.$; Object.keys(window).forEach((key) => { if (!(key in global)) { From 58fab11faeacb600ad93b5ba8e1b7a7d41985dca Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 26 Sep 2017 01:58:51 +0200 Subject: [PATCH 037/143] Fix regressions in AssetManager --- src/asset_manager/view/AssetsView.js | 3 +- test/specs/asset_manager/index.js | 4 ++ .../asset_manager/view/AssetImageView.js | 43 ++++++--------- test/specs/asset_manager/view/AssetView.js | 13 +---- test/specs/asset_manager/view/AssetsView.js | 55 ++++++++----------- test/specs/asset_manager/view/FileUploader.js | 29 ++++------ 6 files changed, 61 insertions(+), 86 deletions(-) diff --git a/src/asset_manager/view/AssetsView.js b/src/asset_manager/view/AssetsView.js index 2baee1deba..e3173139aa 100644 --- a/src/asset_manager/view/AssetsView.js +++ b/src/asset_manager/view/AssetsView.js @@ -153,7 +153,8 @@ module.exports = Backbone.View.extend({ if (hide) { assetsEl.empty(); } else { - assetsEl.append(this.config.noAssets); + const noAssets = this.config.noAssets; + noAssets && assetsEl.append(noAssets); } }, diff --git a/test/specs/asset_manager/index.js b/test/specs/asset_manager/index.js index fca6f73b64..5025642ad5 100644 --- a/test/specs/asset_manager/index.js +++ b/test/specs/asset_manager/index.js @@ -21,6 +21,7 @@ describe('Asset Manager', () => { }; beforeEach(() => { + document.body.innerHTML = '
'; imgObj = { type: 'image', src: 'path/to/image', @@ -29,6 +30,7 @@ describe('Asset Manager', () => { }; obj = new AssetManager(); obj.init(); + document.body.querySelector('#asset-c').appendChild(obj.render()); }); afterEach(() => { @@ -88,6 +90,7 @@ describe('Asset Manager', () => { var storageManager; beforeEach(() => { + document.body.innerHTML = '
'; storageManager = new StorageManager().init({ autoload: 0, type: storageId @@ -96,6 +99,7 @@ describe('Asset Manager', () => { stm: storageManager, }); storageManager.add(storageId, storageMock); + document.body.querySelector('#asset-c').appendChild(obj.render()); }); afterEach(() => { diff --git a/test/specs/asset_manager/view/AssetImageView.js b/test/specs/asset_manager/view/AssetImageView.js index b348172bbb..9209916294 100644 --- a/test/specs/asset_manager/view/AssetImageView.js +++ b/test/specs/asset_manager/view/AssetImageView.js @@ -4,32 +4,25 @@ var Assets = require('asset_manager/model/Assets'); module.exports = { run() { + let obj; describe('AssetImageView', () => { - before(function () { - this.$fixtures = $("#fixtures"); - this.$fixture = $('
'); - }); - beforeEach(function () { var coll = new Assets(); var model = coll.add({ type:'image', src: '/test' }); - this.view = new AssetImageView({ + obj = new AssetImageView({ collection: new Assets(), config : {}, model }); - this.$fixture.empty().appendTo(this.$fixtures); - this.$fixture.html(this.view.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(obj.render().el); }); afterEach(function () { - this.view = null; - }); - - after(function () { - this.$fixture.empty(); + obj = null; + document.body.innerHTML = ''; }); it('Object exists', () => { @@ -39,41 +32,41 @@ module.exports = { describe('Asset should be rendered correctly', () => { it('Has preview box', function() { - var $asset = this.view.$el; + var $asset = obj.$el; expect($asset.find('.preview').length).toEqual(1); }); it('Has meta box', function() { - var $asset = this.view.$el; + var $asset = obj.$el; expect($asset.find('.meta').length).toEqual(1); }); it('Has close button', function() { - var $asset = this.view.$el; + var $asset = obj.$el; expect($asset.find('[data-toggle=asset-remove]').length).toEqual(1); }); }); it('Could be selected', function() { - var spy = expect.spyOn(this.view, 'updateTarget'); - this.view.$el.trigger('click'); - expect(this.view.$el.attr('class')).toInclude('highlight'); + var spy = expect.spyOn(obj, 'updateTarget'); + obj.onClick(); + expect(obj.$el.attr('class')).toInclude('highlight'); expect(spy).toHaveBeenCalled(); }); it('Could be chosen', function() { - sinon.stub(this.view, 'updateTarget'); - var spy = expect.spyOn(this.view, 'updateTarget'); - this.view.$el.trigger('dblclick'); + sinon.stub(obj, 'updateTarget'); + var spy = expect.spyOn(obj, 'updateTarget'); + obj.onDblClick(); expect(spy).toHaveBeenCalled(); - //this.view.updateTarget.calledOnce.should.equal(true); + //obj.updateTarget.calledOnce.should.equal(true); }); it('Could be removed', function() { var spy = sinon.spy(); - this.view.model.on("remove", spy); - this.view.$el.find('[data-toggle=asset-remove]').trigger('click'); + obj.model.on("remove", spy); + obj.onRemove({stopPropagation() {}}); expect(spy.called).toEqual(true); }); diff --git a/test/specs/asset_manager/view/AssetView.js b/test/specs/asset_manager/view/AssetView.js index ddf310458c..4e866d3e25 100644 --- a/test/specs/asset_manager/view/AssetView.js +++ b/test/specs/asset_manager/view/AssetView.js @@ -7,11 +7,6 @@ module.exports = { describe('AssetView', () => { - before(function () { - this.$fixtures = $("#fixtures"); - this.$fixture = $('
'); - }); - beforeEach(function () { var coll = new Assets(); var model = coll.add({src: 'test'}); @@ -19,18 +14,14 @@ module.exports = { config : {}, model }); - this.$fixture.empty().appendTo(this.$fixtures); - this.$fixture.html(this.view.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(this.view.render().el); }); afterEach(function () { this.view.remove(); }); - after(function () { - this.$fixture.remove(); - }); - it('Object exists', () => { expect(AssetView).toExist(); }); diff --git a/test/specs/asset_manager/view/AssetsView.js b/test/specs/asset_manager/view/AssetsView.js index 0cf4014372..94d13d3e26 100644 --- a/test/specs/asset_manager/view/AssetsView.js +++ b/test/specs/asset_manager/view/AssetsView.js @@ -8,31 +8,24 @@ module.exports = { describe('AssetsView', () => { var obj; - - before(function () { - this.$fixtures = $("#fixtures"); - this.$fixture = $('
'); - }); + var coll; beforeEach(function () { - this.coll = new Assets([]); - this.view = new AssetsView({ + coll = new Assets([]); + obj = new AssetsView({ config: {}, - collection: this.coll, + collection: coll, globalCollection: new Assets([]), fu: new FileUploader({}) }); - obj = this.view; - this.$fixture.empty().appendTo(this.$fixtures); - this.$fixture.html(this.view.render().el); + obj = obj; + document.body.innerHTML = '
'; + obj.render(); + document.body.querySelector('#fixtures').appendChild(obj.el); }); afterEach(function () { - this.view.collection.reset(); - }); - - after(function () { - this.$fixture.remove(); + obj.collection.reset(); }); it('Object exists', () => { @@ -40,38 +33,38 @@ module.exports = { }); it("Collection is empty", function (){ - expect(this.view.getAssetsEl().innerHTML).toNotExist(); + expect(obj.getAssetsEl().innerHTML).toNotExist(); }); it("Add new asset", function (){ - sinon.stub(this.view, "addAsset"); - this.coll.add({src: 'test'}); - expect(this.view.addAsset.calledOnce).toEqual(true); + sinon.stub(obj, "addAsset"); + coll.add({src: 'test'}); + expect(obj.addAsset.calledOnce).toEqual(true); }); it("Render new asset", function (){ - this.coll.add({src: 'test'}); - expect(this.view.getAssetsEl().innerHTML).toExist(); + coll.add({src: 'test'}); + expect(obj.getAssetsEl().innerHTML).toExist(); }); it("Render correctly new image asset", function (){ - this.coll.add({ type: 'image', src: 'test'}); - var asset = this.view.getAssetsEl().firstChild; + coll.add({ type: 'image', src: 'test'}); + var asset = obj.getAssetsEl().firstChild; expect(asset.tagName).toEqual('DIV'); expect(asset.innerHTML).toExist(); }); it("Clean collection from asset", function (){ - var model = this.coll.add({src: 'test'}); - this.coll.remove(model); - expect(this.view.getAssetsEl().innerHTML).toNotExist(); + var model = coll.add({src: 'test'}); + coll.remove(model); + expect(obj.getAssetsEl().innerHTML).toNotExist(); }); it("Deselect works", function (){ - this.coll.add([{},{}]); - var $asset = this.view.$el.children().first(); - $asset.attr('class', this.view.pfx + 'highlight'); - this.coll.trigger('deselectAll'); + coll.add([{},{}]); + var $asset = obj.$el.children().first(); + $asset.attr('class', obj.pfx + 'highlight'); + coll.trigger('deselectAll'); expect($asset.attr('class')).toNotExist(); }); diff --git a/test/specs/asset_manager/view/FileUploader.js b/test/specs/asset_manager/view/FileUploader.js index e79610795c..27a89ae0d9 100644 --- a/test/specs/asset_manager/view/FileUploader.js +++ b/test/specs/asset_manager/view/FileUploader.js @@ -6,23 +6,16 @@ module.exports = { describe('File Uploader', () => { - before(function () { - this.$fixtures = $("#fixtures"); - this.$fixture = $('
'); - }); + let obj; beforeEach(function () { - this.view = new FileUploader({ config : {} }); - this.$fixture.empty().appendTo(this.$fixtures); - this.$fixture.html(this.view.render().el); + obj = new FileUploader({ config : {} }); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(obj.render().el); }); afterEach(function () { - this.view.remove(); - }); - - after(function () { - this.$fixture.remove(); + obj.remove(); }); it('Object exists', () => { @@ -30,25 +23,25 @@ module.exports = { }); it('Has correct prefix', function() { - expect(this.view.pfx).toNotExist(); + expect(obj.pfx).toNotExist(); }); describe('Should be rendered correctly', () => { it('Has title', function() { - expect(this.view.$el.find('#title').length).toEqual(1); + expect(obj.$el.find('#title').length).toEqual(1); }); it('Title is empty', function() { - expect(this.view.$el.find('#title').html()).toEqual(''); + expect(obj.$el.find('#title').html()).toEqual(''); }); it('Has file input', function() { - expect(this.view.$el.find('input[type=file]').length).toEqual(1); + expect(obj.$el.find('input[type=file]').length).toEqual(1); }); it('File input is enabled', function() { - expect(this.view.$el.find('input[type=file]').prop('disabled')).toEqual(true); + expect(obj.$el.find('input[type=file]').prop('disabled')).toEqual(true); }); }); @@ -71,7 +64,7 @@ module.exports = { view.render(); expect(view.$el.find('input[type=file]').prop('disabled')).toEqual(true); }); - + it('Handles embedAsBase64 parameter', () => { var view = new FileUploader({ config : { embedAsBase64: true From f1633ed20826fb5b12c1660090e58e45d113cbe7 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 26 Sep 2017 02:01:11 +0200 Subject: [PATCH 038/143] Fix blocks regressions --- test/specs/block_manager/view/BlocksView.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/test/specs/block_manager/view/BlocksView.js b/test/specs/block_manager/view/BlocksView.js index 627935b542..e324cf6dce 100644 --- a/test/specs/block_manager/view/BlocksView.js +++ b/test/specs/block_manager/view/BlocksView.js @@ -13,26 +13,17 @@ module.exports = { var editorModel; var ppfx; - before(() => { - $fixtures = $('#fixtures'); - $fixture = $('
'); - }); - beforeEach(() => { model = new Blocks([]); view = new BlocksView({ collection: model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(view.render().el); }); afterEach(() => { view.collection.reset(); }); - after(() => { - $fixture.remove(); - }); - it("The container is not empty", () => { expect(view.el.outerHTML).toExist(); }); @@ -69,8 +60,8 @@ module.exports = { },{ pStylePrefix: ppfx }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(view.render().el); }); it("Render children", () => { From 5baa182873ee24f17697f6ce606a7bef677f35d8 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 26 Sep 2017 02:05:02 +0200 Subject: [PATCH 039/143] Fix CSSComposer regressions --- test/specs/css_composer/view/CssRuleView.js | 24 +++++++++------------ 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/test/specs/css_composer/view/CssRuleView.js b/test/specs/css_composer/view/CssRuleView.js index c827e29fec..757b7feb00 100644 --- a/test/specs/css_composer/view/CssRuleView.js +++ b/test/specs/css_composer/view/CssRuleView.js @@ -3,32 +3,25 @@ var CssRule = require('css_composer/model/CssRule'); module.exports = { run() { - describe('CssRuleView', () => { + describe.only('CssRuleView', () => { let obj; - - before(function () { - this.$fixtures = $("#fixtures"); - this.$fixture = $('
'); - }); + let fixtures; beforeEach(function () { var m = new CssRule(); obj = new CssRuleView({ model: m }); - this.$fixture.empty().appendTo(this.$fixtures); - this.$fixture.html(obj.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(obj.render().el); }); afterEach(() => { obj.model.destroy(); }); - after(function () { - this.$fixture.remove(); - }); - it('Object exists', () => { expect(CssRuleView).toExist(); }); @@ -54,12 +47,12 @@ module.exports = { }); it('Empty style inside', function() { - expect(this.$fixture.html()).toEqual(''); + expect(fixtures.innerHTML).toEqual(''); }); it('On update of style always empty as there is no selectors', function() { obj.model.set('style', {'prop':'value'}); - expect(this.$fixture.html()).toEqual(''); + expect(fixtures.innerHTML).toEqual(''); }); describe('CssRuleView with selectors', () => { @@ -74,6 +67,9 @@ module.exports = { model: m }); objReg.render(); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(objReg.el); }); afterEach(() => { From 8bb67e8862108f8761c0f894647ba1f54aa0ff8d Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 26 Sep 2017 02:09:49 +0200 Subject: [PATCH 040/143] Fix devices regressions --- test/specs/css_composer/view/CssRuleView.js | 2 +- test/specs/css_composer/view/CssRulesView.js | 13 ++----------- test/specs/device_manager/view/DevicesView.js | 17 ++++------------- 3 files changed, 7 insertions(+), 25 deletions(-) diff --git a/test/specs/css_composer/view/CssRuleView.js b/test/specs/css_composer/view/CssRuleView.js index 757b7feb00..218177efca 100644 --- a/test/specs/css_composer/view/CssRuleView.js +++ b/test/specs/css_composer/view/CssRuleView.js @@ -3,7 +3,7 @@ var CssRule = require('css_composer/model/CssRule'); module.exports = { run() { - describe.only('CssRuleView', () => { + describe('CssRuleView', () => { let obj; let fixtures; diff --git a/test/specs/css_composer/view/CssRulesView.js b/test/specs/css_composer/view/CssRulesView.js index fbca5f2e89..d5a6ac777c 100644 --- a/test/specs/css_composer/view/CssRulesView.js +++ b/test/specs/css_composer/view/CssRulesView.js @@ -7,28 +7,19 @@ module.exports = { let obj; - before(function () { - this.$fixtures = $("#fixtures"); - this.$fixture = $('
'); - }); - beforeEach(function () { var col = new CssRules([]); obj = new CssRulesView({ collection: col }); - this.$fixture.empty().appendTo(this.$fixtures); - this.$fixture.html(obj.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(obj.render().el); }); afterEach(() => { obj.collection.reset(); }); - after(function () { - this.$fixture.remove(); - }); - it('Object exists', () => { expect(CssRulesView).toExist(); }); diff --git a/test/specs/device_manager/view/DevicesView.js b/test/specs/device_manager/view/DevicesView.js index e2836b0a0a..262bd60e0a 100644 --- a/test/specs/device_manager/view/DevicesView.js +++ b/test/specs/device_manager/view/DevicesView.js @@ -11,28 +11,19 @@ module.exports = { var view; var editorModel; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { model = new Devices([]); view = new DevicesView({ collection: model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(view.render().el); }); afterEach(() => { view.collection.reset(); }); - after(() => { - $fixture.remove(); - }); - it("The content is not empty", () => { expect(view.el.innerHTML).toExist(); }); @@ -58,8 +49,8 @@ module.exports = { collection: model, config: { em: editorModel } }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(view.render().el); }); it("Update device on select change", () => { From 2043ff3df33e28af264c8c7aa452b0022551d4ef Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 26 Sep 2017 02:28:15 +0200 Subject: [PATCH 041/143] Fix dom_components regressions --- test/specs/dom_components/index.js | 11 ++++--- .../dom_components/view/ComponentImageView.js | 15 ++------- .../dom_components/view/ComponentTextView.js | 22 +++++-------- test/specs/dom_components/view/ComponentV.js | 31 ++++++++----------- .../dom_components/view/ComponentsView.js | 13 ++------ 5 files changed, 31 insertions(+), 61 deletions(-) diff --git a/test/specs/dom_components/index.js b/test/specs/dom_components/index.js index 9e7067047e..cdae7b0ff6 100644 --- a/test/specs/dom_components/index.js +++ b/test/specs/dom_components/index.js @@ -113,9 +113,12 @@ describe('DOM Components', () => { }); ComponentModels.run(); - ComponentView.run(); - ComponentsView.run(); - ComponentTextView.run(); - ComponentImageView.run(); + + describe('Views', () => { + ComponentView.run(); + ComponentsView.run(); + ComponentTextView.run(); + ComponentImageView.run(); + }); }); diff --git a/test/specs/dom_components/view/ComponentImageView.js b/test/specs/dom_components/view/ComponentImageView.js index 6f642346d9..5408556246 100644 --- a/test/specs/dom_components/view/ComponentImageView.js +++ b/test/specs/dom_components/view/ComponentImageView.js @@ -6,33 +6,22 @@ module.exports = { describe('ComponentImageView', () => { - var $fixtures; - var $fixture; var model; var view; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { model = new Component(); view = new ComponentImageView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(view.render().el); }); afterEach(() => { view.remove(); }); - after(() => { - $fixture.remove(); - }); - it('Component empty', () => { expect(view.el.getAttribute('onmousedown')).toEqual('return false'); expect(view.el.getAttribute('class')).toEqual(view.classEmpty); diff --git a/test/specs/dom_components/view/ComponentTextView.js b/test/specs/dom_components/view/ComponentTextView.js index bc199c4b08..ea4c7c022c 100644 --- a/test/specs/dom_components/view/ComponentTextView.js +++ b/test/specs/dom_components/view/ComponentTextView.js @@ -6,35 +6,26 @@ module.exports = { describe('ComponentTextView', () => { - var $fixtures; - var $fixture; + var fixtures; var model; var view; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { model = new Component(); view = new ComponentTextView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); afterEach(() => { view.remove(); }); - after(() => { - $fixture.remove(); - }); - it('Component empty', () => { - expect($fixture.html()).toEqual('
'); + expect(fixtures.innerHTML).toEqual('
'); }); it('Input content is stored in model', () => { @@ -47,7 +38,8 @@ module.exports = { it('Init with content', () => { model = new Component({ content: 'test' }); view = new ComponentTextView({ model }); - expect(view.render().el.innerHTML).toEqual('test'); + fixtures.appendChild(view.render().el); + expect(view.el.innerHTML).toEqual('test'); }); }); diff --git a/test/specs/dom_components/view/ComponentV.js b/test/specs/dom_components/view/ComponentV.js index 36b2f4da93..26bd5d0b95 100644 --- a/test/specs/dom_components/view/ComponentV.js +++ b/test/specs/dom_components/view/ComponentV.js @@ -7,19 +7,13 @@ module.exports = { describe('ComponentView', () => { - var $fixtures; - var $fixture; + var fixtures; var model; var view; var hClass = 'hc-state'; var dcomp; var compOpts; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { dcomp = new DomComponents(); compOpts = { @@ -29,36 +23,33 @@ module.exports = { view = new ComponentView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); afterEach(() => { view.remove(); }); - after(() => { - $fixture.remove(); - }); - it('Component empty', () => { - expect($fixture.html()).toEqual('
'); + expect(fixtures.innerHTML).toEqual('
'); }); it('Add helper class on update of state', () => { model.set('state', 'test'); - expect($fixture.html()).toEqual('
'); + expect(fixtures.innerHTML).toEqual('
'); }); it('Clean form helper state', () => { model.set('state', 'test'); model.set('state', ''); - expect($fixture.html()).toEqual('
'); + expect(fixtures.innerHTML).toEqual('
'); }); it('Add helper class on status update', () => { model.set('status', 'selected'); - expect($fixture.html()).toEqual('
'); + expect(fixtures.innerHTML).toEqual('
'); }); it('Get string of classes', () => { @@ -117,6 +108,8 @@ module.exports = { it('Init with different tag', () => { model = new Component({ tagName: 'span' }); view = new ComponentView({ model }); + fixtures.innerHTML = ''; + fixtures.appendChild(view.render().el); expect(view.render().el.tagName).toEqual('SPAN'); }); @@ -131,7 +124,9 @@ module.exports = { model, componentTypes: dcomp.componentTypes, }); - expect(view.render().$el.html()).toEqual('
'); + fixtures.innerHTML = ''; + fixtures.appendChild(view.render().el); + expect(view.$el.html()).toEqual('
'); }); }); diff --git a/test/specs/dom_components/view/ComponentsView.js b/test/specs/dom_components/view/ComponentsView.js index 18634674b4..8d7584cac6 100644 --- a/test/specs/dom_components/view/ComponentsView.js +++ b/test/specs/dom_components/view/ComponentsView.js @@ -13,11 +13,6 @@ module.exports = { var dcomp; var compOpts; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { dcomp = new DomComponents(); compOpts = { @@ -28,18 +23,14 @@ module.exports = { collection: model, componentTypes: dcomp.componentTypes, }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(view.render().el); }); afterEach(() => { view.collection.reset(); }); - after(() => { - $fixture.remove(); - }); - it("Collection is empty", () => { expect(view.$el.html()).toNotExist(); }); From 191ae0c4d38999a97c1b0c52d257248682114caf Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 26 Sep 2017 20:54:05 +0200 Subject: [PATCH 042/143] Add imports-loader --- package.json | 1 + src/commands/view/OpenStyleManager.js | 10 ++++++---- test/helper.js | 5 ++++- test/main.js | 2 +- test/specs/grapesjs/index.js | 15 ++++++++------- test/specs/modal/view/ModalView.js | 17 +++-------------- test/specs/selector_manager/index.js | 5 ++++- webpack.config.js | 8 +++++++- yarn.lock | 11 +++++++++++ 9 files changed, 45 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 8ef1991ed0..8b975edf38 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "documentation": "^5.3.0", "eslint": "^4.1.1", "expect": "^1.20.2", + "imports-loader": "^0.7.1", "istanbul": "^0.4.2", "jsdom": "^11.2.0", "mocha": "^3.1.2", diff --git a/src/commands/view/OpenStyleManager.js b/src/commands/view/OpenStyleManager.js index b9c2732921..2976e120fc 100644 --- a/src/commands/view/OpenStyleManager.js +++ b/src/commands/view/OpenStyleManager.js @@ -1,16 +1,18 @@ -var StyleManager = require('style_manager'); +const StyleManager = require('style_manager'); +const Backbone = require('backbone'); +const $ = Backbone.$; module.exports = { run(em, sender) { this.sender = sender; - if(!this.$cn){ + if (!this.$cn) { var config = em.getConfig(), panels = em.Panels; // Main container - this.$cn = $('
'); + this.$cn = $('
'); // Secondary container - this.$cn2 = $('
'); + this.$cn2 = $('
'); this.$cn.append(this.$cn2); // Device Manager diff --git a/test/helper.js b/test/helper.js index 4eb70ff121..07cfbf1e50 100644 --- a/test/helper.js +++ b/test/helper.js @@ -46,7 +46,10 @@ global.navigator = { }; // Need this to trigger the cash generation -grapesjs.init({container: 'body', autorender: 0}); +grapesjs.init({container: 'body',autorender: 0, storageManager: { + autoload: 0, + type:'none' +},}); window.$ = Backbone.$; Object.keys(window).forEach((key) => { diff --git a/test/main.js b/test/main.js index c470e91903..5c68d61a08 100644 --- a/test/main.js +++ b/test/main.js @@ -16,7 +16,6 @@ describe('Main', () => { require(`${path}css_composer`); require(`${path}device_manager`); require(`${path}dom_components`); - require(`${path}grapesjs`); require(`${path}modal`); require(`${path}panels`); require(`${path}parser`); @@ -25,4 +24,5 @@ describe('Main', () => { require(`${path}storage_manager`); require(`${path}style_manager`); require(`${path}trait_manager`); + require(`${path}grapesjs`); }); diff --git a/test/specs/grapesjs/index.js b/test/specs/grapesjs/index.js index 813e237c5a..d3e5253b16 100644 --- a/test/specs/grapesjs/index.js +++ b/test/specs/grapesjs/index.js @@ -2,7 +2,7 @@ const PluginManager = require('plugin_manager'); describe('GrapesJS', () => { - describe('Main', () => { + describe.skip('Main', () => { var obj; var fixtures; @@ -26,7 +26,6 @@ describe('GrapesJS', () => { before(() => { editorName = 'editor-fixture'; - fixtures = $("#fixtures"); }); beforeEach(() => { @@ -41,14 +40,16 @@ describe('GrapesJS', () => { }, } obj = grapesjs; - fixture = $('
'); - fixture.empty().appendTo(fixtures); + //fixture = $('
'); + //fixture.empty().appendTo(fixtures); + + document.body.innerHTML = `
`; + fixtures = document.body.querySelector('#fixtures'); }); afterEach(() => { config = {}; obj = null; - fixture.remove(); }); it('Main object should be loaded', () => { @@ -59,7 +60,7 @@ describe('GrapesJS', () => { var editor = obj.init(config); expect(editor).toExist(); }); - + it('Init new editor with node for container', () => { var configAlt = { container: document.createElement('div'), @@ -101,7 +102,7 @@ describe('GrapesJS', () => { it.skip('Init editor from element', () => { config.fromElement = 1; - fixture.html(documentEl); + fixtures.innerHTML = documentEl; var editor = obj.init(config); var html = editor.getHtml(); var css = editor.getCss(); diff --git a/test/specs/modal/view/ModalView.js b/test/specs/modal/view/ModalView.js index 7cf60f09c5..543c057c0b 100644 --- a/test/specs/modal/view/ModalView.js +++ b/test/specs/modal/view/ModalView.js @@ -3,26 +3,19 @@ const Modal = require('modal_dialog/model/Modal'); module.exports = { run() { - describe('ModalView', () => { + describe.only('ModalView', () => { - var $fixtures; - var $fixture; var model; var view; var editorModel; - before(() => { - $fixtures = $("#fixtures"); - $fixture= $(''); - }); - beforeEach(() => { model = new Modal(); view = new ModalView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + document.body.querySelector('#fixtures').appendChild(view.render().el); }); afterEach(() => { @@ -30,10 +23,6 @@ module.exports = { model = null; }); - after(() => { - $fixture.remove(); - }); - it("The content is not empty", () => { expect(view.el.innerHTML).toExist(); }); diff --git a/test/specs/selector_manager/index.js b/test/specs/selector_manager/index.js index 6c1d44484d..c4fe95e3b6 100644 --- a/test/specs/selector_manager/index.js +++ b/test/specs/selector_manager/index.js @@ -80,6 +80,9 @@ describe('SelectorManager', () => { Models.run(); ClassTagView.run(); ClassTagsView.run(); - e2e.run(); + + describe.skip('E2E', () => { + e2e.run(); + }); }); diff --git a/webpack.config.js b/webpack.config.js index 03ede1cf11..533226f304 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,7 +15,10 @@ if(env !== 'dev') { ] } -plugins.push(new webpack.ProvidePlugin({_: 'underscore'})); +plugins.push(new webpack.ProvidePlugin({ + _: 'underscore', + Backbone: 'backbone' +})); module.exports = { entry: './src', @@ -27,6 +30,9 @@ module.exports = { plugins: plugins, module: { loaders: [{ + test: /backbone\.js$/, + use: ['imports-loader?define=>false'] + },{ test: /grapesjs\/index\.js$/, loader: 'string-replace-loader', query: { diff --git a/yarn.lock b/yarn.lock index 5b678eec38..ada2eb07df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1252,6 +1252,10 @@ caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" +cash-dom@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/cash-dom/-/cash-dom-1.3.5.tgz#f58698933561217bf408b5c3f5fb60aaba866e20" + ccount@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.2.tgz#53b6a2f815bb77b9c2871f7b9a72c3a25f1d8e89" @@ -2926,6 +2930,13 @@ ignore@^3.3.3: version "3.3.5" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.5.tgz#c4e715455f6073a8d7e5dae72d2fc9d71663dba6" +imports-loader@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/imports-loader/-/imports-loader-0.7.1.tgz#f204b5f34702a32c1db7d48d89d5e867a0441253" + dependencies: + loader-utils "^1.0.2" + source-map "^0.5.6" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" From d73fee6277f7c86ee93af6f648bb3c438b99cef7 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 26 Sep 2017 22:44:39 +0200 Subject: [PATCH 043/143] General updates by removing dependencies from jquery --- src/canvas/view/CanvasView.js | 2 +- src/commands/view/CommandAbstract.js | 188 +++++++++--------- src/dom_components/view/ComponentView.js | 4 +- src/domain_abstract/ui/Input.js | 15 +- src/domain_abstract/ui/InputNumber.js | 13 +- src/editor/model/Editor.js | 9 +- src/editor/view/EditorView.js | 2 + src/style_manager/view/PropertiesView.js | 18 +- .../view/PropertyCompositeView.js | 1 + src/style_manager/view/PropertySelectView.js | 2 + src/style_manager/view/PropertyStackView.js | 1 - src/style_manager/view/PropertyView.js | 2 +- test/helper.js | 3 +- webpack.config.js | 6 +- 14 files changed, 133 insertions(+), 133 deletions(-) diff --git a/src/canvas/view/CanvasView.js b/src/canvas/view/CanvasView.js index 1afd43f8f1..d68a474e27 100644 --- a/src/canvas/view/CanvasView.js +++ b/src/canvas/view/CanvasView.js @@ -1,5 +1,5 @@ -const Backbone = require('backbone'); const FrameView = require('./FrameView'); +const $ = Backbone.$; module.exports = Backbone.View.extend({ diff --git a/src/commands/view/CommandAbstract.js b/src/commands/view/CommandAbstract.js index 18c2d4093c..8c615b8e81 100644 --- a/src/commands/view/CommandAbstract.js +++ b/src/commands/view/CommandAbstract.js @@ -1,78 +1,78 @@ -var Backbone = require('backbone'); +const $ = Backbone.$ module.exports = Backbone.View.extend({ - /** - * Initialize method that can't be removed - * @param {Object} o Options - * @private - * */ - initialize(o) { - this.config = o || {}; - 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'); - - if(this.em.get) - this.setElement(this.getCanvas()); - - if(this.canvas){ - this.$canvas = this.$el; - this.$wrapper = $(this.getCanvasWrapper()); - this.frameEl = this.canvas.getFrameEl(); - this.canvasTool = this.getCanvasTools(); - this.bodyEl = this.getCanvasBody(); - } - - this.init(this.config); - }, - - /** - * On frame scroll callback - * @param {[type]} e [description] - * @return {[type]} [description] - */ - onFrameScroll(e) {}, - - /** - * Returns canval element - * @return {HTMLElement} - */ - getCanvas() { - return this.canvas.getElement(); - }, - - /** - * Get canvas body element - * @return {HTMLElement} - */ - getCanvasBody() { - return this.canvas.getBody(); - }, - - /** - * Get canvas wrapper element - * @return {HTMLElement} - */ - getCanvasWrapper() { - return this.canvas.getWrapperEl(); - }, - - /** - * Get canvas wrapper element - * @return {HTMLElement} - */ - getCanvasTools() { - return this.canvas.getToolsEl(); - }, - - /** + /** + * Initialize method that can't be removed + * @param {Object} o Options + * @private + * */ + initialize(o) { + this.config = o || {}; + 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'); + + if(this.em.get) + this.setElement(this.getCanvas()); + + if(this.canvas){ + this.$canvas = this.$el; + this.$wrapper = $(this.getCanvasWrapper()); + this.frameEl = this.canvas.getFrameEl(); + this.canvasTool = this.getCanvasTools(); + this.bodyEl = this.getCanvasBody(); + } + + this.init(this.config); + }, + + /** + * On frame scroll callback + * @param {[type]} e [description] + * @return {[type]} [description] + */ + onFrameScroll(e) {}, + + /** + * Returns canval element + * @return {HTMLElement} + */ + getCanvas() { + return this.canvas.getElement(); + }, + + /** + * Get canvas body element + * @return {HTMLElement} + */ + getCanvasBody() { + return this.canvas.getBody(); + }, + + /** + * Get canvas wrapper element + * @return {HTMLElement} + */ + getCanvasWrapper() { + return this.canvas.getWrapperEl(); + }, + + /** + * Get canvas wrapper element + * @return {HTMLElement} + */ + getCanvasTools() { + return this.canvas.getToolsEl(); + }, + + /** * Get the offset of the element * @param {HTMLElement} el * @return {Object} @@ -85,27 +85,27 @@ module.exports = Backbone.View.extend({ }; }, - /** - * Callback triggered after initialize - * @param {Object} o Options - * @private - * */ - init(o) {}, - - /** - * Method that run command - * @param {Object} em Editor model - * @param {Object} sender Button sender - * @private - * */ - run(em, sender) {}, - - /** - * Method that stop command - * @param {Object} em Editor model - * @param {Object} sender Button sender - * @private - * */ - stop(em, sender) {}, + /** + * Callback triggered after initialize + * @param {Object} o Options + * @private + * */ + init(o) {}, + + /** + * Method that run command + * @param {Object} em Editor model + * @param {Object} sender Button sender + * @private + * */ + run(em, sender) {}, + + /** + * Method that stop command + * @param {Object} em Editor model + * @param {Object} sender Button sender + * @private + * */ + stop(em, sender) {}, }); diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index bc216642cf..28c9f6f850 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -1,5 +1,5 @@ -var Backbone = require('backbone'); -var ComponentsView = require('./ComponentsView'); +const ComponentsView = require('./ComponentsView'); +const $ = Backbone.$; module.exports = Backbone.View.extend({ diff --git a/src/domain_abstract/ui/Input.js b/src/domain_abstract/ui/Input.js index c5f92dc321..1ee991690f 100644 --- a/src/domain_abstract/ui/Input.js +++ b/src/domain_abstract/ui/Input.js @@ -1,4 +1,4 @@ -var Backbone = require('backbone'); +const $ = Backbone.$; module.exports = Backbone.View.extend({ @@ -6,8 +6,6 @@ module.exports = Backbone.View.extend({ 'change': 'handleChange', }, - template: _.template(``), - initialize(opts) { var opt = opts || {}; var ppfx = opt.ppfx || ''; @@ -66,13 +64,12 @@ module.exports = Backbone.View.extend({ }, render() { - var el = this.$el; + const el = this.$el; + const ppfx = this.ppfx; + const holderClass = `${ppfx}input-holder`; el.addClass(this.inputClass); - el.html(this.template({ - holderClass: this.inputHolderClass, - ppfx: this.ppfx - })); - el.find('.'+ this.inputHolderClass).html(this.getInputEl()); + el.html(``); + el.find(`.${holderClass}`).append(this.getInputEl()); return this; } diff --git a/src/domain_abstract/ui/InputNumber.js b/src/domain_abstract/ui/InputNumber.js index 41bac9c911..80ebd3523c 100644 --- a/src/domain_abstract/ui/InputNumber.js +++ b/src/domain_abstract/ui/InputNumber.js @@ -102,7 +102,7 @@ module.exports = Backbone.View.extend({ * @return {HTMLElement} */ getInputEl() { - if(!this.inputEl) { + if (!this.inputEl) { const cls = this.inputCls; const plh = this.model.get('defaults'); this.inputEl = $(``); @@ -277,11 +277,12 @@ module.exports = Backbone.View.extend({ }, render() { - var ppfx = this.ppfx; - this.$el.html(this.template({ppfx})); - this.$el.find('.'+ ppfx +'input-holder').html(this.getInputEl()); - this.$el.find('.' + ppfx + 'field-units').html(this.getUnitEl()); - this.$el.addClass(this.contClass); + const ppfx = this.ppfx; + const el = this.$el; + el.html(this.template({ppfx})); + el.find(`.${ppfx}input-holder`).append(this.getInputEl()); + el.find(`.${ppfx}field-units`).html(this.getUnitEl()); + el.addClass(this.contClass); return this; } diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js index 066e098744..6f1ab7a04c 100644 --- a/src/editor/model/Editor.js +++ b/src/editor/model/Editor.js @@ -25,18 +25,17 @@ const UndoManager = require('backbone-undo'); const key = require('keymaster'); let timedInterval; -const cash = require('cash-dom'); -require('utils/cashAdds')(cash); -let $ = $ || ''; +require('utils/cashAdds')(Backbone.$); +/* if (!$) { $ = cash; window.$ = $; } - +console.log(Backbone.$); if (!Backbone.$) { Backbone.$ = $; -} +}*/ module.exports = Backbone.Model.extend({ diff --git a/src/editor/view/EditorView.js b/src/editor/view/EditorView.js index ee8ef81d0c..9b23c353ce 100644 --- a/src/editor/view/EditorView.js +++ b/src/editor/view/EditorView.js @@ -1,3 +1,5 @@ +const $ = Backbone.$; + module.exports = Backbone.View.extend({ initialize() { diff --git a/src/style_manager/view/PropertiesView.js b/src/style_manager/view/PropertiesView.js index 2686210b13..da3ec1ee58 100644 --- a/src/style_manager/view/PropertiesView.js +++ b/src/style_manager/view/PropertiesView.js @@ -1,12 +1,11 @@ -var Backbone = require('backbone'); -var PropertyView = require('./PropertyView'); -var PropertyIntegerView = require('./PropertyIntegerView'); -var PropertyRadioView = require('./PropertyRadioView'); -var PropertySelectView = require('./PropertySelectView'); -var PropertyColorView = require('./PropertyColorView'); -var PropertyFileView = require('./PropertyFileView'); -var PropertyCompositeView = require('./PropertyCompositeView'); -var PropertyStackView = require('./PropertyStackView'); +const PropertyView = require('./PropertyView'); +const PropertyIntegerView = require('./PropertyIntegerView'); +const PropertyRadioView = require('./PropertyRadioView'); +const PropertySelectView = require('./PropertySelectView'); +const PropertyColorView = require('./PropertyColorView'); +const PropertyFileView = require('./PropertyFileView'); +const PropertyCompositeView = require('./PropertyCompositeView'); +const PropertyStackView = require('./PropertyStackView'); module.exports = Backbone.View.extend({ @@ -44,7 +43,6 @@ module.exports = Backbone.View.extend({ }); this.$el.append(fragment); - this.$el.append($('
', {class: "clear"})); this.$el.attr('class', this.pfx + 'properties'); return this; } diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index 2f5f46a648..e0a39e839f 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -1,4 +1,5 @@ const PropertyView = require('./PropertyView'); +const $ = Backbone.$; module.exports = PropertyView.extend({ diff --git a/src/style_manager/view/PropertySelectView.js b/src/style_manager/view/PropertySelectView.js index cf737ddb8f..3bd049a8ee 100644 --- a/src/style_manager/view/PropertySelectView.js +++ b/src/style_manager/view/PropertySelectView.js @@ -1,3 +1,5 @@ +const $ = Backbone.$; + module.exports = require('./PropertyView').extend({ templateInput() { diff --git a/src/style_manager/view/PropertyStackView.js b/src/style_manager/view/PropertyStackView.js index 2916b8b3e6..8681c290b1 100644 --- a/src/style_manager/view/PropertyStackView.js +++ b/src/style_manager/view/PropertyStackView.js @@ -1,4 +1,3 @@ -var Backbone = require('backbone'); var PropertyCompositeView = require('./PropertyCompositeView'); var Layers = require('./../model/Layers'); var LayersView = require('./LayersView'); diff --git a/src/style_manager/view/PropertyView.js b/src/style_manager/view/PropertyView.js index 32070ba19f..fcd074f5b3 100644 --- a/src/style_manager/view/PropertyView.js +++ b/src/style_manager/view/PropertyView.js @@ -84,7 +84,7 @@ module.exports = Backbone.View.extend({ const config = this.config; const updatedCls = `${ppfx}color-hl`; const computedCls = `${ppfx}color-warn`; - const labelEl = this.$el.find(`> .${pfx}label`); + const labelEl = this.$el.children(`.${pfx}label`); const clearStyle = this.getClearEl().style; labelEl.removeClass(`${updatedCls} ${computedCls}`); clearStyle.display = 'none'; diff --git a/test/helper.js b/test/helper.js index 07cfbf1e50..002247040c 100644 --- a/test/helper.js +++ b/test/helper.js @@ -7,7 +7,6 @@ import { JSDOM } from 'jsdom'; const dom = new JSDOM(''); const window = dom.window; -//const $ = jquery(window); // Fix for the spectrum lib var Module = require('module'); @@ -15,6 +14,7 @@ var originalRequire = Module.prototype.require; Module.prototype.require = function(name) { if (name == 'jquery') { + console.log('REQUIRE jquery', Backbone.$); return Backbone.$; } return originalRequire.apply(this, arguments); @@ -50,6 +50,7 @@ grapesjs.init({container: 'body',autorender: 0, storageManager: { autoload: 0, type:'none' },}); + window.$ = Backbone.$; Object.keys(window).forEach((key) => { diff --git a/webpack.config.js b/webpack.config.js index 533226f304..00c807d4f8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -30,9 +30,6 @@ module.exports = { plugins: plugins, module: { loaders: [{ - test: /backbone\.js$/, - use: ['imports-loader?define=>false'] - },{ test: /grapesjs\/index\.js$/, loader: 'string-replace-loader', query: { @@ -48,5 +45,8 @@ module.exports = { }, resolve: { modules: ['src', 'node_modules'], + alias: { + jquery: 'cash-dom' + } }, } From b46c6ed430a09c6ca566c367b161511ab8680cef Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 27 Sep 2017 03:40:17 +0200 Subject: [PATCH 044/143] Extend few methods on Backbone and cash --- src/block_manager/view/BlockView.js | 2 +- src/code_manager/view/EditorView.js | 2 +- src/commands/view/CreateComponent.js | 4 +- src/commands/view/DeleteComponent.js | 4 +- src/commands/view/ExportTemplate.js | 2 + src/commands/view/MoveComponent.js | 6 +- src/commands/view/OpenBlocks.js | 4 +- src/commands/view/OpenLayers.js | 3 +- src/commands/view/OpenTraitManager.js | 4 +- src/commands/view/SelectPosition.js | 2 + src/commands/view/ShowOffset.js | 2 +- src/editor/model/Editor.js | 17 +-- src/modal_dialog/view/ModalView.js | 15 ++- src/panels/view/ButtonView.js | 2 +- src/rich_text_editor/index.js | 2 + .../view/CommandButtonSelectView.js | 4 +- src/style_manager/view/PropertyFileView.js | 4 +- src/style_manager/view/PropertyStackView.js | 2 +- src/trait_manager/view/TraitSelectView.js | 4 +- src/trait_manager/view/TraitView.js | 2 +- src/utils/Dragger.js | 2 + src/utils/Resizer.js | 2 + src/utils/Sorter.js | 1 - src/utils/cashAdds.js | 16 --- src/utils/extender.js | 111 ++++++++++++++++++ test/specs/css_composer/e2e/CssComposer.js | 2 + test/specs/dom_components/model/Component.js | 1 + 27 files changed, 168 insertions(+), 54 deletions(-) delete mode 100644 src/utils/cashAdds.js create mode 100644 src/utils/extender.js diff --git a/src/block_manager/view/BlockView.js b/src/block_manager/view/BlockView.js index c9a1410a49..48239b12e1 100644 --- a/src/block_manager/view/BlockView.js +++ b/src/block_manager/view/BlockView.js @@ -1,4 +1,4 @@ -var Backbone = require('backbone'); +const $ = Backbone.$; module.exports = Backbone.View.extend({ diff --git a/src/code_manager/view/EditorView.js b/src/code_manager/view/EditorView.js index 3165f3d366..679b8b564a 100644 --- a/src/code_manager/view/EditorView.js +++ b/src/code_manager/view/EditorView.js @@ -18,7 +18,7 @@ module.exports = Backbone.View.extend({ obj.pfx = this.pfx; this.$el.html( this.template(obj) ); this.$el.attr('class', this.pfx + 'editor-c'); - this.$el.find('#'+this.pfx+'code').html(this.model.get('input')); + this.$el.find('#'+this.pfx+'code').append(this.model.get('input')); return this; }, diff --git a/src/commands/view/CreateComponent.js b/src/commands/view/CreateComponent.js index 1b2193ddc4..bb6e6d5fbe 100644 --- a/src/commands/view/CreateComponent.js +++ b/src/commands/view/CreateComponent.js @@ -1,5 +1,5 @@ -var Backbone = require('backbone'); -var SelectPosition = require('./SelectPosition'); +const SelectPosition = require('./SelectPosition'); +const $ = Backbone.$; module.exports = _.extend({}, SelectPosition, { diff --git a/src/commands/view/DeleteComponent.js b/src/commands/view/DeleteComponent.js index 0ca30d039c..dcdd304b3d 100644 --- a/src/commands/view/DeleteComponent.js +++ b/src/commands/view/DeleteComponent.js @@ -1,5 +1,5 @@ -var Backbone = require('backbone'); -var SelectComponent = require('./SelectComponent'); +const SelectComponent = require('./SelectComponent'); +const $ = Backbone.$; module.exports = _.extend({},SelectComponent,{ diff --git a/src/commands/view/ExportTemplate.js b/src/commands/view/ExportTemplate.js index d8a8ab597a..400aa92eff 100644 --- a/src/commands/view/ExportTemplate.js +++ b/src/commands/view/ExportTemplate.js @@ -1,3 +1,5 @@ +const $ = Backbone.$; + module.exports = { run(editor, sender) { diff --git a/src/commands/view/MoveComponent.js b/src/commands/view/MoveComponent.js index ac89a8fc35..ef3d80c927 100644 --- a/src/commands/view/MoveComponent.js +++ b/src/commands/view/MoveComponent.js @@ -1,6 +1,6 @@ -var Backbone = require('backbone'); -var SelectComponent = require('./SelectComponent'); -var SelectPosition = require('./SelectPosition'); +const SelectComponent = require('./SelectComponent'); +const SelectPosition = require('./SelectPosition'); +const $ = Backbone.$; module.exports = _.extend({}, SelectPosition, SelectComponent, { diff --git a/src/commands/view/OpenBlocks.js b/src/commands/view/OpenBlocks.js index ba9d88ae18..6691db2d68 100644 --- a/src/commands/view/OpenBlocks.js +++ b/src/commands/view/OpenBlocks.js @@ -1,3 +1,5 @@ +const $ = Backbone.$; + module.exports = { run(editor, sender) { @@ -6,7 +8,7 @@ module.exports = { var bm = editor.BlockManager; var panelC; if(!this.blocks){ - this.blocks = $('
').get(0); + this.blocks = $('
').get(0); this.blocks.appendChild(bm.render()); var panels = editor.Panels; if(!panels.getPanel('views-container')) diff --git a/src/commands/view/OpenLayers.js b/src/commands/view/OpenLayers.js index 4741293db9..e51185b5b8 100644 --- a/src/commands/view/OpenLayers.js +++ b/src/commands/view/OpenLayers.js @@ -1,4 +1,5 @@ -var Layers = require('navigator'); +const Layers = require('navigator'); +const $ = Backbone.$; module.exports = { diff --git a/src/commands/view/OpenTraitManager.js b/src/commands/view/OpenTraitManager.js index 4e6f8dcc22..3c9a92ab95 100644 --- a/src/commands/view/OpenTraitManager.js +++ b/src/commands/view/OpenTraitManager.js @@ -1,3 +1,5 @@ +const $ = Backbone.$; + module.exports = { run(editor, sender) { @@ -8,7 +10,7 @@ module.exports = { if(!this.obj){ var tmView = tm.getTraitsViewer(); var confTm = tm.getConfig(); - this.obj = $('
') + this.obj = $('
') .append('
' + confTm.labelContainer + '
') .get(0); this.obj.appendChild(tmView.render().el); diff --git a/src/commands/view/SelectPosition.js b/src/commands/view/SelectPosition.js index 1d32db9f00..1c103fb1db 100644 --- a/src/commands/view/SelectPosition.js +++ b/src/commands/view/SelectPosition.js @@ -1,3 +1,5 @@ +const $ = Backbone.$; + module.exports = { /** diff --git a/src/commands/view/ShowOffset.js b/src/commands/view/ShowOffset.js index 2ec5a7c61d..d1f5b98499 100644 --- a/src/commands/view/ShowOffset.js +++ b/src/commands/view/ShowOffset.js @@ -1,4 +1,4 @@ -const $ = require('backbone').$; +const $ = Backbone.$; module.exports = { diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js index 6f1ab7a04c..9c721b2e7f 100644 --- a/src/editor/model/Editor.js +++ b/src/editor/model/Editor.js @@ -25,17 +25,12 @@ const UndoManager = require('backbone-undo'); const key = require('keymaster'); let timedInterval; -require('utils/cashAdds')(Backbone.$); - -/* -if (!$) { - $ = cash; - window.$ = $; -} -console.log(Backbone.$); -if (!Backbone.$) { - Backbone.$ = $; -}*/ +require('utils/extender')({ + Backbone: Backbone, + $: Backbone.$ +}); + +const $ = Backbone.$; module.exports = Backbone.Model.extend({ diff --git a/src/modal_dialog/view/ModalView.js b/src/modal_dialog/view/ModalView.js index fd4732f11e..bc455a03d2 100644 --- a/src/modal_dialog/view/ModalView.js +++ b/src/modal_dialog/view/ModalView.js @@ -48,8 +48,12 @@ module.exports = Backbone.View.extend({ * @private */ getContent() { - if(!this.$content) - this.$content = this.$el.find('.'+this.pfx+'content #'+this.pfx+'c'); + const pfx = this.pfx; + + if (!this.$content) { + this.$content = this.$el.find(`.${pfx}content #${pfx}c`); + } + return this.$content; }, @@ -70,8 +74,11 @@ module.exports = Backbone.View.extend({ * */ updateContent() { var content = this.getContent(); - this.getCollector().append(content.children()); - content.html(this.model.get('content')); + const children = content.children(); + const coll = this.getCollector(); + const body = this.model.get('content'); + children.length && coll.append(children); + content.empty().append(body); }, /** diff --git a/src/panels/view/ButtonView.js b/src/panels/view/ButtonView.js index 0347a1ff1a..f61f4f390a 100644 --- a/src/panels/view/ButtonView.js +++ b/src/panels/view/ButtonView.js @@ -1,4 +1,4 @@ -var Backbone = require('backbone'); +const $ = Backbone.$; module.exports = Backbone.View.extend({ diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 002d6a368e..e2e39765b1 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -21,6 +21,8 @@ * http://www.quirksmode.org/dom/execCommand.html * @module RichTextEditor */ +const $ = Backbone.$; + module.exports = () => { var c = {}, defaults = require('./config/config'), diff --git a/src/rich_text_editor/view/CommandButtonSelectView.js b/src/rich_text_editor/view/CommandButtonSelectView.js index e049de6ec3..04ba419c4d 100644 --- a/src/rich_text_editor/view/CommandButtonSelectView.js +++ b/src/rich_text_editor/view/CommandButtonSelectView.js @@ -1,5 +1,5 @@ -var Backbone = require('backbone'); -var CommandButtonView = require('./CommandButtonView'); +const CommandButtonView = require('./CommandButtonView'); +const $ = Backbone.$; module.exports = CommandButtonView.extend({ diff --git a/src/style_manager/view/PropertyFileView.js b/src/style_manager/view/PropertyFileView.js index 8e8f30a435..f41cd4a5db 100644 --- a/src/style_manager/view/PropertyFileView.js +++ b/src/style_manager/view/PropertyFileView.js @@ -1,5 +1,5 @@ -var Backbone = require('backbone'); -var PropertyView = require('./PropertyView'); +const PropertyView = require('./PropertyView'); +const $ = Backbone.$; module.exports = PropertyView.extend({ diff --git a/src/style_manager/view/PropertyStackView.js b/src/style_manager/view/PropertyStackView.js index 8681c290b1..1c51b04609 100644 --- a/src/style_manager/view/PropertyStackView.js +++ b/src/style_manager/view/PropertyStackView.js @@ -293,7 +293,7 @@ module.exports = PropertyCompositeView.extend({ n.push(o); },this); - this.$props.detach(); + //this.$props.detach(); var layers = this.getLayers(); layers.reset(); layers.add(n); diff --git a/src/trait_manager/view/TraitSelectView.js b/src/trait_manager/view/TraitSelectView.js index d2a52ca8c9..494f8238c9 100644 --- a/src/trait_manager/view/TraitSelectView.js +++ b/src/trait_manager/view/TraitSelectView.js @@ -1,5 +1,5 @@ -var Backbone = require('backbone'); -var TraitView = require('./TraitView'); +const TraitView = require('./TraitView'); +const $ = Backbone.$; module.exports = TraitView.extend({ diff --git a/src/trait_manager/view/TraitView.js b/src/trait_manager/view/TraitView.js index abe8b2c1a3..12900e7a48 100644 --- a/src/trait_manager/view/TraitView.js +++ b/src/trait_manager/view/TraitView.js @@ -1,4 +1,4 @@ -var Backbone = require('backbone'); +const $ = Backbone.$; module.exports = Backbone.View.extend({ diff --git a/src/utils/Dragger.js b/src/utils/Dragger.js index 7e5b7f63f3..597af15232 100644 --- a/src/utils/Dragger.js +++ b/src/utils/Dragger.js @@ -1,3 +1,5 @@ +const $ = Backbone.$; + var getBoundingRect = (el, win) => { var w = win || window; var rect = el.getBoundingClientRect(); diff --git a/src/utils/Resizer.js b/src/utils/Resizer.js index aeef0a3276..d02915c545 100644 --- a/src/utils/Resizer.js +++ b/src/utils/Resizer.js @@ -1,3 +1,5 @@ +const $ = Backbone.$; + var defaults = { // Function which returns custom X and Y coordinates of the mouse mousePosFetcher: null, diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js index 72e59396e6..d88b1bdf89 100644 --- a/src/utils/Sorter.js +++ b/src/utils/Sorter.js @@ -1,4 +1,3 @@ -const Backbone = require('backbone'); const $ = Backbone.$; module.exports = Backbone.View.extend({ diff --git a/src/utils/cashAdds.js b/src/utils/cashAdds.js deleted file mode 100644 index 02b1337e36..0000000000 --- a/src/utils/cashAdds.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = ($) => { - const fn = $.fn; - fn.hide = function() { - return this.css('display', 'none'); - } - - fn.show = function() { - return this.css('display', 'block'); - } - - fn.focus = function() { - const el = this.get(0); - el && el.focus(); - return this; - } -} diff --git a/src/utils/extender.js b/src/utils/extender.js new file mode 100644 index 0000000000..6ec527e7bf --- /dev/null +++ b/src/utils/extender.js @@ -0,0 +1,111 @@ +module.exports = ({$, Backbone}) => { + if (Backbone) { + const ViewProt = Backbone.View.prototype; + const eventNsMap = {}; + + ViewProt.delegate = function(eventName, selector, listener) { + const vid = '.delegateEvents' + this.cid; + this.$el.on(eventName, selector, listener); + //return this; + let eventMap = eventNsMap[vid]; + + if (!eventMap) { + eventMap = []; + eventNsMap[vid] = eventMap; + } + + eventMap.push({eventName, selector, listener}); + return this; + }; + + ViewProt.undelegateEvents = function() { + const vid = '.delegateEvents' + this.cid; + if (this.$el) { + //this.$el.off(); return this; + let eventMap = eventNsMap[vid]; + + if (eventMap) { + eventMap.forEach(({eventName, selector, listener}) => { + this.$el.off(eventName, selector, listener); + }); + } + } + return this; + }; + + ViewProt.undelegate = function(ev, sel, list) { + const vid = '.delegateEvents' + this.cid; + //this.$el.off(ev, sel, list); return this; + let eventMap = eventNsMap[vid]; + + if (eventMap) { + eventMap.forEach(({eventName, selector, listener}) => { + if (eventName == ev && selector == sel) { + this.$el.off(eventName, selector, listener); + } + }); + } + + return this; + }; + } + + if ($) { + const fn = $.fn; + fn.hide = function() { + return this.css('display', 'none'); + } + + fn.show = function() { + return this.css('display', 'block'); + } + + fn.focus = function() { + const el = this.get(0); + el && el.focus(); + return this; + } + + // For spectrum compatibility + fn.bind = function(ev, h) { + return this.on(ev, h); + } + + fn.click = function(h) { + return this.on('click', h); + } + + fn.change = function(h) { + return this.on('change', h); + } + + fn.keydown = function(h) { + return this.on('keydown', h); + } + + fn.delegate = function(selector, events, data, handler) { + if (!handler) { + handler = data; + } + + return this.on(events, selector, function(e) { + e.data = data; + handler(e); + }); + } + + $.map = function(items, clb) { + const ar = []; + + for (var i = 0; i < items.length; i++) { + ar.push(clb(items[i], i)); + } + + return ar; + } + + $.inArray = function(val, arr) { + return arr.indexOf(val); + } + } +} diff --git a/test/specs/css_composer/e2e/CssComposer.js b/test/specs/css_composer/e2e/CssComposer.js index 5620ac07c7..ec0741b82f 100644 --- a/test/specs/css_composer/e2e/CssComposer.js +++ b/test/specs/css_composer/e2e/CssComposer.js @@ -1,3 +1,5 @@ +const $ = Backbone.$; + module.exports = { run() { describe('E2E tests', () => { diff --git a/test/specs/dom_components/model/Component.js b/test/specs/dom_components/model/Component.js index d7f4b54745..8b8b837f7e 100644 --- a/test/specs/dom_components/model/Component.js +++ b/test/specs/dom_components/model/Component.js @@ -6,6 +6,7 @@ const ComponentLink = require('dom_components/model/ComponentLink'); const ComponentMap = require('dom_components/model/ComponentMap'); const ComponentVideo = require('dom_components/model/ComponentVideo'); const Components = require('dom_components/model/Components'); +const $ = Backbone.$; module.exports = { run() { From c7a4f22b24e7f3910a32275ebffc6b06cec29961 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 27 Sep 2017 04:00:54 +0200 Subject: [PATCH 045/143] Refactor navigator view --- src/navigator/view/ItemView.js | 50 +++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/navigator/view/ItemView.js b/src/navigator/view/ItemView.js index 42a9cbe745..7201728831 100644 --- a/src/navigator/view/ItemView.js +++ b/src/navigator/view/ItemView.js @@ -48,7 +48,7 @@ module.exports = Backbone.View.extend({ this.caretCls = this.ppfx + 'nav-item-caret'; this.titleCls = this.pfx + 'title'; this.events = {}; - this.events['click > #'+this.pfx+'btn-eye'] = 'toggleVisibility'; + this.events['click #'+this.pfx+'btn-eye'] = 'toggleVisibility'; this.events['click .' + this.caretCls] = 'toggleOpening'; this.events['click .' + this.titleCls] = 'handleSelect'; this.events['click .' + this.editBtnCls] = 'handleEdit'; @@ -58,7 +58,7 @@ module.exports = Backbone.View.extend({ this.$el.data('collection', this.model.get('components')); if(o.config.sortable) - this.events['mousedown > #'+this.pfx+'move'] = 'startSort'; + this.events['mousedown #'+this.pfx+'move'] = 'startSort'; this.delegateEvents(); }, @@ -183,8 +183,11 @@ module.exports = Backbone.View.extend({ * @return void * */ toggleVisibility(e) { + e.stopPropagation(); + const pfx = this.pfx; + if(!this.$eye) - this.$eye = this.$el.find('> #'+this.pfx+'btn-eye'); + this.$eye = this.$el.children(`#${pfx}btn-eye`); var cCss = _.clone(this.model.get('style')), hClass = this.pfx + 'hide'; @@ -219,18 +222,23 @@ module.exports = Backbone.View.extend({ * @return void * */ checkChildren() { - var c = this.countChildren(this.model), - pfx = this.pfx, - tC = '> .' + pfx + 'title-c > .' + pfx + 'title'; - if(!this.$counter) - this.$counter = this.$el.find('> #' + pfx + 'counter'); - if(c){ - this.$el.find(tC).removeClass(pfx + 'no-chld'); + const model = this.model; + const c = this.countChildren(model); + const pfx = this.pfx; + const noChildCls = `${pfx}no-chld`; + const title = this.$el.children(`.${pfx}title-c`).children(`.${pfx}title`); + //tC = `> .${pfx}title-c > .${pfx}title`; + if (!this.$counter) { + this.$counter = this.$el.children(`#${pfx}counter`); + } + + if (c) { + title.removeClass(noChildCls); this.$counter.html(c); - }else{ - this.$el.find(tC).addClass(pfx + 'no-chld'); + } else { + title.addClass(noChildCls); this.$counter.empty(); - this.model.set('open',0); + model.set('open', 0); } }, @@ -255,8 +263,9 @@ module.exports = Backbone.View.extend({ getCaret() { if (!this.caret) { const pfx = this.pfx; - this.caret = this.$el.find(`> .${pfx}title-c > .${pfx}title > .${pfx}title-inn > #${pfx}caret`); + this.caret = this.$el.find(`.${pfx}title-c > .${pfx}title > .${pfx}title-inn > #${pfx}caret`); } + return this.caret; }, @@ -265,9 +274,10 @@ module.exports = Backbone.View.extend({ var pfx = this.pfx; var vis = this.isVisible(); var count = this.countChildren(model); + const el = this.$el; const level = this.level + 1; - this.$el.html( this.template({ + el.html( this.template({ title: model.getName(), icon: model.getIcon(), addClass: (count ? '' : pfx+'no-chld'), @@ -292,13 +302,15 @@ module.exports = Backbone.View.extend({ parent: model, level }).render().$el; - this.$el.find('.'+ pfx +'children').html(this.$components); - if(!model.get('draggable') || !this.config.sortable){ - this.$el.find('> #' + pfx + 'move').detach(); + el.find(`.${pfx}children`).append(this.$components); + + if(!model.get('draggable') || !this.config.sortable) { + el.children(`#${pfx}move`).remove(); } + if(!vis) this.className += ' ' + pfx + 'hide'; - this.$el.attr('class', _.result(this, 'className')); + el.attr('class', _.result(this, 'className')); this.updateOpening(); this.updateStatus(); return this; From b25eb1e73d2a7938ae9168b032ec34febdc5029b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 27 Sep 2017 15:30:51 +0200 Subject: [PATCH 046/143] Update Select component event binding --- src/commands/view/MoveComponent.js | 10 ++++---- src/commands/view/SelectComponent.js | 35 ++++++++++------------------ 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/src/commands/view/MoveComponent.js b/src/commands/view/MoveComponent.js index ef3d80c927..18872627b2 100644 --- a/src/commands/view/MoveComponent.js +++ b/src/commands/view/MoveComponent.js @@ -1,3 +1,5 @@ +import {on, off} from 'utils/mixins' + const SelectComponent = require('./SelectComponent'); const SelectPosition = require('./SelectPosition'); const $ = Backbone.$; @@ -49,7 +51,7 @@ module.exports = _.extend({}, SelectPosition, SelectComponent, { this.sorter.onEndMove = this.onEndMove.bind(this); this.stopSelectComponent(); this.$wrapper.off('mousedown', this.initSorter); - this.getContentWindow().on('keydown', this.rollback); + on(this.getContentWindow(), 'keydown', this.rollback); }, /** @@ -77,11 +79,11 @@ module.exports = _.extend({}, SelectPosition, SelectComponent, { */ this.stopSelectComponent(); - this.getContentWindow().on('keydown', this.rollback); + on(this.getContentWindow(), 'keydown', this.rollback); }, onEndMoveFromModel() { - this.getContentWindow().off('keydown', this.rollback); + off(this.getContentWindow(), 'keydown', this.rollback); }, /** @@ -90,7 +92,7 @@ module.exports = _.extend({}, SelectPosition, SelectComponent, { */ onEndMove() { this.enable(); - this.getContentWindow().off('keydown', this.rollback); + off(this.getContentWindow(), 'keydown', this.rollback); }, /** diff --git a/src/commands/view/SelectComponent.js b/src/commands/view/SelectComponent.js index 7ce7900226..0269cc9947 100644 --- a/src/commands/view/SelectComponent.js +++ b/src/commands/view/SelectComponent.js @@ -1,3 +1,5 @@ +import {on, off} from 'utils/mixins' + const ToolbarView = require('dom_components/view/ToolbarView'); const Toolbar = require('dom_components/model/Toolbar'); const key = require('keymaster'); @@ -67,16 +69,6 @@ module.exports = { } }, - /** - * Returns canavs body el - */ - getCanvasBodyEl() { - if(!this.$bodyEl) { - this.$bodyEl = $(this.getCanvasBody()); - } - return this.$bodyEl; - }, - /** * Start select component event * @private @@ -98,16 +90,15 @@ module.exports = { * @private * */ toggleSelectComponent(enable) { - var el = '*'; - var method = enable ? 'on' : 'off'; - this.getCanvasBodyEl() - [method]('mouseover', el, this.onHover) - [method]('mouseout', el, this.onOut) - [method]('click', el, this.onClick); - - var cw = this.getContentWindow(); - cw[method]('scroll', this.onFrameScroll); - cw[method]('keydown', this.onKeyPress); + const method = enable ? 'on' : 'off'; + const methods = {on, off}; + const body = this.getCanvasBody(); + const win = this.getContentWindow(); + methods[method](body, 'mouseover', this.onHover); + methods[method](body, 'mouseout', this.onOut); + methods[method](body, 'click', this.onClick); + methods[method](win, 'scroll', this.onFrameScroll); + methods[method](win, 'keydown', this.onKeyPress); }, /** @@ -556,9 +547,7 @@ module.exports = { * @private */ getContentWindow() { - if(!this.contWindow) - this.contWindow = $(this.frameEl.contentWindow); - return this.contWindow; + return this.frameEl.contentWindow; }, run(editor) { From e6ad1aa1dbf0117af6296a1eefff1bcc23ccecba Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 27 Sep 2017 20:26:16 +0200 Subject: [PATCH 047/143] Update sector views --- src/domain_abstract/ui/InputNumber.js | 9 ++++--- .../view/PropertyCompositeView.js | 2 +- src/style_manager/view/PropertySelectView.js | 8 +++---- src/style_manager/view/PropertyView.js | 2 +- src/style_manager/view/SectorView.js | 24 +++++++++++-------- src/style_manager/view/SectorsView.js | 4 +--- src/utils/extender.js | 5 ++-- 7 files changed, 30 insertions(+), 24 deletions(-) diff --git a/src/domain_abstract/ui/InputNumber.js b/src/domain_abstract/ui/InputNumber.js index 80ebd3523c..5abaff8f62 100644 --- a/src/domain_abstract/ui/InputNumber.js +++ b/src/domain_abstract/ui/InputNumber.js @@ -125,10 +125,12 @@ module.exports = Backbone.View.extend({ unitStr += ''; }); unitStr += ''; - this.unitEl = $(unitStr); + const temp = document.createElement('div'); + temp.innerHTML = unitStr; + this.unitEl = temp.firstChild; } } - return this.unitEl && this.unitEl.get(0); + return this.unitEl; }, /** @@ -281,7 +283,8 @@ module.exports = Backbone.View.extend({ const el = this.$el; el.html(this.template({ppfx})); el.find(`.${ppfx}input-holder`).append(this.getInputEl()); - el.find(`.${ppfx}field-units`).html(this.getUnitEl()); + const unit = this.getUnitEl(); + unit && el.find(`.${ppfx}field-units`).get(0).appendChild(unit); el.addClass(this.contClass); return this; } diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index e0a39e839f..49214e399c 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -48,7 +48,7 @@ module.exports = PropertyView.extend({ var PropertiesView = require('./PropertiesView'); var propsView = new PropertiesView(this.getPropsConfig()); this.$props = propsView.render().$el; - this.$el.find('#'+ this.pfx +'input-holder').html(this.$props); + this.$el.find(`#${this.pfx}input-holder`).append(this.$props); } } }, diff --git a/src/style_manager/view/PropertySelectView.js b/src/style_manager/view/PropertySelectView.js index 3bd049a8ee..61ff92d96e 100644 --- a/src/style_manager/view/PropertySelectView.js +++ b/src/style_manager/view/PropertySelectView.js @@ -20,7 +20,7 @@ module.exports = require('./PropertyView').extend({ const model = this.model; const options = model.get('list') || model.get('options') || []; - if (!this.$input) { + if (!this.input) { let optionsStr = ''; options.forEach(option => { @@ -31,9 +31,9 @@ module.exports = require('./PropertyView').extend({ optionsStr += ``; }); - this.$input = $(``); - this.input = this.$input.get(0); - this.$el.find(`#${pfx}input-holder`).html(this.$input); + const inputH = this.el.querySelector(`#${pfx}input-holder`); + inputH.innerHTML = ``; + this.input = inputH.firstChild; } }, diff --git a/src/style_manager/view/PropertyView.js b/src/style_manager/view/PropertyView.js index fcd074f5b3..af13d49df2 100644 --- a/src/style_manager/view/PropertyView.js +++ b/src/style_manager/view/PropertyView.js @@ -50,7 +50,7 @@ module.exports = Backbone.View.extend({ this.customValue = o.customValue || {}; const model = this.model; this.property = model.get('property'); - this.input = this.$input = null; + this.input = null; const pfx = this.pfx; this.inputHolderId = '#' + pfx + 'input-holder'; this.sector = model.collection && model.collection.sector; diff --git a/src/style_manager/view/SectorView.js b/src/style_manager/view/SectorView.js index 7c87b8fcbd..f80da44e3f 100644 --- a/src/style_manager/view/SectorView.js +++ b/src/style_manager/view/SectorView.js @@ -4,25 +4,25 @@ var PropertiesView = require('./PropertiesView'); module.exports = Backbone.View.extend({ template: _.template(` -
+
<%= label %>
`), - events:{}, + events:{ + 'click [data-sector-title]': 'toggle' + }, initialize(o) { this.config = o.config || {}; this.pfx = this.config.stylePrefix || ''; this.target = o.target || {}; this.propTarget = o.propTarget || {}; - this.open = this.model.get('open'); this.caretR = 'fa-caret-right'; this.caretD = 'fa-caret-down'; - this.listenTo(this.model, 'change:open', this.updateOpen); - this.listenTo(this.model, 'updateVisibility', this.updateVisibility); - this.events['click .' + this.pfx + 'title'] = 'toggle'; - this.delegateEvents(); + const model = this.model; + this.listenTo(model, 'change:open', this.updateOpen); + this.listenTo(model, 'updateVisibility', this.updateVisibility); }, /** @@ -53,7 +53,7 @@ module.exports = Backbone.View.extend({ * */ show() { this.$el.addClass(this.pfx + "open"); - this.$el.find('.' + this.pfx + 'properties').show(); + this.getPropertiesEl().style.display = ''; this.$caret.removeClass(this.caretR).addClass(this.caretD); }, @@ -62,14 +62,18 @@ module.exports = Backbone.View.extend({ * */ hide() { this.$el.removeClass(this.pfx + "open"); - this.$el.find('.' + this.pfx + 'properties').hide(); + this.getPropertiesEl().style.display = 'none'; this.$caret.removeClass(this.caretD).addClass(this.caretR); }, + getPropertiesEl() { + return this.$el.find(`.${this.pfx}properties`).get(0); + }, + /** * Toggle visibility * */ - toggle() { + toggle(e) { var v = this.model.get('open') ? 0 : 1; this.model.set('open', v); }, diff --git a/src/style_manager/view/SectorsView.js b/src/style_manager/view/SectorsView.js index fc2a2446e1..3e3153343c 100644 --- a/src/style_manager/view/SectorsView.js +++ b/src/style_manager/view/SectorsView.js @@ -1,5 +1,4 @@ -var Backbone = require('backbone'); -var SectorView = require('./SectorView'); +const SectorView = require('./SectorView'); module.exports = Backbone.View.extend({ @@ -117,7 +116,6 @@ module.exports = Backbone.View.extend({ * */ addToCollection(model, fragmentEl) { var fragment = fragmentEl || null; - var view = new SectorView({ model, id: this.pfx + model.get('name').replace(' ','_').toLowerCase(), diff --git a/src/utils/extender.js b/src/utils/extender.js index 6ec527e7bf..9785da1723 100644 --- a/src/utils/extender.js +++ b/src/utils/extender.js @@ -2,6 +2,7 @@ module.exports = ({$, Backbone}) => { if (Backbone) { const ViewProt = Backbone.View.prototype; const eventNsMap = {}; + ViewProt.eventNsMap = eventNsMap; ViewProt.delegate = function(eventName, selector, listener) { const vid = '.delegateEvents' + this.cid; @@ -26,7 +27,7 @@ module.exports = ({$, Backbone}) => { if (eventMap) { eventMap.forEach(({eventName, selector, listener}) => { - this.$el.off(eventName, selector, listener); + this.$el.off(eventName); }); } } @@ -41,7 +42,7 @@ module.exports = ({$, Backbone}) => { if (eventMap) { eventMap.forEach(({eventName, selector, listener}) => { if (eventName == ev && selector == sel) { - this.$el.off(eventName, selector, listener); + this.$el.off(eventName); } }); } From 2c54933f4ea4606b601bcb196416173912f69925 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 27 Sep 2017 20:38:01 +0200 Subject: [PATCH 048/143] Update radio property view setValue method --- src/style_manager/view/PropertyRadioView.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/style_manager/view/PropertyRadioView.js b/src/style_manager/view/PropertyRadioView.js index 3b489d2c12..1075df899f 100644 --- a/src/style_manager/view/PropertyRadioView.js +++ b/src/style_manager/view/PropertyRadioView.js @@ -41,15 +41,15 @@ module.exports = require('./PropertyView').extend({ } } }, - /* + getInputValue() { - return this.$input ? this.$el.find('input:checked').val() : ''; + const inputChk = this.getCheckedEl(); + return inputChk ? inputChk.value : ''; }, -*/ - getInputValue() { + + getCheckedEl() { const input = this.getInputEl(); - const inputIn = input ? input.querySelector('input:checked') : ''; - return inputIn ? inputIn.value : ''; + return input ? input.querySelector('input:checked') : ''; }, setValue(value) { @@ -57,7 +57,13 @@ module.exports = require('./PropertyView').extend({ let val = value || model.get('value') || model.getDefaultValue(); const input = this.getInputEl(); const inputIn = input ? input.querySelector(`[value="${val}"]`) : ''; - inputIn && (inputIn.checked = true); + + if (inputIn) { + inputIn.checked = true + } else { + const inputChk = this.getCheckedEl(); + inputChk && (inputChk.checked = false); + } }, }); From 1a7f238d85fdc0ce3a7013885179a118e6f02d75 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 27 Sep 2017 21:01:01 +0200 Subject: [PATCH 049/143] Few updates on inputs --- src/domain_abstract/ui/Input.js | 17 +++++++---- src/domain_abstract/ui/InputColor.js | 32 ++++++++++----------- src/style_manager/view/PropertyColorView.js | 8 +++--- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/src/domain_abstract/ui/Input.js b/src/domain_abstract/ui/Input.js index 1ee991690f..2e6843539d 100644 --- a/src/domain_abstract/ui/Input.js +++ b/src/domain_abstract/ui/Input.js @@ -6,12 +6,17 @@ module.exports = Backbone.View.extend({ 'change': 'handleChange', }, - initialize(opts) { - var opt = opts || {}; - var ppfx = opt.ppfx || ''; - this.target = opt.target || {}; + template() { + const holderClass = this.holderClass; + return ``; + }, + + initialize(opts = {}) { + const ppfx = opts.ppfx || ''; + this.target = opts.target || {}; this.inputClass = ppfx + 'field'; this.inputHolderClass = ppfx + 'input-holder'; + this.holderClass = `${ppfx}input-holder`; this.ppfx = ppfx; this.listenTo(this.model, 'change:value', this.handleModelChange); }, @@ -66,9 +71,9 @@ module.exports = Backbone.View.extend({ render() { const el = this.$el; const ppfx = this.ppfx; - const holderClass = `${ppfx}input-holder`; + const holderClass = this.holderClass; el.addClass(this.inputClass); - el.html(``); + el.html(this.template()); el.find(`.${holderClass}`).append(this.getInputEl()); return this; } diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index a0c520ec58..fba2a12635 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -5,17 +5,21 @@ const $ = Backbone.$; module.exports = Input.extend({ - template: _.template(` -
-
-
-
-
-
`), + template() { + const ppfx = this.ppfx; + return ` +
+
+
+
+
+
+ `; + }, initialize(opts) { Input.prototype.initialize.apply(this, arguments); - var ppfx = this.ppfx; + const ppfx = this.ppfx; this.colorCls = `${ppfx}field-color-picker`; this.inputClass = `${ppfx}field ${ppfx}field-color`; this.colorHolderClass = `${ppfx}field-colorp-c`; @@ -57,14 +61,10 @@ module.exports = Input.extend({ const self = this; var model = this.model; - var colorEl = $(`
`); + var colorEl = $(`
`); var cpStyle = colorEl.get(0).style; var elToAppend = this.target && this.target.config ? this.target.config.el : ''; - if (typeof colorEl.spectrum == 'undefined') { - throw 'Spectrum missing, probably you load jQuery twice'; - } - const getColor = color => { let cl = color.getAlpha() == 1 ? color.toHexString() : color.toRgbString(); return cl.replace(/ /g, ''); @@ -113,9 +113,9 @@ module.exports = Input.extend({ return this.colorEl; }, - render(...args) { - Input.prototype.render.apply(this, args); - this.$el.find('.' + this.colorHolderClass).html(this.getColorEl()); + render() { + Input.prototype.render.apply(this, arguments); + this.$el.find(`.${this.colorHolderClass}`).append(this.getColorEl()); return this; } diff --git a/src/style_manager/view/PropertyColorView.js b/src/style_manager/view/PropertyColorView.js index cc9bab2a25..7e61ee65df 100644 --- a/src/style_manager/view/PropertyColorView.js +++ b/src/style_manager/view/PropertyColorView.js @@ -1,5 +1,4 @@ -var Backbone = require('backbone'); -var InputColor = require('domain_abstract/ui/InputColor'); +const InputColor = require('domain_abstract/ui/InputColor'); module.exports = require('./PropertyIntegerView').extend({ @@ -10,13 +9,14 @@ module.exports = require('./PropertyIntegerView').extend({ onRender() { if (!this.input) { + const ppfx = this.ppfx; const inputColor = new InputColor({ target: this.target, model: this.model, - ppfx: this.ppfx + ppfx }); const input = inputColor.render(); - this.$el.append(input.$el); + this.el.querySelector(`.${ppfx}fields`).appendChild(input.el); this.$input = input.inputEl; this.$color = input.colorEl; this.input = this.$input.get(0); From 37ec2542e6c9f86db1ff4506fb47f269a5046724 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 28 Sep 2017 00:40:01 +0200 Subject: [PATCH 050/143] Add more methods to cash --- src/utils/extender.js | 184 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) diff --git a/src/utils/extender.js b/src/utils/extender.js index 9785da1723..94934c1069 100644 --- a/src/utils/extender.js +++ b/src/utils/extender.js @@ -53,6 +53,151 @@ module.exports = ({$, Backbone}) => { if ($) { const fn = $.fn; + + const splitNamespace = function(name) { + const namespaceArray = name.split('.') + return ( name.indexOf('.') !== 0 ? [namespaceArray[0], namespaceArray.slice(1)] : [null, namespaceArray] ); + } + /* + const CashEvent = function(node, eventName, namespaces, delegate, originalCallback, runOnce) { + + const eventCache = getData(node,'_cashEvents') || setData(node, '_cashEvents', {}); + const remove = function(c, namespace){ + if ( c && originalCallback !== c ) { return; } + if ( namespace && this.namespaces.indexOf(namespace) < 0 ) { return; } + node.removeEventListener(eventName, callback); + }; + const callback = function(e) { + var t = this; + if (delegate) { + t = e.target; + + while (t && !matches(t, delegate)) { + if (t === this) { + return (t = false); + } + t = t.parentNode; + } + } + + if (t) { + originalCallback.call(t, e, e.data); + if ( runOnce ) { remove(); } + } + + }; + + this.remove = remove; + this.namespaces = namespaces; + + node.addEventListener(eventName, callback); + + eventCache[eventName] = eventCache[eventName] || []; + eventCache[eventName].push(this); + + return this; + } + */ + + const on = $.prototype.on; + const off = $.prototype.off; + const trigger = $.prototype.trigger; + const offset = $.prototype.offset; + const getEvents = (eventName) => eventName.split(/[,\s]+/g); + const getNamespaces = (eventName) => eventName.split('.'); + + fn.on = function(eventName, delegate, callback, runOnce) { + + if (typeof eventName == 'string') { + const events = getEvents(eventName); + + if (events.length == 1) { + eventName = events[0]; + let namespaces = getNamespaces(eventName); + + if (eventName.indexOf('.') !== 0) { + eventName = namespaces[0]; + } + + namespaces = namespaces.slice(1); + + if (namespaces.length) { + console.log('Found event with namespaces', namespaces, eventName, delegate, this); + const cashNs = this.data('_cashNs') || []; + this.data('_cashNs', namespaces); // for each ns need to store '.store' => eventName, delegate, callback + } + + return on.call(this, eventName, delegate, callback, runOnce); + } else { + events.forEach((eventName) => + this.on(eventName, delegate, callback, runOnce)); + return this; + } + } else { + return on.call(this, eventName, delegate, callback, runOnce) + } + } + + fn.off = function(eventName, callback) { + if (typeof eventName == 'string') { + const events = getEvents(eventName); + + if (events.length == 1) { + eventName = events[0]; + let namespaces = getNamespaces(eventName); + + if (eventName.indexOf('.') !== 0) { + eventName = namespaces[0]; + } + + namespaces = namespaces.slice(1); + + if (namespaces.length) { + // Have to off only with the same namespace + } + + return off.call(this, eventName, callback); + } else { + events.forEach((eventName) => this.off(eventName, callback)); + return this; + } + } else { + return off.call(this, eventName, callback); + } + } + + fn.trigger = function(eventName, data) { + if (eventName instanceof $.Event) { + return this.trigger(eventName.type, data); + } + + if (typeof eventName == 'string') { + const events = getEvents(eventName); + + if (events.length == 1) { + eventName = events[0]; + let namespaces = getNamespaces(eventName); + + if (eventName.indexOf('.') !== 0) { + eventName = namespaces[0]; + } + + namespaces = namespaces.slice(1); + + if (namespaces.length) { + // have to trigger with same namespaces and eventName + } + + return trigger.call(this, eventName, data); + } else { + events.forEach((eventName) => this.trigger(eventName, data)); + return this; + } + } else { + return trigger.call(this, eventName, data); + } + } + fn.hide = function() { return this.css('display', 'none'); } @@ -72,6 +217,10 @@ module.exports = ({$, Backbone}) => { return this.on(ev, h); } + fn.unbind = function(ev, h) { + return this.off(ev, h); + } + fn.click = function(h) { return this.on('click', h); } @@ -95,6 +244,32 @@ module.exports = ({$, Backbone}) => { }); } + fn.scrollLeft = function() { + return this.get(0).scrollLeft; + } + + fn.scrollTop = function() { + return this.get(0).scrollTop; + } + + fn.offset = function(coords) { + let top, left; + + if (coords) { + top = coords.top; + left = coords.left; + } + + if (typeof top != 'undefined') { + this.css('top', `${top}px`); + } + if (typeof left != 'undefined') { + this.css('left', `${left}px`); + } + + return offset.call(this); + }; + $.map = function(items, clb) { const ar = []; @@ -108,5 +283,14 @@ module.exports = ({$, Backbone}) => { $.inArray = function(val, arr) { return arr.indexOf(val); } + + $.Event = function(src, props) { + if (!(this instanceof $.Event) ) { + return new $.Event(src, props); + } + + this.type = src; + this.isDefaultPrevented = () => false; + } } } From 579b21dd0ef6c6eb012754a7f5363da729913b3a Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 28 Sep 2017 02:36:58 +0200 Subject: [PATCH 051/143] Update Panels tests --- package.json | 1 - src/domain_abstract/ui/InputColor.js | 1 - src/utils/extender.js | 3 ++- test/helper.js | 20 ++++------------ .../asset_manager/view/AssetImageView.js | 4 ++-- test/specs/modal/view/ModalView.js | 2 +- test/specs/panels/e2e/PanelsE2e.js | 4 ++-- test/specs/panels/index.js | 13 ++++++---- test/specs/panels/view/ButtonView.js | 19 ++++----------- test/specs/panels/view/ButtonsView.js | 17 ++++--------- test/specs/panels/view/PanelView.js | 24 +++++++------------ test/specs/panels/view/PanelsView.js | 16 ++++--------- 12 files changed, 40 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index 8b975edf38..8ef1991ed0 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "documentation": "^5.3.0", "eslint": "^4.1.1", "expect": "^1.20.2", - "imports-loader": "^0.7.1", "istanbul": "^0.4.2", "jsdom": "^11.2.0", "mocha": "^3.1.2", diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index fba2a12635..4ed8ebbf97 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -1,4 +1,3 @@ -const Backbone = require('backbone'); const Input = require('./Input'); const Spectrum = require('spectrum-colorpicker'); const $ = Backbone.$; diff --git a/src/utils/extender.js b/src/utils/extender.js index 94934c1069..3b4bf03b96 100644 --- a/src/utils/extender.js +++ b/src/utils/extender.js @@ -122,8 +122,9 @@ module.exports = ({$, Backbone}) => { namespaces = namespaces.slice(1); if (namespaces.length) { - console.log('Found event with namespaces', namespaces, eventName, delegate, this); + //console.log('Found event with namespaces', namespaces, eventName, delegate, this); const cashNs = this.data('_cashNs') || []; + // cashNs[namespace] this.data('_cashNs', namespaces); // for each ns need to store '.store' => eventName, delegate, callback } diff --git a/test/helper.js b/test/helper.js index 002247040c..20ebfd9093 100644 --- a/test/helper.js +++ b/test/helper.js @@ -1,21 +1,18 @@ import _ from 'underscore'; import expect from 'expect'; import sinon from 'sinon'; -import Backbone from 'backbone'; import grapesjs from './../src'; import { JSDOM } from 'jsdom'; const dom = new JSDOM(''); const window = dom.window; -// Fix for the spectrum lib +// Fix for the require of jquery var Module = require('module'); var originalRequire = Module.prototype.require; - Module.prototype.require = function(name) { if (name == 'jquery') { - console.log('REQUIRE jquery', Backbone.$); - return Backbone.$; + return originalRequire.call(this, 'cash-dom'); } return originalRequire.apply(this, arguments); }; @@ -38,20 +35,11 @@ global._ = _; global.expect = expect; global.sinon = sinon; global.grapesjs = grapesjs; -global.Backbone = Backbone; +global.Backbone = require('Backbone'); global.localStorage = localStorage; global.SVGElement = global.Element; -global.navigator = { - userAgent: 'node.js' -}; - -// Need this to trigger the cash generation -grapesjs.init({container: 'body',autorender: 0, storageManager: { - autoload: 0, - type:'none' -},}); - window.$ = Backbone.$; +global.navigator = {userAgent: 'node.js'}; Object.keys(window).forEach((key) => { if (!(key in global)) { diff --git a/test/specs/asset_manager/view/AssetImageView.js b/test/specs/asset_manager/view/AssetImageView.js index 9209916294..4d6484208d 100644 --- a/test/specs/asset_manager/view/AssetImageView.js +++ b/test/specs/asset_manager/view/AssetImageView.js @@ -50,7 +50,7 @@ module.exports = { it('Could be selected', function() { var spy = expect.spyOn(obj, 'updateTarget'); - obj.onClick(); + obj.$el.trigger('click'); expect(obj.$el.attr('class')).toInclude('highlight'); expect(spy).toHaveBeenCalled(); }); @@ -58,7 +58,7 @@ module.exports = { it('Could be chosen', function() { sinon.stub(obj, 'updateTarget'); var spy = expect.spyOn(obj, 'updateTarget'); - obj.onDblClick(); + obj.$el.trigger('dblclick'); expect(spy).toHaveBeenCalled(); //obj.updateTarget.calledOnce.should.equal(true); }); diff --git a/test/specs/modal/view/ModalView.js b/test/specs/modal/view/ModalView.js index 543c057c0b..5fe51e8b5a 100644 --- a/test/specs/modal/view/ModalView.js +++ b/test/specs/modal/view/ModalView.js @@ -3,7 +3,7 @@ const Modal = require('modal_dialog/model/Modal'); module.exports = { run() { - describe.only('ModalView', () => { + describe('ModalView', () => { var model; var view; diff --git a/test/specs/panels/e2e/PanelsE2e.js b/test/specs/panels/e2e/PanelsE2e.js index ed6a2dd218..0e55842c5b 100644 --- a/test/specs/panels/e2e/PanelsE2e.js +++ b/test/specs/panels/e2e/PanelsE2e.js @@ -10,7 +10,7 @@ module.exports = { var editorName = 'panel-fixture'; before(() => { - fixtures = $("#fixtures"); + fixtures = $('
').appendTo('body'); }); beforeEach(() => { @@ -33,7 +33,7 @@ module.exports = { //fixture.remove(); }); - it.skip('Command is correctly executed on button click', () => { + it('Command is correctly executed on button click', () => { var commandId = 'command-test'; config.commands = { defaults: [{ diff --git a/test/specs/panels/index.js b/test/specs/panels/index.js index 37c732c2aa..5a6c79bd1d 100644 --- a/test/specs/panels/index.js +++ b/test/specs/panels/index.js @@ -96,9 +96,12 @@ describe('Panels', () => { }); Models.run(); - PanelView.run(); - PanelsView.run(); - ButtonView.run(); - ButtonsView.run(); - e2e.run(); + + describe('Views', () => { + PanelView.run(); + PanelsView.run(); + ButtonView.run(); + ButtonsView.run(); + e2e.run(); + }) }); diff --git a/test/specs/panels/view/ButtonView.js b/test/specs/panels/view/ButtonView.js index f546cecec3..f988181e5c 100644 --- a/test/specs/panels/view/ButtonView.js +++ b/test/specs/panels/view/ButtonView.js @@ -6,36 +6,27 @@ module.exports = { describe('ButtonView', () => { - var $fixtures; - var $fixture; + var fixtures; var model; var view; var btnClass = 'btn'; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { model = new Button(); view = new ButtonView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); afterEach(() => { view.remove(); }); - after(() => { - $fixture.remove(); - }); - it('Button empty', () => { - expect($fixture.html()).toEqual(''); + expect(fixtures.innerHTML).toEqual(''); }); it('Update class', () => { diff --git a/test/specs/panels/view/ButtonsView.js b/test/specs/panels/view/ButtonsView.js index 3b7d79905b..496302ea6f 100644 --- a/test/specs/panels/view/ButtonsView.js +++ b/test/specs/panels/view/ButtonsView.js @@ -5,33 +5,24 @@ module.exports = { run() { describe('ButtonsView', () => { - var $fixtures; - var $fixture; + var fixtures; var model; var view; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { model = new Buttons([]); view = new ButtonsView({ collection: model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); afterEach(() => { view.collection.reset(); }); - after(() => { - $fixture.remove(); - }); - it("Collection is empty", () => { expect(view.$el.html()).toEqual(''); }); diff --git a/test/specs/panels/view/PanelView.js b/test/specs/panels/view/PanelView.js index 3ee57e31ce..c6df77adbb 100644 --- a/test/specs/panels/view/PanelView.js +++ b/test/specs/panels/view/PanelView.js @@ -6,35 +6,26 @@ module.exports = { describe('PanelView', () => { - var $fixtures; - var $fixture; + var fixtures; var model; var view; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { model = new Panel(); view = new PanelView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); afterEach(() => { view.remove(); }); - after(() => { - $fixture.remove(); - }); - it('Panel empty', () => { - expect($fixture.html()).toEqual('
'); + expect(fixtures.innerHTML).toEqual('
'); }); it('Append content', () => { @@ -58,8 +49,9 @@ module.exports = { view = new PanelView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); afterEach(() => { diff --git a/test/specs/panels/view/PanelsView.js b/test/specs/panels/view/PanelsView.js index 573a65c52e..785a1e7061 100644 --- a/test/specs/panels/view/PanelsView.js +++ b/test/specs/panels/view/PanelsView.js @@ -5,33 +5,25 @@ module.exports = { run() { describe('PanelsView', () => { - var $fixtures; + var fixtures; var $fixture; var model; var view; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { model = new Panels([]); view = new PanelsView({ collection: model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); afterEach(() => { view.collection.reset(); }); - after(() => { - $fixture.remove(); - }); - it("Collection is empty", () => { expect(view.$el.html()).toEqual(''); }); From 0814047f25c0d80b8d37d143fefee234d65bba5e Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 28 Sep 2017 02:59:42 +0200 Subject: [PATCH 052/143] Update navigator items --- src/navigator/view/ItemView.js | 57 +++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/src/navigator/view/ItemView.js b/src/navigator/view/ItemView.js index 7201728831..2332a3e463 100644 --- a/src/navigator/view/ItemView.js +++ b/src/navigator/view/ItemView.js @@ -36,29 +36,32 @@ module.exports = Backbone.View.extend({ this.ppfx = this.em.get('Config').stylePrefix; this.sorter = o.sorter || ''; this.pfx = this.config.stylePrefix; - if(typeof this.model.get('open') == 'undefined') - this.model.set('open',false); - this.listenTo(this.model.get('components'), 'remove add change reset', this.checkChildren); - this.listenTo(this.model, 'destroy remove', this.remove); - this.listenTo(this.model, 'change:status', this.updateStatus); - this.listenTo(this.model, 'change:open', this.updateOpening); - this.className = this.pfx + 'item no-select'; - this.editBtnCls = this.pfx + 'nav-item-edit'; - this.inputNameCls = this.ppfx + 'nav-comp-name'; - this.caretCls = this.ppfx + 'nav-item-caret'; - this.titleCls = this.pfx + 'title'; + const pfx = this.pfx; + const ppfx = this.ppfx; + const model = this.model; + const components = model.get('components'); + model.set('open', false); + this.listenTo(components, 'remove add change reset', this.checkChildren); + this.listenTo(model, 'destroy remove', this.remove); + this.listenTo(model, 'change:status', this.updateStatus); + this.listenTo(model, 'change:open', this.updateOpening); + this.className = `${pfx}item no-select`; + this.editBtnCls = `${pfx}nav-item-edit`; + this.inputNameCls = `${ppfx}nav-comp-name`; + this.caretCls = `${ppfx}nav-item-caret`; + this.titleCls = `${pfx}title`; this.events = {}; - this.events['click #'+this.pfx+'btn-eye'] = 'toggleVisibility'; + this.events[`click #${pfx}btn-eye`] = 'toggleVisibility'; this.events['click .' + this.caretCls] = 'toggleOpening'; this.events['click .' + this.titleCls] = 'handleSelect'; this.events['click .' + this.editBtnCls] = 'handleEdit'; this.events['blur .' + this.inputNameCls] = 'handleEditEnd'; - this.$el.data('model', this.model); - this.$el.data('collection', this.model.get('components')); + this.$el.data('model', model); + this.$el.data('collection', components); if(o.config.sortable) - this.events['mousedown #'+this.pfx+'move'] = 'startSort'; + this.events['mousedown #'+pfx+'move'] = 'startSort'; this.delegateEvents(); }, @@ -102,13 +105,15 @@ module.exports = Backbone.View.extend({ updateOpening() { var opened = this.opt.opened || {}; var model = this.model; - if(model.get('open')){ - this.$el.addClass("open"); - this.getCaret().addClass('fa-chevron-down'); + const chvDown = 'fa-chevron-down'; + + if (model.get('open')) { + this.$el.addClass('open'); + this.getCaret().addClass(chvDown); opened[model.cid] = model; - }else{ + } else { this.$el.removeClass("open"); - this.getCaret().removeClass('fa-chevron-down'); + this.getCaret().removeClass(chvDown); delete opened[model.cid]; } }, @@ -263,7 +268,7 @@ module.exports = Backbone.View.extend({ getCaret() { if (!this.caret) { const pfx = this.pfx; - this.caret = this.$el.find(`.${pfx}title-c > .${pfx}title > .${pfx}title-inn > #${pfx}caret`); + this.caret = this.$el.children(`.${pfx}title-c`).find(`#${pfx}caret`); } return this.caret; @@ -292,9 +297,11 @@ module.exports = Backbone.View.extend({ level })); - if(typeof ItemsView == 'undefined') - ItemsView = require('./ItemsView'); - this.$components = new ItemsView({ + if (typeof ItemsView == 'undefined') { + ItemsView = require('./ItemsView'); + } + + const children = new ItemsView({ collection: model.get('components'), config: this.config, sorter: this.sorter, @@ -302,7 +309,7 @@ module.exports = Backbone.View.extend({ parent: model, level }).render().$el; - el.find(`.${pfx}children`).append(this.$components); + el.find(`.${pfx}children`).append(children); if(!model.get('draggable') || !this.config.sortable) { el.children(`#${pfx}move`).remove(); From 69140861fac5f5c12a78466598caa6b41d96193e Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 28 Sep 2017 03:29:10 +0200 Subject: [PATCH 053/143] Update selector manager tests --- src/selector_manager/view/ClassTagView.js | 5 +++- src/selector_manager/view/ClassTagsView.js | 4 +-- test/specs/selector_manager/index.js | 7 +++-- .../selector_manager/view/ClassTagView.js | 18 ++++--------- .../selector_manager/view/ClassTagsView.js | 26 ++++++++++--------- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/selector_manager/view/ClassTagView.js b/src/selector_manager/view/ClassTagView.js index c9d9f081a4..a7928a6f0c 100644 --- a/src/selector_manager/view/ClassTagView.js +++ b/src/selector_manager/view/ClassTagView.js @@ -115,8 +115,11 @@ module.exports = Backbone.View.extend({ * @private */ updateInputLabel() { - if(!this.$labelInput) + if(!this.$labelInput) { this.$labelInput = this.$el.find('input'); + } + + this.$labelInput.prop(this.inputProp, true); var size = this.$labelInput.val().length - 1; size = size < 1 ? 1 : size; this.$labelInput.attr('size', size); diff --git a/src/selector_manager/view/ClassTagsView.js b/src/selector_manager/view/ClassTagsView.js index d7183e94ae..ffe1404d58 100644 --- a/src/selector_manager/view/ClassTagsView.js +++ b/src/selector_manager/view/ClassTagsView.js @@ -97,7 +97,7 @@ module.exports = Backbone.View.extend({ * @private */ startNewTag(e) { - this.$addBtn.hide(); + this.$addBtn.get(0).style.display = 'none'; this.$input.show().focus(); }, @@ -107,7 +107,7 @@ module.exports = Backbone.View.extend({ * @private */ endNewTag(e) { - this.$addBtn.show(); + this.$addBtn.get(0).style.display = ''; this.$input.hide().val(''); }, diff --git a/test/specs/selector_manager/index.js b/test/specs/selector_manager/index.js index c4fe95e3b6..e44c91fd50 100644 --- a/test/specs/selector_manager/index.js +++ b/test/specs/selector_manager/index.js @@ -78,8 +78,11 @@ describe('SelectorManager', () => { }); Models.run(); - ClassTagView.run(); - ClassTagsView.run(); + + describe.only('Views', () => { + ClassTagView.run(); + ClassTagsView.run(); + }); describe.skip('E2E', () => { e2e.run(); diff --git a/test/specs/selector_manager/view/ClassTagView.js b/test/specs/selector_manager/view/ClassTagView.js index 13c4dd0bfc..1286321cb6 100644 --- a/test/specs/selector_manager/view/ClassTagView.js +++ b/test/specs/selector_manager/view/ClassTagView.js @@ -6,16 +6,10 @@ module.exports = { describe('ClassTagView', () => { var obj; - var fixture; var fixtures; var testLabel; var coll; - before(() => { - fixtures = $("#fixtures"); - fixture = $('
'); - }); - beforeEach(() => { coll = new Selectors(); testLabel = 'TestLabel'; @@ -30,18 +24,15 @@ module.exports = { }); obj.target = { get() {} }; _.extend(obj.target, Backbone.Events); - fixture.empty().appendTo(fixtures); - fixture.html(obj.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(obj.render().el); }); afterEach(() => { obj.model = null; }); - after(() => { - fixture.remove(); - }); - it('Object exists', () => { expect(ClassTagView).toExist(); }); @@ -78,7 +69,7 @@ module.exports = { obj.config.target = { get() {} }; sinon.stub(obj.config.target, 'get').returns(0); obj.$el.find('#close').trigger('click'); - expect(fixture.html()).toNotExist(); + expect(fixtures.innerHTML).toNotExist(); }); it('On remove triggers event', () => { @@ -108,6 +99,7 @@ module.exports = { it('Label input is disabled', () => { var inputProp = obj.inputProp; + var label = obj.$labelInput.get(0); expect(obj.$labelInput.prop(inputProp)).toEqual(true); }); diff --git a/test/specs/selector_manager/view/ClassTagsView.js b/test/specs/selector_manager/view/ClassTagsView.js index 7c541e16ae..bcbe666f77 100644 --- a/test/specs/selector_manager/view/ClassTagsView.js +++ b/test/specs/selector_manager/view/ClassTagsView.js @@ -13,10 +13,15 @@ module.exports = { var target; before(() => { - fixtures = $("#fixtures"); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); fixture = $('
'); }); + after(() => { + fixture.remove(); + }); + beforeEach(function () { target = { get() {} }; coll = new Selectors(); @@ -35,9 +40,10 @@ module.exports = { get() { return { add() {} };} }; + fixtures.innerHTML = ''; fixture.empty().appendTo(fixtures); - fixture.html(view.render().el); - this.btnAdd = view.$el.find('#' + view.addBtnId); + fixture.append(view.render().el); + this.btnAdd = view.$addBtn; this.input = view.$el.find('input#' + view.newInputId); this.$tags = fixture.find('#tags-c'); this.$states = fixture.find('#states'); @@ -48,10 +54,6 @@ module.exports = { delete view.collection; }); - after(() => { - fixture.remove(); - }); - it('Object exists', () => { expect(ClassTagsView).toExist(); }); @@ -67,15 +69,15 @@ module.exports = { }); it('Start new tag creation', function() { - this.btnAdd.click(); + this.btnAdd.trigger('click'); expect(this.btnAdd.css('display')).toEqual('none'); expect(this.input.css('display')).toNotEqual('none'); }); it.skip('Stop tag creation', function() { - this.btnAdd.click(); + this.btnAdd.trigger('click'); this.input.val('test') - this.input.blur(); + this.input.trigger('blur'); //(this.btnAdd.css('display') !== 'none').should.equal(true); //(this.input.css('display') == 'none').should.equal(true); //this.input.val().should.equal(''); @@ -84,7 +86,7 @@ module.exports = { expect(this.input.val()).toEqual(''); }); - it('Check keyup of ESC on input', function() { + it.skip('Check keyup of ESC on input', function() { this.btnAdd.click(); sinon.stub(view, "addNewTag"); this.input.trigger({ @@ -94,7 +96,7 @@ module.exports = { expect(view.addNewTag.calledOnce).toEqual(true); }); - it('Check keyup on ENTER on input', function() { + it.skip('Check keyup on ENTER on input', function() { this.btnAdd.click(); sinon.stub(view, "endNewTag"); this.input.trigger({ From 490946add8e7fb74b182b79e16c03fcf81dee1b7 Mon Sep 17 00:00:00 2001 From: hates Date: Thu, 28 Sep 2017 12:45:08 +0300 Subject: [PATCH 054/143] editorconfig added --- .editorconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..99745b0035 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true + +[*.js] +charset = utf-8 +indent_style = space +indent_size = 2 From d588a299eaca0794a5bf68f8cc92af6dc12b4569 Mon Sep 17 00:00:00 2001 From: hates Date: Thu, 28 Sep 2017 12:45:49 +0300 Subject: [PATCH 055/143] gitignore tweak --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1a1b1a3343..cbc6661606 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,8 @@ .settings/ .sass-cache/ .project -npm-debug.log +.idea +npm-debug.log* style/.sass-cache/ img/ From fafb01991aa7a522b86e0c497c92169f230d5705 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 28 Sep 2017 21:23:54 +0200 Subject: [PATCH 056/143] Add `grapesjs.$` as a reference to cash --- src/domain_abstract/ui/InputColor.js | 12 +- src/grapesjs/index.js | 7 +- src/utils/ColorPicker.js | 2321 ++++++++++++++++++++++++++ src/utils/extender.js | 10 +- test/helper.js | 3 +- test/specs/selector_manager/index.js | 2 +- 6 files changed, 2340 insertions(+), 15 deletions(-) create mode 100644 src/utils/ColorPicker.js diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index 4ed8ebbf97..e673ecb12a 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -1,5 +1,6 @@ const Input = require('./Input'); -const Spectrum = require('spectrum-colorpicker'); +//require('spectrum-colorpicker'); +require('utils/ColorPicker'); const $ = Backbone.$; module.exports = Input.extend({ @@ -63,7 +64,6 @@ module.exports = Input.extend({ var colorEl = $(`
`); var cpStyle = colorEl.get(0).style; var elToAppend = this.target && this.target.config ? this.target.config.el : ''; - const getColor = color => { let cl = color.getAlpha() == 1 ? color.toHexString() : color.toRgbString(); return cl.replace(/ /g, ''); @@ -71,6 +71,8 @@ module.exports = Input.extend({ let changed = 0; let previousСolor; + this.$el.find(`.${this.colorHolderClass}`).append(colorEl); + colorEl.spectrum({ appendTo: elToAppend || 'body', maxSelectionSize: 8, @@ -112,10 +114,4 @@ module.exports = Input.extend({ return this.colorEl; }, - render() { - Input.prototype.render.apply(this, arguments); - this.$el.find(`.${this.colorHolderClass}`).append(this.getColorEl()); - return this; - } - }); diff --git a/src/grapesjs/index.js b/src/grapesjs/index.js index e856fd70f3..4afabc684c 100644 --- a/src/grapesjs/index.js +++ b/src/grapesjs/index.js @@ -1,3 +1,4 @@ +import $ from 'cash-dom'; import { defaults } from 'underscore'; module.exports = (() => { @@ -9,13 +10,15 @@ module.exports = (() => { return { - // Will be replaced on build - version: '<# VERSION #>', + $, editors, plugins, + // Will be replaced on build + version: '<# VERSION #>', + /** * Initializes an editor based on passed options * @param {Object} config Configuration object diff --git a/src/utils/ColorPicker.js b/src/utils/ColorPicker.js new file mode 100644 index 0000000000..307114d61a --- /dev/null +++ b/src/utils/ColorPicker.js @@ -0,0 +1,2321 @@ +// Without jquery I have to update few stuff +// +// Spectrum Colorpicker v1.8.0 +// https://github.com/bgrins/spectrum +// Author: Brian Grinstead +// License: MIT + +(function (factory) { + factory(Backbone.$) +})(function($, undefined) { + "use strict"; + + var defaultOpts = { + + // Callbacks + beforeShow: noop, + move: noop, + change: noop, + show: noop, + hide: noop, + + // Options + color: false, + flat: false, + showInput: false, + allowEmpty: false, + showButtons: true, + clickoutFiresChange: true, + showInitial: false, + showPalette: false, + showPaletteOnly: false, + hideAfterPaletteSelect: false, + togglePaletteOnly: false, + showSelectionPalette: true, + localStorageKey: false, + appendTo: "body", + maxSelectionSize: 7, + cancelText: "cancel", + chooseText: "choose", + togglePaletteMoreText: "more", + togglePaletteLessText: "less", + clearText: "Clear Color Selection", + noColorSelectedText: "No Color Selected", + preferredFormat: false, + className: "", // Deprecated - use containerClassName and replacerClassName instead. + containerClassName: "", + replacerClassName: "", + showAlpha: false, + theme: "sp-light", + palette: [["#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"]], + selectionPalette: [], + disabled: false, + offset: null + }, + spectrums = [], + IE = !!/msie/i.exec( window.navigator.userAgent ), + rgbaSupport = (function() { + function contains( str, substr ) { + return !!~('' + str).indexOf(substr); + } + + var elem = document.createElement('div'); + var style = elem.style; + style.cssText = 'background-color:rgba(0,0,0,.5)'; + return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla'); + })(), + replaceInput = [ + "
", + "
", + "
", + "
" + ].join(''), + markup = (function () { + + // IE does not support gradients with multiple stops, so we need to simulate + // that for the rainbow slider with 8 divs that each have a single gradient + var gradientFix = ""; + if (IE) { + for (var i = 1; i <= 6; i++) { + gradientFix += "
"; + } + } + + return [ + "
", + "
", + "
", + "
", + "", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + gradientFix, + "
", + "
", + "
", + "
", + "
", + "", + "
", + "
", + "
", + "", + "", + "
", + "
", + "
" + ].join(""); + })(); + + function paletteTemplate (p, color, className, opts) { + var html = []; + for (var i = 0; i < p.length; i++) { + var current = p[i]; + if(current) { + var tiny = tinycolor(current); + var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light"; + c += (tinycolor.equals(color, current)) ? " sp-thumb-active" : ""; + var formattedString = tiny.toString(opts.preferredFormat || "rgb"); + var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter(); + html.push(''); + } else { + var cls = 'sp-clear-display'; + html.push($('
') + .append($('') + .attr('title', opts.noColorSelectedText) + ) + .html() + ); + } + } + return "
" + html.join('') + "
"; + } + + function hideAll() { + for (var i = 0; i < spectrums.length; i++) { + if (spectrums[i]) { + spectrums[i].hide(); + } + } + } + + function instanceOptions(o, callbackContext) { + var opts = $.extend({}, defaultOpts, o); + opts.callbacks = { + 'move': bind(opts.move, callbackContext), + 'change': bind(opts.change, callbackContext), + 'show': bind(opts.show, callbackContext), + 'hide': bind(opts.hide, callbackContext), + 'beforeShow': bind(opts.beforeShow, callbackContext) + }; + return opts; + } + + function spectrum(element, o) { + + var opts = instanceOptions(o, element), + flat = opts.flat, + showSelectionPalette = opts.showSelectionPalette, + localStorageKey = opts.localStorageKey, + theme = opts.theme, + callbacks = opts.callbacks, + resize = throttle(reflow, 10), + visible = false, + isDragging = false, + dragWidth = 0, + dragHeight = 0, + dragHelperHeight = 0, + slideHeight = 0, + slideWidth = 0, + alphaWidth = 0, + alphaSlideHelperWidth = 0, + slideHelperHeight = 0, + currentHue = 0, + currentSaturation = 0, + currentValue = 0, + currentAlpha = 1, + palette = [], + paletteArray = [], + paletteLookup = {}, + selectionPalette = opts.selectionPalette.slice(0), + maxSelectionSize = opts.maxSelectionSize, + draggingClass = "sp-dragging", + shiftMovementDirection = null; + + var doc = element.ownerDocument, + body = doc.body, + boundElement = $(element), + disabled = false, + container = $(markup, doc).addClass(theme), + pickerContainer = container.find(".sp-picker-container"), + dragger = container.find(".sp-color"), + dragHelper = container.find(".sp-dragger"), + slider = container.find(".sp-hue"), + slideHelper = container.find(".sp-slider"), + alphaSliderInner = container.find(".sp-alpha-inner"), + alphaSlider = container.find(".sp-alpha"), + alphaSlideHelper = container.find(".sp-alpha-handle"), + textInput = container.find(".sp-input"), + paletteContainer = container.find(".sp-palette"), + initialColorContainer = container.find(".sp-initial"), + cancelButton = container.find(".sp-cancel"), + clearButton = container.find(".sp-clear"), + chooseButton = container.find(".sp-choose"), + toggleButton = container.find(".sp-palette-toggle"), + isInput = boundElement.is("input"), + isInputTypeColor = isInput && boundElement.attr("type") === "color" && inputTypeColorSupport(), + shouldReplace = isInput && !flat, + replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName) : $([]), + offsetElement = (shouldReplace) ? replacer : boundElement, + previewElement = replacer.find(".sp-preview-inner"), + initialColor = opts.color || (isInput && boundElement.val()), + colorOnShow = false, + currentPreferredFormat = opts.preferredFormat, + clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange, + isEmpty = !initialColor, + allowEmpty = opts.allowEmpty && !isInputTypeColor; + + function applyOptions() { + + if (opts.showPaletteOnly) { + opts.showPalette = true; + } + + toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText); + + if (opts.palette) { + palette = opts.palette.slice(0); + paletteArray = $.isArray(palette[0]) ? palette : [palette]; + paletteLookup = {}; + for (var i = 0; i < paletteArray.length; i++) { + for (var j = 0; j < paletteArray[i].length; j++) { + var rgb = tinycolor(paletteArray[i][j]).toRgbString(); + paletteLookup[rgb] = true; + } + } + } + + container.toggleClass("sp-flat", flat); + container.toggleClass("sp-input-disabled", !opts.showInput); + container.toggleClass("sp-alpha-enabled", opts.showAlpha); + container.toggleClass("sp-clear-enabled", allowEmpty); + container.toggleClass("sp-buttons-disabled", !opts.showButtons); + container.toggleClass("sp-palette-buttons-disabled", !opts.togglePaletteOnly); + container.toggleClass("sp-palette-disabled", !opts.showPalette); + container.toggleClass("sp-palette-only", opts.showPaletteOnly); + container.toggleClass("sp-initial-disabled", !opts.showInitial); + container.addClass(opts.className).addClass(opts.containerClassName); + + reflow(); + } + + function initialize() { + + if (IE) { + container.find("*:not(input)").attr("unselectable", "on"); + } + + applyOptions(); + + if (shouldReplace) { + boundElement.after(replacer).hide(); + } + + if (!allowEmpty) { + clearButton.hide(); + } + + if (flat) { + boundElement.after(container).hide(); + } + else { + + var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo); + if (appendTo.length !== 1) { + appendTo = $("body"); + } + + appendTo.append(container); + } + + updateSelectionPaletteFromStorage(); + + offsetElement.bind("click.spectrum touchstart.spectrum", function (e) { + + if (!disabled) { + toggle(); + } + + e.stopPropagation(); + + if (!$(e.target).is("input")) { + e.preventDefault(); + } + }); + + if(boundElement.is(":disabled") || (opts.disabled === true)) { + disable(); + } + + // Prevent clicks from bubbling up to document. This would cause it to be hidden. + container.click(stopPropagation); + + // Handle user typed input + textInput.change(setFromTextInput); + textInput.bind("paste", function () { + setTimeout(setFromTextInput, 1); + }); + textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); + + cancelButton.text(opts.cancelText); + cancelButton.bind("click.spectrum", function (e) { + e.stopPropagation(); + e.preventDefault(); + revert(); + hide(); + }); + + clearButton.attr("title", opts.clearText); + clearButton.bind("click.spectrum", function (e) { + e.stopPropagation(); + e.preventDefault(); + isEmpty = true; + move(); + + if(flat) { + //for the flat style, this is a change event + updateOriginalInput(true); + } + }); + + chooseButton.text(opts.chooseText); + chooseButton.bind("click.spectrum", function (e) { + e.stopPropagation(); + e.preventDefault(); + + if (IE && textInput.is(":focus")) { + textInput.trigger('change'); + } + + if (isValid()) { + updateOriginalInput(true); + hide(); + } + }); + + toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText); + toggleButton.bind("click.spectrum", function (e) { + e.stopPropagation(); + e.preventDefault(); + + opts.showPaletteOnly = !opts.showPaletteOnly; + + // To make sure the Picker area is drawn on the right, next to the + // Palette area (and not below the palette), first move the Palette + // to the left to make space for the picker, plus 5px extra. + // The 'applyOptions' function puts the whole container back into place + // and takes care of the button-text and the sp-palette-only CSS class. + if (!opts.showPaletteOnly && !flat) { + container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5)); + } + applyOptions(); + }); + + draggable(alphaSlider, function (dragX, dragY, e) { + currentAlpha = (dragX / alphaWidth); + isEmpty = false; + if (e.shiftKey) { + currentAlpha = Math.round(currentAlpha * 10) / 10; + } + + move(); + }, dragStart, dragStop); + + draggable(slider, function (dragX, dragY) { + currentHue = parseFloat(dragY / slideHeight); + isEmpty = false; + if (!opts.showAlpha) { + currentAlpha = 1; + } + move(); + }, dragStart, dragStop); + + draggable(dragger, function (dragX, dragY, e) { + + // shift+drag should snap the movement to either the x or y axis. + if (!e.shiftKey) { + shiftMovementDirection = null; + } + else if (!shiftMovementDirection) { + var oldDragX = currentSaturation * dragWidth; + var oldDragY = dragHeight - (currentValue * dragHeight); + var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY); + + shiftMovementDirection = furtherFromX ? "x" : "y"; + } + + var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x"; + var setValue = !shiftMovementDirection || shiftMovementDirection === "y"; + + if (setSaturation) { + currentSaturation = parseFloat(dragX / dragWidth); + } + if (setValue) { + currentValue = parseFloat((dragHeight - dragY) / dragHeight); + } + + isEmpty = false; + if (!opts.showAlpha) { + currentAlpha = 1; + } + + move(); + + }, dragStart, dragStop); + + if (!!initialColor) { + set(initialColor); + + // In case color was black - update the preview UI and set the format + // since the set function will not run (default color is black). + updateUI(); + currentPreferredFormat = opts.preferredFormat || tinycolor(initialColor).format; + + addColorToSelectionPalette(initialColor); + } + else { + updateUI(); + } + + if (flat) { + show(); + } + + function paletteElementClick(e) { + if (e.data && e.data.ignore) { + set($(e.target).closest(".sp-thumb-el").data("color")); + move(); + } + else { + set($(e.target).closest(".sp-thumb-el").data("color")); + move(); + updateOriginalInput(true); + if (opts.hideAfterPaletteSelect) { + hide(); + } + } + + return false; + } + + var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum"; + paletteContainer.delegate(".sp-thumb-el", paletteEvent, paletteElementClick); + initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, paletteElementClick); + } + + function updateSelectionPaletteFromStorage() { + + if (localStorageKey && window.localStorage) { + + // Migrate old palettes over to new format. May want to remove this eventually. + try { + var oldPalette = window.localStorage[localStorageKey].split(",#"); + if (oldPalette.length > 1) { + delete window.localStorage[localStorageKey]; + $.each(oldPalette, function(i, c) { + addColorToSelectionPalette(c); + }); + } + } + catch(e) { } + + try { + selectionPalette = window.localStorage[localStorageKey].split(";"); + } + catch (e) { } + } + } + + function addColorToSelectionPalette(color) { + if (showSelectionPalette) { + var rgb = tinycolor(color).toRgbString(); + if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) { + selectionPalette.push(rgb); + while(selectionPalette.length > maxSelectionSize) { + selectionPalette.shift(); + } + } + + if (localStorageKey && window.localStorage) { + try { + window.localStorage[localStorageKey] = selectionPalette.join(";"); + } + catch(e) { } + } + } + } + + function getUniqueSelectionPalette() { + var unique = []; + if (opts.showPalette) { + for (var i = 0; i < selectionPalette.length; i++) { + var rgb = tinycolor(selectionPalette[i]).toRgbString(); + + if (!paletteLookup[rgb]) { + unique.push(selectionPalette[i]); + } + } + } + + return unique.reverse().slice(0, opts.maxSelectionSize); + } + + function drawPalette() { + + var currentColor = get(); + + var html = $.map(paletteArray, function (palette, i) { + return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i, opts); + }); + + updateSelectionPaletteFromStorage(); + + if (selectionPalette) { + html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection", opts)); + } + + paletteContainer.html(html.join("")); + } + + function drawInitial() { + if (opts.showInitial) { + var initial = colorOnShow; + var current = get(); + initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial", opts)); + } + } + + function dragStart() { + if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) { + reflow(); + } + isDragging = true; + container.addClass(draggingClass); + shiftMovementDirection = null; + boundElement.trigger('dragstart.spectrum', [ get() ]); + } + + function dragStop() { + isDragging = false; + container.removeClass(draggingClass); + boundElement.trigger('dragstop.spectrum', [ get() ]); + } + + function setFromTextInput() { + + var value = textInput.val(); + + if ((value === null || value === "") && allowEmpty) { + set(null); + updateOriginalInput(true); + } + else { + var tiny = tinycolor(value); + if (tiny.isValid()) { + set(tiny); + updateOriginalInput(true); + } + else { + textInput.addClass("sp-validation-error"); + } + } + } + + function toggle() { + if (visible) { + hide(); + } + else { + show(); + } + } + + function show() { + var event = $.Event('beforeShow.spectrum'); + + if (visible) { + reflow(); + return; + } + + boundElement.trigger(event, [ get() ]); + + if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) { + return; + } + + hideAll(); + visible = true; + + var $doc = $(doc); + $doc.bind("keydown.spectrum", onkeydown); + $doc.bind("click.spectrum", clickout); + $(window).bind("resize.spectrum", resize); + replacer.addClass("sp-active"); + container.removeClass("sp-hidden"); + + reflow(); + updateUI(); + + colorOnShow = get(); + + drawInitial(); + callbacks.show(colorOnShow); + boundElement.trigger('show.spectrum', [ colorOnShow ]); + } + + function onkeydown(e) { + // Close on ESC + if (e.keyCode === 27) { + hide(); + } + } + + function clickout(e) { + // Return on right click. + if (e.button == 2) { return; } + + // If a drag event was happening during the mouseup, don't hide + // on click. + if (isDragging) { return; } + + if (clickoutFiresChange) { + updateOriginalInput(true); + } + else { + revert(); + } + hide(); + } + + function hide() { + // Return if hiding is unnecessary + if (!visible || flat) { return; } + visible = false; + + $(doc).unbind("keydown.spectrum", onkeydown); + $(doc).unbind("click.spectrum", clickout); + $(window).unbind("resize.spectrum", resize); + + replacer.removeClass("sp-active"); + container.addClass("sp-hidden"); + + callbacks.hide(get()); + boundElement.trigger('hide.spectrum', [ get() ]); + } + + function revert() { + set(colorOnShow, true); + } + + function set(color, ignoreFormatChange) { + if (tinycolor.equals(color, get())) { + // Update UI just in case a validation error needs + // to be cleared. + updateUI(); + return; + } + + var newColor, newHsv; + if (!color && allowEmpty) { + isEmpty = true; + } else { + isEmpty = false; + newColor = tinycolor(color); + newHsv = newColor.toHsv(); + + currentHue = (newHsv.h % 360) / 360; + currentSaturation = newHsv.s; + currentValue = newHsv.v; + currentAlpha = newHsv.a; + } + updateUI(); + + if (newColor && newColor.isValid() && !ignoreFormatChange) { + currentPreferredFormat = opts.preferredFormat || newColor.getFormat(); + } + } + + function get(opts) { + opts = opts || { }; + + if (allowEmpty && isEmpty) { + return null; + } + + return tinycolor.fromRatio({ + h: currentHue, + s: currentSaturation, + v: currentValue, + a: Math.round(currentAlpha * 100) / 100 + }, { format: opts.format || currentPreferredFormat }); + } + + function isValid() { + return !textInput.hasClass("sp-validation-error"); + } + + function move() { + updateUI(); + + callbacks.move(get()); + boundElement.trigger('move.spectrum', [ get() ]); + } + + function updateUI() { + + textInput.removeClass("sp-validation-error"); + + updateHelperLocations(); + + // Update dragger background color (gradients take care of saturation and value). + var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 }); + dragger.css("background-color", flatColor.toHexString()); + + // Get a format that alpha will be included in (hex and names ignore alpha) + var format = currentPreferredFormat; + if (currentAlpha < 1 && !(currentAlpha === 0 && format === "name")) { + if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") { + format = "rgb"; + } + } + + var realColor = get({ format: format }), + displayColor = ''; + + //reset background info for preview element + previewElement.removeClass("sp-clear-display"); + previewElement.css('background-color', 'transparent'); + + if (!realColor && allowEmpty) { + // Update the replaced elements background with icon indicating no color selection + previewElement.addClass("sp-clear-display"); + } + else { + var realHex = realColor.toHexString(), + realRgb = realColor.toRgbString(); + + // Update the replaced elements background color (with actual selected color) + if (rgbaSupport || realColor.alpha === 1) { + previewElement.css("background-color", realRgb); + } + else { + previewElement.css("background-color", "transparent"); + previewElement.css("filter", realColor.toFilter()); + } + + if (opts.showAlpha) { + var rgb = realColor.toRgb(); + rgb.a = 0; + var realAlpha = tinycolor(rgb).toRgbString(); + var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")"; + + if (IE) { + alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)); + } + else { + alphaSliderInner.css("background", "-webkit-" + gradient); + alphaSliderInner.css("background", "-moz-" + gradient); + alphaSliderInner.css("background", "-ms-" + gradient); + // Use current syntax gradient on unprefixed property. + alphaSliderInner.css("background", + "linear-gradient(to right, " + realAlpha + ", " + realHex + ")"); + } + } + + displayColor = realColor.toString(format); + } + + // Update the text entry input as it changes happen + if (opts.showInput) { + textInput.val(displayColor); + } + + if (opts.showPalette) { + drawPalette(); + } + + drawInitial(); + } + + function updateHelperLocations() { + var s = currentSaturation; + var v = currentValue; + + if(allowEmpty && isEmpty) { + //if selected color is empty, hide the helpers + alphaSlideHelper.hide(); + slideHelper.hide(); + dragHelper.hide(); + } + else { + //make sure helpers are visible + alphaSlideHelper.show(); + slideHelper.show(); + dragHelper.show(); + + // Where to show the little circle in that displays your current selected color + var dragX = s * dragWidth; + var dragY = dragHeight - (v * dragHeight); + dragX = Math.max( + -dragHelperHeight, + Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight) + ); + dragY = Math.max( + -dragHelperHeight, + Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight) + ); + dragHelper.css({ + "top": dragY + "px", + "left": dragX + "px" + }); + + var alphaX = currentAlpha * alphaWidth; + alphaSlideHelper.css({ + "left": (alphaX - (alphaSlideHelperWidth / 2)) + "px" + }); + + // Where to show the bar that displays your current selected hue + var slideY = (currentHue) * slideHeight; + slideHelper.css({ + "top": (slideY - slideHelperHeight) + "px" + }); + } + } + + function updateOriginalInput(fireCallback) { + var color = get(), + displayColor = '', + hasChanged = !tinycolor.equals(color, colorOnShow); + + if (color) { + displayColor = color.toString(currentPreferredFormat); + // Update the selection palette with the current color + addColorToSelectionPalette(color); + } + + if (isInput) { + boundElement.val(displayColor); + } + + if (fireCallback && hasChanged) { + callbacks.change(color); + boundElement.trigger('change', [ color ]); + } + } + + function reflow() { + if (!visible) { + return; // Calculations would be useless and wouldn't be reliable anyways + } + dragWidth = dragger.width(); + dragHeight = dragger.height(); + dragHelperHeight = dragHelper.height(); + slideWidth = slider.width(); + slideHeight = slider.height(); + slideHelperHeight = slideHelper.height(); + alphaWidth = alphaSlider.width(); + alphaSlideHelperWidth = alphaSlideHelper.width(); + + if (!flat) { + container.css("position", "absolute"); + if (opts.offset) { + container.offset(opts.offset); + } else { + container.offset(getOffset(container, offsetElement)); + } + } + + updateHelperLocations(); + + if (opts.showPalette) { + drawPalette(); + } + + boundElement.trigger('reflow.spectrum'); + } + + function destroy() { + boundElement.show(); + offsetElement.unbind("click.spectrum touchstart.spectrum"); + container.remove(); + replacer.remove(); + spectrums[spect.id] = null; + } + + function option(optionName, optionValue) { + if (optionName === undefined) { + return $.extend({}, opts); + } + if (optionValue === undefined) { + return opts[optionName]; + } + + opts[optionName] = optionValue; + + if (optionName === "preferredFormat") { + currentPreferredFormat = opts.preferredFormat; + } + applyOptions(); + } + + function enable() { + disabled = false; + boundElement.attr("disabled", false); + offsetElement.removeClass("sp-disabled"); + } + + function disable() { + hide(); + disabled = true; + boundElement.attr("disabled", true); + offsetElement.addClass("sp-disabled"); + } + + function setOffset(coord) { + opts.offset = coord; + reflow(); + } + + initialize(); + + var spect = { + show: show, + hide: hide, + toggle: toggle, + reflow: reflow, + option: option, + enable: enable, + disable: disable, + offset: setOffset, + set: function (c) { + set(c); + updateOriginalInput(); + }, + get: get, + destroy: destroy, + container: container + }; + + spect.id = spectrums.push(spect) - 1; + + return spect; + } + + /** + * checkOffset - get the offset below/above and left/right element depending on screen position + * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js + */ + function getOffset(picker, input) { + var extraY = 0; + var dpWidth = picker.outerWidth(); + var dpHeight = picker.outerHeight(); + var inputHeight = input.outerHeight(); + var doc = picker[0].ownerDocument; + var docElem = doc.documentElement; + var cW = docElem.clientWidth; + var cH = docElem.clientHeight; + var scL = $(doc).scrollLeft(); + var scT = $(doc).scrollTop(); + var viewWidth = cW + scL; + var viewHeight = cH + scT; + var offset = input.offset(); + + offset.top += inputHeight; + + offset.left -= + Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? + Math.abs(offset.left + dpWidth - viewWidth) : 0); + + offset.top -= + Math.min(offset.top, ((offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? + Math.abs(dpHeight + inputHeight - extraY) : extraY)); + + return offset; + } + + /** + * noop - do nothing + */ + function noop() { + + } + + /** + * stopPropagation - makes the code only doing this a little easier to read in line + */ + function stopPropagation(e) { + e.stopPropagation(); + } + + /** + * Create a function bound to a given object + * Thanks to underscore.js + */ + function bind(func, obj) { + var slice = Array.prototype.slice; + var args = slice.call(arguments, 2); + return function () { + return func.apply(obj, args.concat(slice.call(arguments))); + }; + } + + /** + * Lightweight drag helper. Handles containment within the element, so that + * when dragging, the x is within [0,element.width] and y is within [0,element.height] + */ + function draggable(element, onmove, onstart, onstop) { + onmove = onmove || function () { }; + onstart = onstart || function () { }; + onstop = onstop || function () { }; + var doc = document; + var dragging = false; + var offset = {}; + var maxHeight = 0; + var maxWidth = 0; + var hasTouch = ('ontouchstart' in window); + + var duringDragEvents = {}; + duringDragEvents["selectstart"] = prevent; + duringDragEvents["dragstart"] = prevent; + duringDragEvents["touchmove mousemove"] = move; + duringDragEvents["touchend mouseup"] = stop; + + function prevent(e) { + if (e.stopPropagation) { + e.stopPropagation(); + } + if (e.preventDefault) { + e.preventDefault(); + } + e.returnValue = false; + } + + function move(e) { + if (dragging) { + // Mouseup happened outside of window + if (IE && doc.documentMode < 9 && !e.button) { + return stop(); + } + + var t0 = e.originalEvent && e.originalEvent.touches && e.originalEvent.touches[0]; + var pageX = t0 && t0.pageX || e.pageX; + var pageY = t0 && t0.pageY || e.pageY; + + var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth)); + var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight)); + + if (hasTouch) { + // Stop scrolling in iOS + prevent(e); + } + + onmove.apply(element, [dragX, dragY, e]); + } + } + + function start(e) { + var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); + + if (!rightclick && !dragging) { + if (onstart.apply(element, arguments) !== false) { + dragging = true; + maxHeight = $(element).height(); + maxWidth = $(element).width(); + offset = $(element).offset(); + + $(doc).bind(duringDragEvents); + $(doc.body).addClass("sp-dragging"); + + move(e); + + prevent(e); + } + } + } + + function stop() { + if (dragging) { + $(doc).unbind(duringDragEvents); + $(doc.body).removeClass("sp-dragging"); + + // Wait a tick before notifying observers to allow the click event + // to fire in Chrome. + setTimeout(function() { + onstop.apply(element, arguments); + }, 0); + } + dragging = false; + } + + $(element).bind("touchstart mousedown", start); + } + + function throttle(func, wait, debounce) { + var timeout; + return function () { + var context = this, args = arguments; + var throttler = function () { + timeout = null; + func.apply(context, args); + }; + if (debounce) clearTimeout(timeout); + if (debounce || !timeout) timeout = setTimeout(throttler, wait); + }; + } + + function inputTypeColorSupport() { + return $.fn.spectrum.inputTypeColorSupport(); + } + + /** + * Define a jQuery plugin + */ + var dataID = "spectrum.id"; + $.fn.spectrum = function (opts, extra) { + + if (typeof opts == "string") { + + var returnValue = this; + var args = Array.prototype.slice.call( arguments, 1 ); + + this.each(function () { + var spect = spectrums[$(this).data(dataID)]; + if (spect) { + var method = spect[opts]; + if (!method) { + throw new Error( "Spectrum: no such method: '" + opts + "'" ); + } + + if (opts == "get") { + returnValue = spect.get(); + } + else if (opts == "container") { + returnValue = spect.container; + } + else if (opts == "option") { + returnValue = spect.option.apply(spect, args); + } + else if (opts == "destroy") { + spect.destroy(); + $(this).removeData(dataID); + } + else { + method.apply(spect, args); + } + } + }); + + return returnValue; + } + + // Initializing a new instance of spectrum + return this.spectrum("destroy").each(function () { + var options = $.extend({}, opts, $(this).data()); + var spect = spectrum(this, options); + $(this).data(dataID, spect.id); + }); + }; + + $.fn.spectrum.load = true; + $.fn.spectrum.loadOpts = {}; + $.fn.spectrum.draggable = draggable; + $.fn.spectrum.defaults = defaultOpts; + $.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() { + if (typeof inputTypeColorSupport._cachedResult === "undefined") { + var colorInput = $("")[0]; // if color element is supported, value will default to not null + inputTypeColorSupport._cachedResult = colorInput.type === "color" && colorInput.value !== ""; + } + return inputTypeColorSupport._cachedResult; + }; + + $.spectrum = { }; + $.spectrum.localization = { }; + $.spectrum.palettes = { }; + + $.fn.spectrum.processNativeColorInputs = function () { + var colorInputs = $("input[type=color]"); + if (colorInputs.length && !inputTypeColorSupport()) { + colorInputs.spectrum({ + preferredFormat: "hex6" + }); + } + }; + + // TinyColor v1.1.2 + // https://github.com/bgrins/TinyColor + // Brian Grinstead, MIT License + + (function() { + + var trimLeft = /^[\s,#]+/, + trimRight = /\s+$/, + tinyCounter = 0, + math = Math, + mathRound = math.round, + mathMin = math.min, + mathMax = math.max, + mathRandom = math.random; + + var tinycolor = function(color, opts) { + + color = (color) ? color : ''; + opts = opts || { }; + + // If input is already a tinycolor, return itself + if (color instanceof tinycolor) { + return color; + } + // If we are called as a function, call using new instead + if (!(this instanceof tinycolor)) { + return new tinycolor(color, opts); + } + + var rgb = inputToRGB(color); + this._originalInput = color, + this._r = rgb.r, + this._g = rgb.g, + this._b = rgb.b, + this._a = rgb.a, + this._roundA = mathRound(100*this._a) / 100, + this._format = opts.format || rgb.format; + this._gradientType = opts.gradientType; + + // Don't let the range of [0,255] come back in [0,1]. + // Potentially lose a little bit of precision here, but will fix issues where + // .5 gets interpreted as half of the total, instead of half of 1 + // If it was supposed to be 128, this was already taken care of by `inputToRgb` + if (this._r < 1) { this._r = mathRound(this._r); } + if (this._g < 1) { this._g = mathRound(this._g); } + if (this._b < 1) { this._b = mathRound(this._b); } + + this._ok = rgb.ok; + this._tc_id = tinyCounter++; + }; + + tinycolor.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 rgb = this.toRgb(); + return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; + }, + setAlpha: function(value) { + this._a = boundAlpha(value); + this._roundA = mathRound(100*this._a) / 100; + return this; + }, + toHsv: function() { + var hsv = rgbToHsv(this._r, this._g, this._b); + return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a }; + }, + toHsvString: function() { + var hsv = rgbToHsv(this._r, this._g, this._b); + var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); + return (this._a == 1) ? + "hsv(" + h + ", " + s + "%, " + v + "%)" : + "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")"; + }, + toHsl: function() { + var hsl = rgbToHsl(this._r, this._g, this._b); + return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a }; + }, + toHslString: function() { + var hsl = rgbToHsl(this._r, this._g, this._b); + var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); + return (this._a == 1) ? + "hsl(" + h + ", " + s + "%, " + l + "%)" : + "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")"; + }, + toHex: function(allow3Char) { + return rgbToHex(this._r, this._g, this._b, allow3Char); + }, + toHexString: function(allow3Char) { + return '#' + this.toHex(allow3Char); + }, + toHex8: function() { + return rgbaToHex(this._r, this._g, this._b, this._a); + }, + toHex8String: function() { + return '#' + this.toHex8(); + }, + toRgb: function() { + return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a }; + }, + toRgbString: function() { + return (this._a == 1) ? + "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" : + "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")"; + }, + toPercentageRgb: function() { + return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a }; + }, + toPercentageRgbString: function() { + return (this._a == 1) ? + "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" : + "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")"; + }, + toName: function() { + if (this._a === 0) { + return "transparent"; + } + + if (this._a < 1) { + return false; + } + + return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false; + }, + toFilter: function(secondColor) { + var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a); + var secondHex8String = hex8String; + var gradientType = this._gradientType ? "GradientType = 1, " : ""; + + if (secondColor) { + var s = tinycolor(secondColor); + secondHex8String = s.toHex8String(); + } + + return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")"; + }, + toString: function(format) { + var formatSet = !!format; + format = format || this._format; + + var formattedString = false; + var hasAlpha = this._a < 1 && this._a >= 0; + var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "name"); + + if (needsAlphaFormat) { + // Special case for "transparent", all other non-alpha formats + // will return rgba when there is transparency. + if (format === "name" && this._a === 0) { + return this.toName(); + } + return this.toRgbString(); + } + if (format === "rgb") { + formattedString = this.toRgbString(); + } + if (format === "prgb") { + formattedString = this.toPercentageRgbString(); + } + if (format === "hex" || format === "hex6") { + formattedString = this.toHexString(); + } + if (format === "hex3") { + formattedString = this.toHexString(true); + } + if (format === "hex8") { + formattedString = this.toHex8String(); + } + if (format === "name") { + formattedString = this.toName(); + } + if (format === "hsl") { + formattedString = this.toHslString(); + } + if (format === "hsv") { + formattedString = this.toHsvString(); + } + + return formattedString || this.toHexString(); + }, + + _applyModification: function(fn, args) { + var color = fn.apply(null, [this].concat([].slice.call(args))); + this._r = color._r; + this._g = color._g; + this._b = color._b; + this.setAlpha(color._a); + return this; + }, + lighten: function() { + return this._applyModification(lighten, arguments); + }, + brighten: function() { + return this._applyModification(brighten, arguments); + }, + darken: function() { + return this._applyModification(darken, arguments); + }, + desaturate: function() { + return this._applyModification(desaturate, arguments); + }, + saturate: function() { + return this._applyModification(saturate, arguments); + }, + greyscale: function() { + return this._applyModification(greyscale, arguments); + }, + spin: function() { + return this._applyModification(spin, arguments); + }, + + _applyCombination: function(fn, args) { + return fn.apply(null, [this].concat([].slice.call(args))); + }, + analogous: function() { + return this._applyCombination(analogous, arguments); + }, + complement: function() { + return this._applyCombination(complement, arguments); + }, + monochromatic: function() { + return this._applyCombination(monochromatic, arguments); + }, + splitcomplement: function() { + return this._applyCombination(splitcomplement, arguments); + }, + triad: function() { + return this._applyCombination(triad, arguments); + }, + tetrad: function() { + return this._applyCombination(tetrad, arguments); + } + }; + + // If input is an object, force 1 into "1.0" to handle ratios properly + // String input requires "1.0" as input, so 1 will be treated as 1 + tinycolor.fromRatio = function(color, opts) { + if (typeof color == "object") { + var newColor = {}; + for (var i in color) { + if (color.hasOwnProperty(i)) { + if (i === "a") { + newColor[i] = color[i]; + } + else { + newColor[i] = convertToPercentage(color[i]); + } + } + } + color = newColor; + } + + return tinycolor(color, opts); + }; + + // Given a string or object, convert that input to RGB + // Possible string inputs: + // + // "red" + // "#f00" or "f00" + // "#ff0000" or "ff0000" + // "#ff000000" or "ff000000" + // "rgb 255 0 0" or "rgb (255, 0, 0)" + // "rgb 1.0 0 0" or "rgb (1, 0, 0)" + // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" + // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" + // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" + // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" + // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" + // + function inputToRGB(color) { + + var rgb = { r: 0, g: 0, b: 0 }; + var a = 1; + var ok = false; + var format = false; + + if (typeof color == "string") { + color = stringInputToObject(color); + } + + if (typeof color == "object") { + if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) { + rgb = rgbToRgb(color.r, color.g, color.b); + ok = true; + format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; + } + else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) { + color.s = convertToPercentage(color.s); + color.v = convertToPercentage(color.v); + rgb = hsvToRgb(color.h, color.s, color.v); + ok = true; + format = "hsv"; + } + else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) { + color.s = convertToPercentage(color.s); + color.l = convertToPercentage(color.l); + rgb = hslToRgb(color.h, color.s, color.l); + ok = true; + format = "hsl"; + } + + if (color.hasOwnProperty("a")) { + a = color.a; + } + } + + a = boundAlpha(a); + + return { + ok: ok, + format: color.format || format, + r: mathMin(255, mathMax(rgb.r, 0)), + g: mathMin(255, mathMax(rgb.g, 0)), + b: mathMin(255, mathMax(rgb.b, 0)), + a: a + }; + } + + + // Conversion Functions + // -------------------- + + // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: + // + + // `rgbToRgb` + // Handle bounds / percentage checking to conform to CSS color spec + // + // *Assumes:* r, g, b in [0, 255] or [0, 1] + // *Returns:* { r, g, b } in [0, 255] + function rgbToRgb(r, g, b){ + return { + r: bound01(r, 255) * 255, + g: bound01(g, 255) * 255, + b: bound01(b, 255) * 255 + }; + } + + // `rgbToHsl` + // Converts an RGB color value to HSL. + // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] + // *Returns:* { h, s, l } in [0,1] + function rgbToHsl(r, g, b) { + + r = bound01(r, 255); + g = bound01(g, 255); + b = bound01(b, 255); + + var max = mathMax(r, g, b), min = mathMin(r, g, b); + var h, s, l = (max + min) / 2; + + if(max == min) { + h = s = 0; // achromatic + } + else { + var d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch(max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + + h /= 6; + } + + return { h: h, s: s, l: l }; + } + + // `hslToRgb` + // Converts an HSL color value to RGB. + // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] + // *Returns:* { r, g, b } in the set [0, 255] + function hslToRgb(h, s, l) { + var r, g, b; + + h = bound01(h, 360); + s = bound01(s, 100); + l = bound01(l, 100); + + function hue2rgb(p, q, t) { + if(t < 0) t += 1; + if(t > 1) t -= 1; + if(t < 1/6) return p + (q - p) * 6 * t; + if(t < 1/2) return q; + if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; + } + + if(s === 0) { + r = g = b = l; // achromatic + } + else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + + return { r: r * 255, g: g * 255, b: b * 255 }; + } + + // `rgbToHsv` + // Converts an RGB color value to HSV + // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] + // *Returns:* { h, s, v } in [0,1] + function rgbToHsv(r, g, b) { + + r = bound01(r, 255); + g = bound01(g, 255); + b = bound01(b, 255); + + var max = mathMax(r, g, b), min = mathMin(r, g, b); + var h, s, v = max; + + var d = max - min; + s = max === 0 ? 0 : d / max; + + if(max == min) { + h = 0; // achromatic + } + else { + switch(max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + h /= 6; + } + return { h: h, s: s, v: v }; + } + + // `hsvToRgb` + // Converts an HSV color value to RGB. + // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] + // *Returns:* { r, g, b } in the set [0, 255] + function hsvToRgb(h, s, v) { + + h = bound01(h, 360) * 6; + s = bound01(s, 100); + v = bound01(v, 100); + + var i = math.floor(h), + f = h - i, + p = v * (1 - s), + q = v * (1 - f * s), + t = v * (1 - (1 - f) * s), + mod = i % 6, + r = [v, q, p, p, t, v][mod], + g = [t, v, v, q, p, p][mod], + b = [p, p, t, v, v, q][mod]; + + return { r: r * 255, g: g * 255, b: b * 255 }; + } + + // `rgbToHex` + // Converts an RGB color to hex + // Assumes r, g, and b are contained in the set [0, 255] + // Returns a 3 or 6 character hex + function rgbToHex(r, g, b, allow3Char) { + + var hex = [ + pad2(mathRound(r).toString(16)), + pad2(mathRound(g).toString(16)), + pad2(mathRound(b).toString(16)) + ]; + + // Return a 3 character hex if possible + if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); + } + + return hex.join(""); + } + // `rgbaToHex` + // Converts an RGBA color plus alpha transparency to hex + // Assumes r, g, b and a are contained in the set [0, 255] + // Returns an 8 character hex + function rgbaToHex(r, g, b, a) { + + var hex = [ + pad2(convertDecimalToHex(a)), + pad2(mathRound(r).toString(16)), + pad2(mathRound(g).toString(16)), + pad2(mathRound(b).toString(16)) + ]; + + return hex.join(""); + } + + // `equals` + // Can be called with any tinycolor input + tinycolor.equals = function (color1, color2) { + if (!color1 || !color2) { return false; } + return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); + }; + tinycolor.random = function() { + return tinycolor.fromRatio({ + r: mathRandom(), + g: mathRandom(), + b: mathRandom() + }); + }; + + + // Modification Functions + // ---------------------- + // Thanks to less.js for some of the basics here + // + + function desaturate(color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.s -= amount / 100; + hsl.s = clamp01(hsl.s); + return tinycolor(hsl); + } + + function saturate(color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.s += amount / 100; + hsl.s = clamp01(hsl.s); + return tinycolor(hsl); + } + + function greyscale(color) { + return tinycolor(color).desaturate(100); + } + + function lighten (color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.l += amount / 100; + hsl.l = clamp01(hsl.l); + return tinycolor(hsl); + } + + function brighten(color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var rgb = tinycolor(color).toRgb(); + rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100)))); + rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100)))); + rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100)))); + return tinycolor(rgb); + } + + function darken (color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.l -= amount / 100; + hsl.l = clamp01(hsl.l); + return tinycolor(hsl); + } + + // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue. + // Values outside of this range will be wrapped into this range. + function spin(color, amount) { + var hsl = tinycolor(color).toHsl(); + var hue = (mathRound(hsl.h) + amount) % 360; + hsl.h = hue < 0 ? 360 + hue : hue; + return tinycolor(hsl); + } + + // Combination Functions + // --------------------- + // Thanks to jQuery xColor for some of the ideas behind these + // + + function complement(color) { + var hsl = tinycolor(color).toHsl(); + hsl.h = (hsl.h + 180) % 360; + return tinycolor(hsl); + } + + function triad(color) { + var hsl = tinycolor(color).toHsl(); + var h = hsl.h; + return [ + tinycolor(color), + tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), + tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) + ]; + } + + function tetrad(color) { + var hsl = tinycolor(color).toHsl(); + var h = hsl.h; + return [ + tinycolor(color), + tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), + tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), + tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) + ]; + } + + function splitcomplement(color) { + var hsl = tinycolor(color).toHsl(); + var h = hsl.h; + return [ + tinycolor(color), + tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), + tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) + ]; + } + + function analogous(color, results, slices) { + results = results || 6; + slices = slices || 30; + + var hsl = tinycolor(color).toHsl(); + var part = 360 / slices; + var ret = [tinycolor(color)]; + + for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { + hsl.h = (hsl.h + part) % 360; + ret.push(tinycolor(hsl)); + } + return ret; + } + + function monochromatic(color, results) { + results = results || 6; + var hsv = tinycolor(color).toHsv(); + var h = hsv.h, s = hsv.s, v = hsv.v; + var ret = []; + var modification = 1 / results; + + while (results--) { + ret.push(tinycolor({ h: h, s: s, v: v})); + v = (v + modification) % 1; + } + + return ret; + } + + // Utility Functions + // --------------------- + + tinycolor.mix = function(color1, color2, amount) { + amount = (amount === 0) ? 0 : (amount || 50); + + var rgb1 = tinycolor(color1).toRgb(); + var rgb2 = tinycolor(color2).toRgb(); + + var p = amount / 100; + var w = p * 2 - 1; + var a = rgb2.a - rgb1.a; + + var w1; + + if (w * a == -1) { + w1 = w; + } else { + w1 = (w + a) / (1 + w * a); + } + + w1 = (w1 + 1) / 2; + + var w2 = 1 - w1; + + var rgba = { + r: rgb2.r * w1 + rgb1.r * w2, + g: rgb2.g * w1 + rgb1.g * w2, + b: rgb2.b * w1 + rgb1.b * w2, + a: rgb2.a * p + rgb1.a * (1 - p) + }; + + return tinycolor(rgba); + }; + + + // Readability Functions + // --------------------- + // + + // `readability` + // Analyze the 2 colors and returns an object with the following properties: + // `brightness`: difference in brightness between the two colors + // `color`: difference in color/hue between the two colors + tinycolor.readability = function(color1, color2) { + var c1 = tinycolor(color1); + var c2 = tinycolor(color2); + var rgb1 = c1.toRgb(); + var rgb2 = c2.toRgb(); + var brightnessA = c1.getBrightness(); + var brightnessB = c2.getBrightness(); + var colorDiff = ( + Math.max(rgb1.r, rgb2.r) - Math.min(rgb1.r, rgb2.r) + + Math.max(rgb1.g, rgb2.g) - Math.min(rgb1.g, rgb2.g) + + Math.max(rgb1.b, rgb2.b) - Math.min(rgb1.b, rgb2.b) + ); + + return { + brightness: Math.abs(brightnessA - brightnessB), + color: colorDiff + }; + }; + + // `readable` + // http://www.w3.org/TR/AERT#color-contrast + // Ensure that foreground and background color combinations provide sufficient contrast. + // *Example* + // tinycolor.isReadable("#000", "#111") => false + tinycolor.isReadable = function(color1, color2) { + var readability = tinycolor.readability(color1, color2); + return readability.brightness > 125 && readability.color > 500; + }; + + // `mostReadable` + // Given a base color and a list of possible foreground or background + // colors for that base, returns the most readable color. + // *Example* + // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000" + tinycolor.mostReadable = function(baseColor, colorList) { + var bestColor = null; + var bestScore = 0; + var bestIsReadable = false; + for (var i=0; i < colorList.length; i++) { + + // We normalize both around the "acceptable" breaking point, + // but rank brightness constrast higher than hue. + + var readability = tinycolor.readability(baseColor, colorList[i]); + var readable = readability.brightness > 125 && readability.color > 500; + var score = 3 * (readability.brightness / 125) + (readability.color / 500); + + if ((readable && ! bestIsReadable) || + (readable && bestIsReadable && score > bestScore) || + ((! readable) && (! bestIsReadable) && score > bestScore)) { + bestIsReadable = readable; + bestScore = score; + bestColor = tinycolor(colorList[i]); + } + } + return bestColor; + }; + + + // Big List of Colors + // ------------------ + // + var names = tinycolor.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" + }; + + // Make it easy to access colors via `hexNames[hex]` + var hexNames = tinycolor.hexNames = flip(names); + + + // Utilities + // --------- + + // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` + function flip(o) { + var flipped = { }; + for (var i in o) { + if (o.hasOwnProperty(i)) { + flipped[o[i]] = i; + } + } + return flipped; + } + + // Return a valid alpha value [0,1] with all invalid values being set to 1 + function boundAlpha(a) { + a = parseFloat(a); + + if (isNaN(a) || a < 0 || a > 1) { + a = 1; + } + + return a; + } + + // Take input from [0, n] and return it as [0, 1] + function bound01(n, max) { + if (isOnePointZero(n)) { n = "100%"; } + + var processPercent = isPercentage(n); + n = mathMin(max, mathMax(0, parseFloat(n))); + + // Automatically convert percentage into number + if (processPercent) { + n = parseInt(n * max, 10) / 100; + } + + // Handle floating point rounding errors + if ((math.abs(n - max) < 0.000001)) { + return 1; + } + + // Convert into [0, 1] range if it isn't already + return (n % max) / parseFloat(max); + } + + // Force a number between 0 and 1 + function clamp01(val) { + return mathMin(1, mathMax(0, val)); + } + + // Parse a base-16 hex value into a base-10 integer + function parseIntFromHex(val) { + return parseInt(val, 16); + } + + // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 + // + function isOnePointZero(n) { + return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; + } + + // Check to see if string passed in is a percentage + function isPercentage(n) { + return typeof n === "string" && n.indexOf('%') != -1; + } + + // Force a hex value to have 2 characters + function pad2(c) { + return c.length == 1 ? '0' + c : '' + c; + } + + // Replace a decimal with it's percentage value + function convertToPercentage(n) { + if (n <= 1) { + n = (n * 100) + "%"; + } + + return n; + } + + // Converts a decimal to a hex value + function convertDecimalToHex(d) { + return Math.round(parseFloat(d) * 255).toString(16); + } + // Converts a hex value to a decimal + function convertHexToDecimal(h) { + return (parseIntFromHex(h) / 255); + } + + var matchers = (function() { + + // + var CSS_INTEGER = "[-\\+]?\\d+%?"; + + // + var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; + + // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. + var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; + + // Actual matching. + // Parentheses and commas are optional, but not required. + // Whitespace can take the place of commas or opening paren + var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + + return { + rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), + rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), + hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), + hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), + hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), + hsva: new RegExp("hsva" + PERMISSIVE_MATCH4), + 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})$/ + }; + })(); + + // `stringInputToObject` + // Permissive string parsing. Take in a number of formats, and output an object + // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` + function stringInputToObject(color) { + + color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); + var named = false; + if (names[color]) { + color = names[color]; + named = true; + } + else if (color == 'transparent') { + return { r: 0, g: 0, b: 0, a: 0, format: "name" }; + } + + // Try to match string input using regular expressions. + // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] + // Just return an object and let the conversion functions handle that. + // This way the result will be the same whether the tinycolor is initialized with string or object. + var match; + if ((match = matchers.rgb.exec(color))) { + return { r: match[1], g: match[2], b: match[3] }; + } + if ((match = matchers.rgba.exec(color))) { + return { r: match[1], g: match[2], b: match[3], a: match[4] }; + } + if ((match = matchers.hsl.exec(color))) { + return { h: match[1], s: match[2], l: match[3] }; + } + if ((match = matchers.hsla.exec(color))) { + return { h: match[1], s: match[2], l: match[3], a: match[4] }; + } + if ((match = matchers.hsv.exec(color))) { + return { h: match[1], s: match[2], v: match[3] }; + } + if ((match = matchers.hsva.exec(color))) { + return { h: match[1], s: match[2], v: match[3], a: match[4] }; + } + if ((match = matchers.hex8.exec(color))) { + return { + a: convertHexToDecimal(match[1]), + r: parseIntFromHex(match[2]), + g: parseIntFromHex(match[3]), + b: parseIntFromHex(match[4]), + format: named ? "name" : "hex8" + }; + } + if ((match = matchers.hex6.exec(color))) { + return { + r: parseIntFromHex(match[1]), + g: parseIntFromHex(match[2]), + b: parseIntFromHex(match[3]), + format: named ? "name" : "hex" + }; + } + if ((match = matchers.hex3.exec(color))) { + return { + r: parseIntFromHex(match[1] + '' + match[1]), + g: parseIntFromHex(match[2] + '' + match[2]), + b: parseIntFromHex(match[3] + '' + match[3]), + format: named ? "name" : "hex" + }; + } + + return false; + } + + window.tinycolor = tinycolor; + })(); + + $(function () { + if ($.fn.spectrum.load) { + $.fn.spectrum.processNativeColorInputs(); + } + }); + +}); diff --git a/src/utils/extender.js b/src/utils/extender.js index 3b4bf03b96..f7701a8751 100644 --- a/src/utils/extender.js +++ b/src/utils/extender.js @@ -246,11 +246,17 @@ module.exports = ({$, Backbone}) => { } fn.scrollLeft = function() { - return this.get(0).scrollLeft; + let el = this.get(0); + el = el.nodeType == 9 ? el.defaultView : el; + let win = el instanceof Window ? el : null; + return win ? win.pageXOffset : el.scrollLeft || 0; } fn.scrollTop = function() { - return this.get(0).scrollTop; + let el = this.get(0); + el = el.nodeType == 9 ? el.defaultView : el; + let win = el instanceof Window ? el : null; + return win ? win.pageYOffset : el.scrollTop || 0; } fn.offset = function(coords) { diff --git a/test/helper.js b/test/helper.js index 20ebfd9093..88420f2e55 100644 --- a/test/helper.js +++ b/test/helper.js @@ -1,7 +1,6 @@ import _ from 'underscore'; import expect from 'expect'; import sinon from 'sinon'; -import grapesjs from './../src'; import { JSDOM } from 'jsdom'; const dom = new JSDOM(''); @@ -34,7 +33,7 @@ global.document = window.document; global._ = _; global.expect = expect; global.sinon = sinon; -global.grapesjs = grapesjs; +global.grapesjs = require('./../src'); global.Backbone = require('Backbone'); global.localStorage = localStorage; global.SVGElement = global.Element; diff --git a/test/specs/selector_manager/index.js b/test/specs/selector_manager/index.js index e44c91fd50..04120e7de9 100644 --- a/test/specs/selector_manager/index.js +++ b/test/specs/selector_manager/index.js @@ -79,7 +79,7 @@ describe('SelectorManager', () => { Models.run(); - describe.only('Views', () => { + describe('Views', () => { ClassTagView.run(); ClassTagsView.run(); }); From 7a272a8f1d699c5fee1554f65e25a32734d52014 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 28 Sep 2017 23:47:58 +0200 Subject: [PATCH 057/143] Setup remote storage manager tests --- package.json | 3 +- src/storage_manager/model/RemoteStorage.js | 8 ++-- test/helper.js | 1 + test/specs/storage_manager/model/Models.js | 48 +++++++++------------- 4 files changed, 28 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 8ef1991ed0..a07d099f6f 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,8 @@ "sinon": "^3.2.1", "string-replace-loader": "^1.3.0", "webpack": "^3.5.5", - "webpack-dev-server": "^2.7.1" + "webpack-dev-server": "^2.7.1", + "whatwg-fetch": "^2.0.3" }, "keywords": [ "wte", diff --git a/src/storage_manager/model/RemoteStorage.js b/src/storage_manager/model/RemoteStorage.js index 645fd938ff..6feb3cf05c 100644 --- a/src/storage_manager/model/RemoteStorage.js +++ b/src/storage_manager/model/RemoteStorage.js @@ -3,6 +3,8 @@ import { isUndefined } from 'underscore'; module.exports = require('backbone').Model.extend({ + fetch, + defaults: { urlStore: '', urlLoad: '', @@ -86,14 +88,14 @@ module.exports = require('backbone').Model.extend({ */ request(url, opts = {}, clb = null) { const typeJson = this.get('contentTypeJson'); - const headers = this.get('headers'); + const headers = this.get('headers') || {}; const params = this.get('params'); const reqHead = 'X-Requested-With'; const typeHead = 'Content-Type'; const body = opts.body; for (let param in params) { - body.append(param, params[param]); + body && body.append(param, params[param]); } if (isUndefined(headers[reqHead])) { @@ -106,7 +108,7 @@ module.exports = require('backbone').Model.extend({ } this.onStart(); - fetch(url, { + this.fetch(url, { method: opts.method || 'post', credentials: 'include', headers, diff --git a/test/helper.js b/test/helper.js index 88420f2e55..c3923f51e6 100644 --- a/test/helper.js +++ b/test/helper.js @@ -30,6 +30,7 @@ var localStorage = { global.window = window; global.document = window.document; +global.FormData = window.FormData; global._ = _; global.expect = expect; global.sinon = sinon; diff --git a/test/specs/storage_manager/model/Models.js b/test/specs/storage_manager/model/Models.js index c30c4a5d2c..25094c6785 100644 --- a/test/specs/storage_manager/model/Models.js +++ b/test/specs/storage_manager/model/Models.js @@ -1,3 +1,5 @@ +import 'whatwg-fetch'; + const LocalStorage = require('storage_manager/model/LocalStorage'); const RemoteStorage = require('storage_manager/model/RemoteStorage'); @@ -57,6 +59,12 @@ module.exports = { var params = { test: 'testValue' }; var storageOptions; var data; + var mockResponse = (body = {}) => { + return new window.Response(JSON.stringify(body), { + status: 200, + headers: { 'Content-type': 'application/json' } + }); + } beforeEach(() => { data = { @@ -69,44 +77,28 @@ module.exports = { params, }; obj = new RemoteStorage(storageOptions); + sinon.stub(obj, 'fetch').returns( + Promise.resolve(mockResponse({data: 1})) + ); }); afterEach(() => { - $.ajax.restore(); + obj.fetch.restore(); obj = null; }); - // Stubbing will not return the original object so - // .always will not work - it.skip('Store data', () => { - sinon.stub($, "ajax"); - - for(var k in params) - data[k] = params[k]; - + it('Store data', () => { obj.store(data); - $.ajax.calledWithMatch({ - url: endpointStore, - data, - }).should.equal(true); + const callResult = obj.fetch; + expect(callResult.called).toEqual(true); + expect(callResult.firstCall.args[0]).toEqual(endpointStore); }); it('Load data', () => { - sinon.stub($, "ajax").returns({ - done() {} - }); - var dt = {}; - var keys = ['item1', 'item2']; - obj.load(keys); - dt.keys = keys; - - for(var k in params) - dt[k] = params[k]; - - expect($.ajax.calledWithMatch({ - url: endpointLoad, - data: dt - })).toEqual(true); + obj.load(['item1', 'item2']); + const callResult = obj.fetch; + expect(callResult.called).toEqual(true); + expect(callResult.firstCall.args[0]).toEqual(endpointLoad); }); }); From eed494206733137b540385eb8154a9118ec99823 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 00:05:34 +0200 Subject: [PATCH 058/143] Fix sectors tests --- src/utils/extender.js | 6 ++-- test/specs/style_manager/index.js | 23 +++++++------ test/specs/style_manager/view/SectorView.js | 34 +++++++------------- test/specs/style_manager/view/SectorsView.js | 17 +++------- 4 files changed, 32 insertions(+), 48 deletions(-) diff --git a/src/utils/extender.js b/src/utils/extender.js index f7701a8751..f058e364da 100644 --- a/src/utils/extender.js +++ b/src/utils/extender.js @@ -223,15 +223,15 @@ module.exports = ({$, Backbone}) => { } fn.click = function(h) { - return this.on('click', h); + return h ? this.on('click', h) : this.trigger('click'); } fn.change = function(h) { - return this.on('change', h); + return h ? this.on('change', h) : this.trigger('change'); } fn.keydown = function(h) { - return this.on('keydown', h); + return h ? this.on('keydown', h) : this.trigger('keydown'); } fn.delegate = function(selector, events, data, handler) { diff --git a/test/specs/style_manager/index.js b/test/specs/style_manager/index.js index b41e067819..4499799267 100644 --- a/test/specs/style_manager/index.js +++ b/test/specs/style_manager/index.js @@ -176,16 +176,19 @@ describe('StyleManager', () => { }); Models.run(); - SectorView.run(); - SectorsView.run(); - PropertyView.run(); - PropertySelectView.run(); - PropertyRadioView.run(); - PropertyIntegerView.run(); - PropertyColorView.run(); - PropertyCompositeView.run(); - PropertyStackView.run(); - LayerView.run(); + + describe.only('Views', () => { + SectorView.run(); + SectorsView.run(); + PropertyView.run(); + PropertySelectView.run(); + PropertyRadioView.run(); + PropertyIntegerView.run(); + PropertyColorView.run(); + PropertyCompositeView.run(); + PropertyStackView.run(); + LayerView.run(); + }); }); }); diff --git a/test/specs/style_manager/view/SectorView.js b/test/specs/style_manager/view/SectorView.js index 406b47348c..77a55e815a 100644 --- a/test/specs/style_manager/view/SectorView.js +++ b/test/specs/style_manager/view/SectorView.js @@ -6,33 +6,24 @@ module.exports = { describe('SectorView', () => { - var $fixtures; - var $fixture; + var fixtures; var model; var view; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { model = new Sector(); view = new SectorView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); afterEach(() => { view.remove(); }); - after(() => { - $fixture.remove(); - }); - it('Rendered correctly', () => { var sector = view.el; expect(sector.querySelector('.title')).toExist(); @@ -43,7 +34,7 @@ module.exports = { it('No properties', () => { var props = view.el.querySelector('.properties'); - expect(props.innerHTML).toEqual('
'); + expect(props.innerHTML).toEqual(''); }); it('Update on open', () => { @@ -75,15 +66,14 @@ module.exports = { view = new SectorView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); - }); - - afterEach(() => { - view.remove(); + //$fixture.empty().appendTo($fixtures); + //$fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); - it('Rendered correctly2', () => { + it('Rendered correctly', () => { var sector = view.el; var props = sector.querySelector('.properties'); expect(sector.querySelector('.title').innerHTML).toContain('TestName'); @@ -94,7 +84,7 @@ module.exports = { it('Has properties', () => { var props = view.el.querySelector('.properties'); - expect(props.children.length).toEqual(4); // Last one is 'clear' element + expect(props.children.length).toEqual(3); }); }); diff --git a/test/specs/style_manager/view/SectorsView.js b/test/specs/style_manager/view/SectorsView.js index f1e61a2c15..b60712299f 100644 --- a/test/specs/style_manager/view/SectorsView.js +++ b/test/specs/style_manager/view/SectorsView.js @@ -6,33 +6,24 @@ module.exports = { describe('SectorsView', () => { - var $fixtures; - var $fixture; + var fixtures; var model; var view; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { model = new Sectors([]); view = new SectorsView({ collection: model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); + document.body.innerHTML = '
'; + fixtures = document.body.querySelector('#fixtures'); + fixtures.appendChild(view.render().el); }); afterEach(() => { view.collection.reset(); }); - after(() => { - $fixture.remove(); - }); - it("Collection is empty", () => { expect(view.el.innerHTML).toEqual(''); }); From 8b5ddf5084fa41838e441ceec695e35b5586b9ce Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 01:05:48 +0200 Subject: [PATCH 059/143] Fix property view tests --- test/specs/style_manager/view/PropertyView.js | 24 +++++++------------ test/specs/style_manager/view/SectorsView.js | 2 +- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/test/specs/style_manager/view/PropertyView.js b/test/specs/style_manager/view/PropertyView.js index b628159fce..33b4f2054e 100644 --- a/test/specs/style_manager/view/PropertyView.js +++ b/test/specs/style_manager/view/PropertyView.js @@ -8,8 +8,7 @@ module.exports = { describe('PropertyView', () => { var component; - var $fixtures; - var $fixture; + var fixtures; var target; var model; var view; @@ -19,11 +18,6 @@ module.exports = { var propValue = 'testvalue'; var defValue = 'testDefault'; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { propTarget = Object.assign({}, Backbone.Events); target = new Component(); @@ -35,9 +29,10 @@ module.exports = { propTarget }; view = new PropertyView(options); - $fixture.empty().appendTo($fixtures); + document.body.innerHTML = '
'; + fixtures = document.body.firstChild; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); afterEach(() => { @@ -45,13 +40,12 @@ module.exports = { }); after(() => { - $fixture.remove(); component = null; }); it('Rendered correctly', () => { var prop = view.el; - expect($fixture.get(0).querySelector('.property')).toExist(); + expect(fixtures.querySelector('.property')).toExist(); expect(prop.querySelector('.label')).toExist(); expect(prop.querySelector('.field')).toExist(); }); @@ -154,9 +148,9 @@ module.exports = { model, propTarget: target }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('updateTargetStyle', () => { @@ -207,9 +201,9 @@ module.exports = { view = new PropertyView({ model }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('Value as default', () => { diff --git a/test/specs/style_manager/view/SectorsView.js b/test/specs/style_manager/view/SectorsView.js index b60712299f..21bc7b760f 100644 --- a/test/specs/style_manager/view/SectorsView.js +++ b/test/specs/style_manager/view/SectorsView.js @@ -16,7 +16,7 @@ module.exports = { collection: model }); document.body.innerHTML = '
'; - fixtures = document.body.querySelector('#fixtures'); + fixtures = document.body.firstChild; fixtures.appendChild(view.render().el); }); From d84fe58b02921201a88a8767b743b86b52f03cf9 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 01:07:38 +0200 Subject: [PATCH 060/143] Fix select property view tests --- .../style_manager/view/PropertySelectView.js | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/test/specs/style_manager/view/PropertySelectView.js b/test/specs/style_manager/view/PropertySelectView.js index 24266324c4..770ab37fcc 100644 --- a/test/specs/style_manager/view/PropertySelectView.js +++ b/test/specs/style_manager/view/PropertySelectView.js @@ -8,8 +8,7 @@ module.exports = { describe('PropertySelectView', () => { var component; - var $fixtures; - var $fixture; + var fixtures; var target; var model; var view; @@ -23,11 +22,6 @@ module.exports = { {name: 'test2', value: 'test2value'} ]; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { propTarget = Object.assign({}, Backbone.Events); target = new Component(); @@ -42,9 +36,10 @@ module.exports = { model, propTarget }); - $fixture.empty().appendTo($fixtures); + document.body.innerHTML = '
'; + fixtures = document.body.firstChild; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); afterEach(() => { @@ -52,13 +47,12 @@ module.exports = { }); after(() => { - $fixture.remove(); component = null; }); it('Rendered correctly', () => { var prop = view.el; - expect($fixture.get(0).querySelector('.property')).toExist(); + expect(fixtures.querySelector('.property')).toExist(); expect(prop.querySelector('.label')).toExist(); expect(prop.querySelector('.field')).toExist(); }); @@ -120,9 +114,9 @@ module.exports = { model, propTarget: target }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('Update value and input on target swap', () => { @@ -161,9 +155,9 @@ module.exports = { view = new PropertySelectView({ model }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('Value as default', () => { @@ -188,7 +182,8 @@ module.exports = { model }); view.render(); - $fixture.html(view.el); + fixtures.innerHTML = ''; + fixtures.appendChild(view.el); expect(view.getInputValue()).toEqual(''); }); From 4544a7e972346d553c2e63dc016269afacd11cd5 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 01:14:20 +0200 Subject: [PATCH 061/143] Fix radio property view --- .../style_manager/view/PropertyRadioView.js | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/test/specs/style_manager/view/PropertyRadioView.js b/test/specs/style_manager/view/PropertyRadioView.js index 37e1a60b95..0f6cd292cf 100644 --- a/test/specs/style_manager/view/PropertyRadioView.js +++ b/test/specs/style_manager/view/PropertyRadioView.js @@ -8,8 +8,7 @@ module.exports = { describe('PropertyRadioView', () => { var component; - var $fixtures; - var $fixture; + var fixtures; var target; var model; var view; @@ -22,11 +21,6 @@ module.exports = { { name: 'test2', value: 'test2value'} ]; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { target = new Component(); component = new Component(); @@ -41,9 +35,10 @@ module.exports = { model, propTarget }); - $fixture.empty().appendTo($fixtures); + document.body.innerHTML = '
'; + fixtures = document.body.firstChild; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); afterEach(() => { @@ -51,13 +46,12 @@ module.exports = { }); after(() => { - $fixture.remove(); component = null; }); it('Rendered correctly', () => { var prop = view.el; - expect($fixture.get(0).querySelector('.property')).toExist(); + expect(fixtures.querySelector('.property')).toExist(); expect(prop.querySelector('.label')).toExist(); expect(prop.querySelector('.field')).toExist(); }); @@ -68,12 +62,12 @@ module.exports = { }); it('Options rendered', () => { - var input = view.el.querySelector('#input-holder'); + var input = view.el.querySelector('#input-holder').firstChild; expect(input.children.length).toEqual(options.length); }); it('Options rendered correctly', () => { - var children = view.el.querySelector('#input-holder').children; + var children = view.el.querySelector('#input-holder').firstChild.children; expect(children[0].querySelector('label').textContent).toEqual('test1value'); expect(children[1].querySelector('label').textContent).toEqual('test2'); expect(children[0].querySelector('input').value).toEqual(options[0].value); @@ -83,7 +77,7 @@ module.exports = { }); it('Input should exist', () => { - expect(view.$input).toExist(); + expect(view.input).toExist(); }); it('Input value is empty', () => { @@ -117,9 +111,9 @@ module.exports = { model, propTarget: target }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('Update value and input on target swap', () => { @@ -158,9 +152,9 @@ module.exports = { view = new PropertyRadioView({ model }); - $fixture.empty().appendTo($fixtures); - view.render() - $fixture.html(view.el); + fixtures.innerHTML = ''; + view.render(); + fixtures.appendChild(view.el); }); it('Value as default', () => { From 5d4976b8b25fae08a1bce79ea5a93723672f2426 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 01:25:46 +0200 Subject: [PATCH 062/143] Update integer property view tests --- src/style_manager/view/PropertyIntegerView.js | 4 ++- .../style_manager/view/PropertyIntegerView.js | 30 ++++++++----------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/style_manager/view/PropertyIntegerView.js b/src/style_manager/view/PropertyIntegerView.js index 438069f548..ed33c442e5 100644 --- a/src/style_manager/view/PropertyIntegerView.js +++ b/src/style_manager/view/PropertyIntegerView.js @@ -1,4 +1,5 @@ const InputNumber = require('domain_abstract/ui/InputNumber'); +const $ = Backbone.$; module.exports = require('./PropertyView').extend({ @@ -28,7 +29,8 @@ module.exports = require('./PropertyView').extend({ const fields = this.el.querySelector(`.${ppfx}fields`); fields.appendChild(input.el); this.$input = input.inputEl; - this.$unit = input.unitEl; + this.unit = input.unitEl; + this.$unit = $(this.unit); this.input = this.$input.get(0); this.inputInst = input; } diff --git a/test/specs/style_manager/view/PropertyIntegerView.js b/test/specs/style_manager/view/PropertyIntegerView.js index fd061f9e8d..2474867f5f 100644 --- a/test/specs/style_manager/view/PropertyIntegerView.js +++ b/test/specs/style_manager/view/PropertyIntegerView.js @@ -8,8 +8,7 @@ module.exports = { describe('PropertyIntegerView', () => { var component; - var $fixtures; - var $fixture; + var fixtures; var target; var model; var view; @@ -24,11 +23,6 @@ module.exports = { var maxValue = 75; var unitsElSel = '.field-units select'; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { target = new Component(); component = new Component(); @@ -43,9 +37,10 @@ module.exports = { model, propTarget }); - $fixture.empty().appendTo($fixtures); + document.body.innerHTML = '
'; + fixtures = document.body.firstChild; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); afterEach(() => { @@ -53,7 +48,6 @@ module.exports = { }); after(() => { - $fixture.remove(); component = null; view = null; model = null; @@ -61,7 +55,7 @@ module.exports = { it('Rendered correctly', () => { var prop = view.el; - expect($fixture.get(0).querySelector('.property')).toExist(); + expect(fixtures.querySelector('.property')).toExist(); expect(prop.querySelector('.label')).toExist(); expect(prop.querySelector('.field')).toExist(); }); @@ -85,8 +79,8 @@ module.exports = { }); it('Inputs should exist', () => { - expect(view.$input).toExist(); - expect(view.$unit).toExist(); + expect(view.input).toExist(); + expect(view.unit).toExist(); }); it('Input value is empty', () => { @@ -98,7 +92,7 @@ module.exports = { expect(view.model.get('value')).toEqual(parseFloat(intValue)); expect(view.model.get('unit')).toEqual(unitValue); expect(view.getInputValue()).toEqual(intValue); - expect(view.$unit.val()).toEqual(unitValue); + expect(view.unit.value).toEqual(unitValue); }); it('Update model on input change', () => { @@ -133,9 +127,9 @@ module.exports = { model, propTarget: target }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('Update value and input on target swap', () => { @@ -179,9 +173,9 @@ module.exports = { view = new PropertyIntegerView({ model }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('Value as default', () => { From 721a739196da926e4364d151d902928275efcaab Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 01:42:25 +0200 Subject: [PATCH 063/143] Fix color property view tests --- src/domain_abstract/ui/InputColor.js | 8 +++++++ .../style_manager/view/PropertyColorView.js | 24 ++++++++----------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/domain_abstract/ui/InputColor.js b/src/domain_abstract/ui/InputColor.js index e673ecb12a..76f3243641 100644 --- a/src/domain_abstract/ui/InputColor.js +++ b/src/domain_abstract/ui/InputColor.js @@ -109,9 +109,17 @@ module.exports = Input.extend({ } } }); + this.colorEl = colorEl; } return this.colorEl; }, + render() { + Input.prototype.render.call(this); + // This will make the color input available on render + this.getColorEl(); + return this; + } + }); diff --git a/test/specs/style_manager/view/PropertyColorView.js b/test/specs/style_manager/view/PropertyColorView.js index ea791196ff..f1a1b8e65b 100644 --- a/test/specs/style_manager/view/PropertyColorView.js +++ b/test/specs/style_manager/view/PropertyColorView.js @@ -8,8 +8,7 @@ module.exports = { describe('PropertyColorView', () => { var component; - var $fixtures; - var $fixture; + var fixtures; var target; var model; var view; @@ -19,9 +18,7 @@ module.exports = { var defValue = 'test2value'; before(() => { - $.fn.spectrum = () => {}; - $fixtures = $("#fixtures"); - $fixture = $('
'); + $.fn.spectrum = function() {return this}; }); beforeEach(() => { @@ -37,9 +34,10 @@ module.exports = { model, propTarget }); - $fixture.empty().appendTo($fixtures); + document.body.innerHTML = '
'; + fixtures = document.body.firstChild; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); afterEach(() => { @@ -47,7 +45,6 @@ module.exports = { }); after(() => { - $fixture.remove(); component = null; view = null; model = null; @@ -55,7 +52,7 @@ module.exports = { it('Rendered correctly', () => { var prop = view.el; - expect($fixture.get(0).querySelector('.property')).toExist(); + expect(fixtures.querySelector('.property')).toExist(); expect(prop.querySelector('.label')).toExist(); expect(prop.querySelector('.field')).toExist(); }); @@ -63,7 +60,6 @@ module.exports = { it('Inputs rendered', () => { var prop = view.el; expect(prop.querySelector('input[type=text]')).toExist(); - expect(prop.querySelector('.field-color-picker')).toExist(); }); it('Inputs should exist', () => { @@ -109,9 +105,9 @@ module.exports = { model, propTarget: target }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('Update value and input on target swap', () => { @@ -149,9 +145,9 @@ module.exports = { view = new PropertyColorView({ model }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('Value as default', () => { From 8e7732b904e28e8ef7f3d10e33d7a9e214e749a2 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 01:45:34 +0200 Subject: [PATCH 064/143] Fix composite property view tests --- .../view/PropertyCompositeView.js | 33 +++++++------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/test/specs/style_manager/view/PropertyCompositeView.js b/test/specs/style_manager/view/PropertyCompositeView.js index 57b7724460..b6c3ac51da 100644 --- a/test/specs/style_manager/view/PropertyCompositeView.js +++ b/test/specs/style_manager/view/PropertyCompositeView.js @@ -9,8 +9,7 @@ module.exports = { describe('PropertyCompositeView', () => { var component; - var $fixtures; - var $fixture; + var fixtures; var target; var model; var view; @@ -35,11 +34,6 @@ module.exports = { ] }]; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { target = new Component(); component = new Component(); @@ -52,17 +46,13 @@ module.exports = { view = new PropertyCompositeView({ model }); - $fixture.empty().appendTo($fixtures); + document.body.innerHTML = '
'; + fixtures = document.body.firstChild; view.render(); - $fixture.html(view.el); - }); - - afterEach(() => { - //view.remove(); // strange errors ??? + fixtures.appendChild(view.el); }); after(() => { - $fixture.remove(); component = null; view = null; model = null; @@ -70,7 +60,7 @@ module.exports = { it('Rendered correctly', () => { var prop = view.el; - expect($fixture.get(0).querySelector('.property')).toExist(); + expect(fixtures.querySelector('.property')).toExist(); expect(prop.querySelector('.label')).toExist(); expect(prop.querySelector('.field')).toExist(); }); @@ -82,7 +72,7 @@ module.exports = { it('Properties rendered correctly', () => { var children = view.el.querySelector('.properties').children; - expect(children.length).toEqual(properties.length + 1); + expect(children.length).toEqual(properties.length); expect(children[0].id).toEqual(properties[0].property); expect(children[1].id).toEqual(properties[1].property); expect(children[2].id).toEqual(properties[2].property); @@ -122,9 +112,9 @@ module.exports = { model, propTarget: target }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); prop2Val = properties[1].defaults; prop2Unit = properties[1].units[0]; prop3Val = properties[2].list[2].value; @@ -165,8 +155,9 @@ module.exports = { model, propTarget: target }); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); $prop1 = view.$props.find('#' + properties[0].property + ' input'); $prop1.val(propValue).trigger('change'); var compStyle = view.getTarget().get('style'); @@ -226,9 +217,9 @@ module.exports = { view = new PropertyCompositeView({ model }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); it('Value as default', () => { From 79b8bcf1fed897d110b3efa89a9526fb1d48dcd4 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 01:47:53 +0200 Subject: [PATCH 065/143] Fix stack property view tests --- .../style_manager/view/PropertyStackView.js | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/test/specs/style_manager/view/PropertyStackView.js b/test/specs/style_manager/view/PropertyStackView.js index e9c812d394..2b20878f74 100644 --- a/test/specs/style_manager/view/PropertyStackView.js +++ b/test/specs/style_manager/view/PropertyStackView.js @@ -8,8 +8,7 @@ module.exports = { describe('PropertyStackView', () => { var component; - var $fixtures; - var $fixture; + var fixtures; var target; var model; var view; @@ -41,11 +40,6 @@ module.exports = { }, ]; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { target = new Component(); component = new Component(); @@ -58,9 +52,10 @@ module.exports = { view = new PropertyStackView({ model }); - $fixture.empty().appendTo($fixtures); + document.body.innerHTML = '
'; + fixtures = document.body.firstChild; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); }); afterEach(() => { @@ -68,7 +63,6 @@ module.exports = { }); after(() => { - $fixture.remove(); component = null; view = null; model = null; @@ -76,7 +70,7 @@ module.exports = { it('Rendered correctly', () => { var prop = view.el; - expect($fixture.get(0).querySelector('.property')).toExist(); + expect(fixtures.querySelector('.property')).toExist(); expect(prop.querySelector('.label')).toExist(); expect(prop.querySelector('.field')).toExist(); expect(prop.querySelector('#add')).toExist(); @@ -92,7 +86,7 @@ module.exports = { it('Layers rendered correctly', () => { var children = view.$props.get(0).children; - expect(children.length).toEqual(properties.length + 1); + expect(children.length).toEqual(properties.length); expect(children[0].id).toEqual(properties[0].property); expect(children[1].id).toEqual(properties[1].property); expect(children[2].id).toEqual(properties[2].property); @@ -119,9 +113,9 @@ module.exports = { model, propTarget: target }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); model.get('layers').add(layers); }); @@ -165,9 +159,9 @@ module.exports = { model, propTarget: target }); - $fixture.empty().appendTo($fixtures); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); prop3Val = properties[2].list[2].value; prop2Val = properties[1].defaults; prop2Unit = properties[1].units[0]; @@ -281,8 +275,9 @@ module.exports = { model, propTarget: target }); + fixtures.innerHTML = ''; view.render(); - $fixture.html(view.el); + fixtures.appendChild(view.el); prop3Val = properties[2].list[2].value; prop2Val = properties[1].defaults; prop2Unit = properties[1].units[0]; From 5fc95a0cd550202785d8feecd83af4fdce619b8b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 01:51:59 +0200 Subject: [PATCH 066/143] Fix layers view tests --- test/specs/style_manager/index.js | 2 +- test/specs/style_manager/view/LayerView.js | 20 +++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/test/specs/style_manager/index.js b/test/specs/style_manager/index.js index 4499799267..92c88d0359 100644 --- a/test/specs/style_manager/index.js +++ b/test/specs/style_manager/index.js @@ -177,7 +177,7 @@ describe('StyleManager', () => { Models.run(); - describe.only('Views', () => { + describe('Views', () => { SectorView.run(); SectorsView.run(); PropertyView.run(); diff --git a/test/specs/style_manager/view/LayerView.js b/test/specs/style_manager/view/LayerView.js index 8f4f2f9384..1ccb7cbcb8 100644 --- a/test/specs/style_manager/view/LayerView.js +++ b/test/specs/style_manager/view/LayerView.js @@ -7,33 +7,23 @@ module.exports = { describe('LayerView', () => { var component; - var $fixtures; - var $fixture; + var fixtures; var target; var model; var view; - before(() => { - $fixtures = $("#fixtures"); - $fixture = $('
'); - }); - beforeEach(() => { var coll = new Layers(); model = coll.add({}); view = new LayerView({ model }); - $fixture.empty().appendTo($fixtures); - $fixture.html(view.render().el); - }); - - afterEach(() => { - view.remove(); + document.body.innerHTML = '
'; + fixtures = document.body.firstChild; + fixtures.appendChild(view.render().el); }); after(() => { - $fixture.remove(); component = null; view = null; model = null; @@ -41,7 +31,7 @@ module.exports = { it('Rendered correctly', () => { var layer = view.el; - expect($fixture.get(0).querySelector('.layer')).toExist(); + expect(fixtures.querySelector('.layer')).toExist(); expect(layer.querySelector('#label')).toExist(); expect(layer.querySelector('#close-layer')).toExist(); expect(layer.querySelector('#inputs')).toExist(); From d0356fd6ae24b7e817b25206c32228e3849033e2 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 02:08:19 +0200 Subject: [PATCH 067/143] Make tinycolor available globally immediately --- src/utils/ColorPicker.js | 4 ++-- test/specs/grapesjs/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/ColorPicker.js b/src/utils/ColorPicker.js index 307114d61a..2018513c73 100644 --- a/src/utils/ColorPicker.js +++ b/src/utils/ColorPicker.js @@ -1211,7 +1211,7 @@ // https://github.com/bgrins/TinyColor // Brian Grinstead, MIT License - (function() { + //(function() { var trimLeft = /^[\s,#]+/, trimRight = /\s+$/, @@ -2310,7 +2310,7 @@ } window.tinycolor = tinycolor; - })(); + //})(); $(function () { if ($.fn.spectrum.load) { diff --git a/test/specs/grapesjs/index.js b/test/specs/grapesjs/index.js index d3e5253b16..ab64735a28 100644 --- a/test/specs/grapesjs/index.js +++ b/test/specs/grapesjs/index.js @@ -2,7 +2,7 @@ const PluginManager = require('plugin_manager'); describe('GrapesJS', () => { - describe.skip('Main', () => { + describe.only('Main', () => { var obj; var fixtures; From 074268930ee0b738f95e367a359f0312589695c8 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 02:46:09 +0200 Subject: [PATCH 068/143] Update abstract inputs --- src/domain_abstract/ui/Input.js | 29 ++++++++++++++------------- src/domain_abstract/ui/InputNumber.js | 3 +-- test/specs/grapesjs/index.js | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/domain_abstract/ui/Input.js b/src/domain_abstract/ui/Input.js index 2e6843539d..ced1b83210 100644 --- a/src/domain_abstract/ui/Input.js +++ b/src/domain_abstract/ui/Input.js @@ -21,12 +21,20 @@ module.exports = Backbone.View.extend({ this.listenTo(this.model, 'change:value', this.handleModelChange); }, + /** + * Fired when the element of the property is updated + */ + elementUpdated() { + this.model.trigger('el:change'); + }, + /** * Handled when the view is changed */ handleChange(e) { e.stopPropagation(); - this.setValue(this.getInputEl().value); + this.model.set('value', this.getInputEl().value); + this.elementUpdated(); }, /** @@ -34,25 +42,18 @@ module.exports = Backbone.View.extend({ * @param {string} value * @param {Object} opts */ - setValue(value, opts) { - var opt = opts || {}; - var model = this.model; - model.set({ - value: value || model.get('defaults') - }, opt); - - // Generally I get silent when I need to reflect data to view without - // reupdating the target - if(opt.silent) { - this.handleModelChange(model, value, opt); - } + setValue(value, opts = {}) { + const model = this.model; + let val = value || model.get('defaults'); + const input = this.getInputEl(); + input && (input.value = val); }, /** * Updates the view when the model is changed * */ handleModelChange(model, value, opts) { - this.getInputEl().value = this.model.get('value'); + this.setValue(value, opts); }, /** diff --git a/src/domain_abstract/ui/InputNumber.js b/src/domain_abstract/ui/InputNumber.js index 5abaff8f62..bd44480ec9 100644 --- a/src/domain_abstract/ui/InputNumber.js +++ b/src/domain_abstract/ui/InputNumber.js @@ -5,8 +5,6 @@ const $ = Backbone.$; module.exports = Backbone.View.extend({ - events: {}, - template: _.template(` @@ -25,6 +23,7 @@ module.exports = Backbone.View.extend({ this.inputCls = ppfx + 'field-number'; this.unitCls = ppfx + 'input-unit'; this.contClass = contClass; + this.events = {}; this.events[`click .${ppfx}field-arrow-u`] = 'upArrowClick'; this.events[`click .${ppfx}field-arrow-d`] = 'downArrowClick'; this.events[`mousedown .${ppfx}field-arrows`] = 'downIncrement'; diff --git a/test/specs/grapesjs/index.js b/test/specs/grapesjs/index.js index ab64735a28..9ce3a82b71 100644 --- a/test/specs/grapesjs/index.js +++ b/test/specs/grapesjs/index.js @@ -2,7 +2,7 @@ const PluginManager = require('plugin_manager'); describe('GrapesJS', () => { - describe.only('Main', () => { + describe('Main', () => { var obj; var fixtures; From 4278f5d8e108b63c6d21a257fd5872c17da2ec71 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 03:58:42 +0200 Subject: [PATCH 069/143] Fix selector view removing --- src/selector_manager/view/ClassTagView.js | 23 ++--- .../selector_manager/e2e/ClassManager.js | 98 +++++++++---------- test/specs/selector_manager/index.js | 3 - .../selector_manager/view/ClassTagView.js | 5 +- 4 files changed, 56 insertions(+), 73 deletions(-) diff --git a/src/selector_manager/view/ClassTagView.js b/src/selector_manager/view/ClassTagView.js index a7928a6f0c..47bddbd232 100644 --- a/src/selector_manager/view/ClassTagView.js +++ b/src/selector_manager/view/ClassTagView.js @@ -9,8 +9,6 @@ module.exports = Backbone.View.extend({ `), - events: {}, - initialize(o) { this.config = o.config || {}; this.coll = o.coll || null; @@ -22,6 +20,7 @@ module.exports = Backbone.View.extend({ this.closeId = this.pfx + 'close'; this.chkId = this.pfx + 'checkbox'; this.labelId = this.pfx + 'tag-label'; + this.events = {}; this.events['click #' + this.closeId ] = 'removeTag'; this.events['click #' + this.chkId ] = 'changeStatus'; this.events['dblclick #' + this.labelId ] = 'startEditTag'; @@ -77,17 +76,15 @@ module.exports = Backbone.View.extend({ * @private */ removeTag(e) { - var comp = this.target.get('selectedComponent'); - - if(comp) - comp.get('classes').remove(this.model); - - if(this.coll){ - this.coll.remove(this.model); - this.target.trigger('targetClassRemoved'); - } - - this.remove(); + const em = this.target; + const model = this.model; + const coll = this.coll; + const el = this.el; + const sel = em && em.get('selectedComponent'); + sel && sel.get & sel.get('classes').remove(model); + coll && coll.remove(model); + setTimeout(() => this.remove(), 0); + em && em.trigger('targetClassRemoved'); }, /** diff --git a/test/specs/selector_manager/e2e/ClassManager.js b/test/specs/selector_manager/e2e/ClassManager.js index cb5dfb4b32..8a88325b3a 100644 --- a/test/specs/selector_manager/e2e/ClassManager.js +++ b/test/specs/selector_manager/e2e/ClassManager.js @@ -5,28 +5,35 @@ module.exports = { run() { describe('E2E tests', () => { - var instClassTagViewer = ctx => { - var $clm; - var clm = ctx.gjs.editor.get('SelectorManager'); - if(clm){ - $clm = new ClassTagsView({ + var fixtures; + var components; + var tagEl; + var gjs; + + var instClassTagViewer = (gjs, fixtures) => { + var tagEl; + var clm = gjs.editor.get('SelectorManager'); + + if (clm) { + tagEl = new ClassTagsView({ collection: new Selectors([]), - config: { - em: ctx.gjs.editor - }, + config: {em: gjs.editor} }).render(); - ctx.$fixture.append($clm.el); + fixtures.appendChild(tagEl.el); } - return $clm; - }; + return tagEl; + }; + /* before(function () { this.$fixtures = $("#fixtures"); this.$fixture = $('
'); }); - +*/ beforeEach(function () { - this.gjs = grapesjs.init({ + document.body.innerHTML = '
'; + fixtures = document.body.firstChild; + gjs = grapesjs.init({ stylePrefix: '', storageManager: { autoload: 0, type:'none' }, assetManager: { @@ -34,82 +41,67 @@ module.exports = { }, container: '#SelectorManager-fixture', }); - this.$fixture.empty().appendTo(this.$fixtures); - this.gjs.render(); - }); - - afterEach(function () { - delete this.gjs; - }); - - after(function () { - this.$fixture.remove(); }); describe('Interaction with Components', () => { beforeEach(function () { - this.wrapper = this.gjs.editor.get('DomComponents').getWrapper().get('components'); - this.$clm = instClassTagViewer(this); - }); - - afterEach(function () { - delete this.wrapper; - delete this.$clm; + components = gjs.editor.get('DomComponents').getWrapper().get('components'); + tagEl = instClassTagViewer(gjs, fixtures); }); it('Assign correctly new class to component', function() { - var model = this.wrapper.add({}); + var model = components.add({}); expect(model.get('classes').length).toEqual(0); - this.gjs.editor.set('selectedComponent', model); - this.$clm.addNewTag('test'); + gjs.editor.set('selectedComponent', model); + tagEl.addNewTag('test'); expect(model.get('classes').length).toEqual(1); expect(model.get('classes').at(0).get('name')).toEqual('test'); }); it('Classes from components are correctly imported inside main container', function() { - var model = this.wrapper.add([ + var model = components.add([ { classes: ['test11', 'test12', 'test13'] }, { classes: ['test11', 'test22', 'test22'] }, ]); - expect(this.gjs.editor.get('SelectorManager').getAll().length).toEqual(4); + expect(gjs.editor.get('SelectorManager').getAll().length).toEqual(4); }); it('Class imported into component is the same model from main container', function() { - var model = this.wrapper.add({ classes: ['test1'] }); + var model = components.add({ classes: ['test1'] }); var clModel = model.get('classes').at(0); - var clModel2 = this.gjs.editor.get('SelectorManager').getAll().at(0); + var clModel2 = gjs.editor.get('SelectorManager').getAll().at(0); expect(clModel).toEqual(clModel2); }); it('Can assign only one time the same class on selected component and the class viewer', function() { - var model = this.wrapper.add({}); - this.gjs.editor.set('selectedComponent', model); - this.$clm.addNewTag('test'); - this.$clm.addNewTag('test'); + var model = components.add({}); + gjs.editor.set('selectedComponent', model); + tagEl.addNewTag('test'); + tagEl.addNewTag('test'); expect(model.get('classes').length).toEqual(1); expect(model.get('classes').at(0).get('name')).toEqual('test'); - expect(this.$clm.collection.length).toEqual(1); - expect(this.$clm.collection.at(0).get('name')).toEqual('test'); + expect(tagEl.collection.length).toEqual(1); + expect(tagEl.collection.at(0).get('name')).toEqual('test'); }); it('Removing from container removes also from selected component', function() { - var model = this.wrapper.add({}); - this.gjs.editor.set('selectedComponent', model); - this.$clm.addNewTag('test'); - this.$clm.getClasses().find('.tag #close').trigger('click') + var model = components.add({}); + gjs.editor.set('selectedComponent', model); + tagEl.addNewTag('test'); + tagEl.getClasses().find('.tag #close').trigger('click') expect(model.get('classes').length).toEqual(0); }); it("Trigger correctly event on target with new class add", function() { var spy = sinon.spy(); - var model = this.wrapper.add({}); - this.gjs.editor.set('selectedComponent', model); - this.$clm.addNewTag('test'); - this.gjs.editor.on("targetClassAdded", spy); - this.$clm.addNewTag('test'); + var model = components.add({}); + gjs.editor.set('selectedComponent', model); + tagEl.addNewTag('test'); + gjs.editor.on("targetClassAdded", spy); + tagEl.addNewTag('test'); expect(spy.called).toEqual(false); - this.$clm.addNewTag('test2'); + tagEl.addNewTag('test2'); expect(spy.called).toEqual(true); }); diff --git a/test/specs/selector_manager/index.js b/test/specs/selector_manager/index.js index 04120e7de9..f3897620aa 100644 --- a/test/specs/selector_manager/index.js +++ b/test/specs/selector_manager/index.js @@ -82,9 +82,6 @@ describe('SelectorManager', () => { describe('Views', () => { ClassTagView.run(); ClassTagsView.run(); - }); - - describe.skip('E2E', () => { e2e.run(); }); diff --git a/test/specs/selector_manager/view/ClassTagView.js b/test/specs/selector_manager/view/ClassTagView.js index 1286321cb6..c840770fe8 100644 --- a/test/specs/selector_manager/view/ClassTagView.js +++ b/test/specs/selector_manager/view/ClassTagView.js @@ -65,11 +65,8 @@ module.exports = { }); it('Could be removed', () => { - var spy = sinon.spy(); - obj.config.target = { get() {} }; - sinon.stub(obj.config.target, 'get').returns(0); obj.$el.find('#close').trigger('click'); - expect(fixtures.innerHTML).toNotExist(); + setTimeout(() => expect(fixtures.innerHTML).toNotExist(), 0) }); it('On remove triggers event', () => { From 3bd8c66b36f5ff3804be32136229cec7a5c4dd81 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 29 Sep 2017 13:50:19 +0200 Subject: [PATCH 070/143] Prepare to work on Layers --- dist/grapes.min.js | 6 +++--- package.json | 2 +- src/style_manager/view/LayerView.js | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 6b302a188f..0986ac40bd 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,5 +1,5 @@ -/*! grapesjs - 0.10.7 */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?exports.grapesjs=e(require("jquery")):t.grapesjs=e(t.jQuery)}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=55)}([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(12),e],void 0!==(o=function(t,e,n){a.Backbone=s(a,n,t,e)}.apply(e,r))&&(t.exports=o)}(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){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],l(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],l(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=s(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(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),N.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(!N.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(_,"")),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 N;var z=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=N.extend=z;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})}).call(e,n(11))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var I=!{toString:null}.propertyIsEnumerable("toString"),D=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return I&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return I&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},F=C.invert(z),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(z),C.unescape=R(F),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(43),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(143),l=n(19),c=n(45),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=this.$input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",o=n+"color-warn",s=this.$el.find("> ."+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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=e.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,n=t&&t.get("selectedComponent");if(!n)return!0;var i=n.get("stylable");return i instanceof Array&&(i=e.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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()}})}).call(e,n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?D(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?D(t.line,e):n<0?D(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=_(c.from,a.from),f=_(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?_(c.to,n)>=0:_(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?_(c.from,i)<=0:_(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:$(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return $(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new D(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new D(i,s,c)}}return new D(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 D(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new D(n.line,l(t,1),"before"):new D(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function It(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function Dt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function _t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function zt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ft(t){Dt(t),_t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Ns){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Ns=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Ns?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Is)return Is;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Is=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=$(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=D(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=$(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new D(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),In(t))}function Nn(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Dn(t))},100)}function In(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),$n(t))}function Dn(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function _n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),zn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?D(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?D(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&_n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&_n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=Fn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){_n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){_n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(I(t.options,u)))),l=f.node.nextSibling}else{var g=Ie(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function $i(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ni(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function Di(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function _i(t){var e=Di(t);return e.x*=xa,e.y*=xa,e}function zi(t,e){var n=Di(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?D(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if(_(t,e.from)<0)return t;if(_(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),D(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==_(e.from,e.to)&&0==_(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=_(e,r)<0;o!=_(n,r)<0?(r=e,e=n):o!=_(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=_(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,D(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,D(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=_(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Nr(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(Fr(t.history,e),i.push(t.history)),Nr(t,e,null,Q(t,e))})}}function $r(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Nr(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(Fr(t.history,r),a.push(t.history)),Nr(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(D(t.anchor.line+e,t.anchor.ch),D(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:D(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Ir(t.cm,e,i):Gi(t,e,i),xr(t,n,zs)}}function Ir(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(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=Nt(t,"changes"),h=Nt(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function Dr(t,e,n,i,r){if(i||(i=n),_(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function _r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)Dr(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=$(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=$(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return D(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=_a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=_s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&(_((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&(_(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):$o(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(Dt(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),Nn(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(D(e.line,0),B(t.doc,D(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function $o(t,e,n,i){function r(e){if(0!=_(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(D(m,x),D(m,x))):b.length>x&&r.push(new Ca(D(m,x),D(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,Fi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;_(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,Fi(T,d),Fs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=_(a,v)){t.curOp.focus=s(),r(a);var u=Fn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,Dt(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;Dt(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,Fi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,Fi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,Fs):(d=0,br(c,new wa([u],0),Fs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&Dt(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Nt(t,n))return zt(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),zt(e)}}}function No(t,e){return Oo(t,e,"gutterClick",!0)}function Io(t,e){Re(t.display,e)||Do(t,e)||$t(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function Do(t,e){return!!Nt(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function _o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function zo(t){Ni(t),mi(t),Rn(t)}function Fo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Ii(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ni(this),_o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(In,this),20):Dn(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!$t(t,e)){var n=Tn(t,e);if(n&&!No(t,e)&&!Re(t.display,e)){Dt(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return $t(t,e)||Dt(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Io(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!$t(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(D(a.line,0),B(t.doc,D(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),Dt(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return zi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return zi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){$t(t,e)||Ft(e)},over:function(e){$t(t,e)||(Jr(t,e),Ft(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){$t(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return In(t,e)}),Gs(a,"blur",function(e){return Dn(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==_s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=D(f.line,f.ch-n):t.state.overwrite&&!s?p=D(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=D(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new D(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return z(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(D(i,0),D(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var $s=function(t){t.select()};xs?$s=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&($s=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Ns,Is,Ds=30,_s={toString:function(){return"CodeMirror.Pass"}},zs={scroll:!1},Fs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return $(this)},It(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=Fn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){Nt(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&_(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){$r(this,"undo")}),redo:gi(function(){$r(this,"redo")}),undoSelection:gi(function(){$r(this,"undo",!0)}),redoSelection:gi(function(){$r(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=B(this,t),e=B(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}),B(this,D(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new D(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),D(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new D(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),D(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==_(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!$t(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,zs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;$s(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){$t(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=D(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=$(e.view[0].line),a=e.view[0].node):(s=$(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=$(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,D(s,0),D(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=D(s,f),k=D(l,d.length?g(d).length-p:0);return h.length>1||h[0]||_(C,k)?(Dr(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!$t(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,zs):(i.prevInput="",s.value=e.text.join("\n"),$s(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){$t(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||$t(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||Dt(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&$s(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),zs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){Ft(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(D(i,o))}i++});for(var r=n.length-1;r>=0;r--)Dr(t.doc,e,n[r],D(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){_o(t),zo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Ii(t.options),zo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Ii(t.options),zo(t)},!0),e("firstLineNumber",1,zo,!0),e("lineNumberFormatter",function(t){return t},zo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(Dn(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,Fo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),zs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,D(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if(_a.hasOwnProperty(t))return _a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},It(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return It(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=_i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=_s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=D,t.cmpPos=_,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=_a,t.keyMap=Da,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=Dt,t.e_stopPropagation=_t,t.e_stop=Ft,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=$a}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,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),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,n=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))n.set(i,r);else{var o=e.clone(n.get("attributes"));o[i]=r,n.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),i={placeholder:t.get("placeholder")||t.get("default"),type:t.get("type")||"text"};if(t.get("changeProp"))i.value=e.get(n);else{var r=e.get("attributes");i.value=t.get("value")||r[n]}t.get("min")&&(i.min=t.get("min")),t.get("max")&&(i.max=t.get("max")),this.$input=$("",i)}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return t},renderField:function(){if(!this.$input){this.$el.append(this.tmpl);var t=this.getInputEl();this.$el.find("."+this.inputhClass).prepend(t)}},render:function(){return this.renderLabel(),this.renderField(),this.el.className=this.className,this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";var i=n(15);t.exports=n(4).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$unit=n.unitEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},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(e,n){e.exports=t},function(t,e,n){"use strict";var i=n(27),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(8);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(114),view:n(30),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(28),view:n(14),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(36),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(34),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(37),view:n(33),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(37),view:n(32),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(120),view:n(121),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(38),view:n(9),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(4),isType:function(t){return t.type="base",t}}]})},function(t,e,n){"use strict";var i=n(4);t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){for(var t=arguments.length,e=Array(t),n=0;n",{value:0,type:"hidden"}),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=n(31),r=new i(this.getPropsConfig());this.$props=r.render().$el,this.$el.find("#"+this.pfx+"input-holder").html(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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({events:{},template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.docEl=$(document),this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){return this.inputEl||(this.inputEl=$("",{type:"text",class:this.inputCls,placeholder:this.model.get("defaults")})),this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='",this.unitEl=$(i)}}return this.unitEl&&this.unitEl.get(0)},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.value),this.elementUpdated()},downIncrement:function(t){t.preventDefault(),this.moved=0;var e=this.model.get("value");e=this.normalizeValue(e);var n={y:t.pageY,val:e};this.docEl.mouseup(n,this.upIncrement),this.docEl.mousemove(n,this.moveIncrement)},moveIncrement:function(t){this.moved=1;var e=this.model,n=e.get("step"),i=this.normalizeValue(t.data.val+(t.data.y-t.pageY)*n);return this.prValue=this.validateInputValue(i).value,e.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(t){var e=this.model,n=e.get("step");if(this.docEl.off("mouseup",this.upIncrement),this.docEl.off("mousemove",this.moveIncrement),this.prValue&&this.moved){var i=this.prValue-n;e.set("value",i,{avoidStore:1}).set("value",i+n),this.elementUpdated()}},normalizeValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===h?"undefined":i(h))&&(d=Object.assign(d,h)),r.runCommand("resize",{el:t,options:d}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),s=i.style;if(!n)return void(s.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(s.opacity="",s.display="",!this.toolbar){i.innerHTML="",this.toolbar=new o(a);var l=new r({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else s.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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.contWindow||(this.contWindow=$(this.frameEl.contentWindow)),this.contWindow},run:function(t){this.editor=t&&t.get("Editor"),this.enable()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(50));t.exports=e.extend({},i,{init:function(t){e.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return $[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,$={};return $.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},$.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?$.top(t,e,n):(g="error","block")},$.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},$.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},$.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},$.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},$.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},$.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):$.atBlock(t,e,n)},$.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},$.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},$.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):$.atBlock(t,e,n)},$.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},$.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},$.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},$.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},$.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=$[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(22);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(100);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(102);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({tagName:"a",initialize:function(t,e){this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"btn "+this.model.get("class")},render:function(){return this.$el.addClass(this.className),this}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(111),o=n(112),s=n(13),a=n(123),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=Backbone.Model,r=Backbone.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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;n\n \n \n
\n '},init:function(){var t=this.model,e=this.pfx;t.set("stackIndex",null),this.events["click #"+e+"add"]="addLayer",this.listenTo(t,"change:stackIndex",this.indexChanged),this.listenTo(t,"updateValue",this.inputValueChanged),this.delegateEvents()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n",{class:"clear"})),this.$el.attr("class",this.pfx+"properties"),this}})},function(t,e,n){"use strict";t.exports=n(4).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\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
"}),this.$inputEl=$(s),this.input=this.$inputEl.get(0),this.$el.find("#"+t+"input-holder").html(this.$inputEl),this.$input=this.$inputEl.find('input[name="'+r+'"]')}},getInputValue:function(){return this.$input?this.$el.find("input:checked").val():""},setValue:function(t){var e=this.model,n=e.get("value")||e.getDefaultValue();t&&(n=t),this.$input&&this.$input.filter('[value="'+n+'"]').prop("checked",!0)}})},function(t,e,n){"use strict";t.exports=n(4).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.$input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"}),this.$input=$(""),this.input=this.$input.get(0),this.$el.find("#"+t+"input-holder").html(this.$input)}}})},function(t,e,n){"use strict";var i=(n(0),n(35));t.exports=n(9).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=new i({target:this.target,model:this.model,ppfx:this.ppfx}),e=t.render();this.$el.append(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";(function(e){var i=(n(0),n(116));n(117);t.exports=i.extend({template:e.template('\n
input-holder\'>
\n
\n
\n
\n
\n
'),initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=$("
",{class:this.colorCls}),i=n.get(0).style,r=this.target&&this.target.config?this.target.config.el:"";if(void 0===n.spectrum)throw"Spectrum missing, probably you load jQuery twice";var o=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},s=0,a=void 0;n.spectrum({appendTo:r||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=o(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){s=1;var r=o(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){s=0,a=o(t)},hide:function(r){!s&&a&&(t.noneColor&&(a=""),i.backgroundColor=a,n.spectrum("set",a),e.set("value",a,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){for(var t=arguments.length,e=Array(t),n=0;n\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n '},init:function(){this.assets=this.target.get("assets"),this.modal=this.target.get("Modal"),this.am=this.target.get("AssetManager"),this.events["click #"+this.pfx+"close"]="removeFile",this.events["click #"+this.pfx+"images"]="openAssetManager",this.delegateEvents()},onRender:function(){this.$input||(this.$input=$("",{placeholder:this.model.getDefaultValue(),type:"text"})),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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e){t.exports=Backbone.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(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(131),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=Backbone.View.extend({template:e.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="text"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,o=this.config,s=o.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(43),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(44);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(7)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(144),o=n(145);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,void 0===this.model.get("open")&&this.model.set("open",!1),this.listenTo(this.model.get("components"),"remove add change reset",this.checkChildren),this.listenTo(this.model,"destroy remove",this.remove),this.listenTo(this.model,"change:status",this.updateStatus),this.listenTo(this.model,"change:open",this.updateOpening),this.className=this.pfx+"item no-select",this.editBtnCls=this.pfx+"nav-item-edit",this.inputNameCls=this.ppfx+"nav-comp-name",this.caretCls=this.ppfx+"nav-item-caret",this.titleCls=this.pfx+"title",this.events={},this.events["click > #"+this.pfx+"btn-eye"]="toggleVisibility",this.events["click ."+this.caretCls]="toggleOpening",this.events["click ."+this.titleCls]="handleSelect",this.events["click ."+this.editBtnCls]="handleEdit",this.events["blur ."+this.inputNameCls]="handleEditEnd",this.$el.data("model",this.model),this.$el.data("collection",this.model.get("components")),t.config.sortable&&(this.events["mousedown > #"+this.pfx+"move"]="startSort"),this.delegateEvents()},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){this.$eye||(this.$eye=this.$el.find("> #"+this.pfx+"btn-eye"));var n=e.clone(this.model.get("style")),i=this.pfx+"hide";this.isVisible()?(this.$el.addClass(i),this.$eye.addClass("fa-eye-slash"),n.display="none"):(this.$el.removeClass(i),this.$eye.removeClass("fa-eye-slash"),delete n.display),this.model.set("style",n)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.countChildren(this.model),e=this.pfx,n="> ."+e+"title-c > ."+e+"title";this.$counter||(this.$counter=this.$el.find("> #"+e+"counter")),t?(this.$el.find(n).removeClass(e+"no-chld"),this.$counter.html(t)):(this.$el.find(n).addClass(e+"no-chld"),this.$counter.empty(),this.model.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){var t=this.pfx;this.caret=this.$el.find("> ."+t+"title-c > ."+t+"title > ."+t+"title-inn > #"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.level+1;return this.$el.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:a})),void 0===i&&(i=n(53)),this.$components=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:a}).render().$el,this.$el.find("."+r+"children").html(this.$components),t.get("draggable")&&this.config.sortable||this.$el.find("> #"+r+"move").detach(),o||(this.className+=" "+r+"hide"),this.$el.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(52);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r,a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l},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=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.isCountable(e,this.config.hideTextnode)&&this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){"use strict";var i=n(1);t.exports=function(){var t=n(57),e=n(58),r=n(215),o=new r,s=[];return{version:"0.10.7",editors:s,plugins:o,init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.container;if((0,i.isUndefined)($))throw"jQuery not found";if(!r)throw new Error("'container' is required");(0,i.defaults)(n,t),n.el=r instanceof window.HTMLElement?r:document.querySelector(r);var a=new e(n).init();return n.plugins.forEach(function(t){var e=o.get(t);e?e(a,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),a.getModel().loadOnStart(),n.autorender&&a.render(),s.push(a),a}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(59),r=n(60),o=n(214);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("rte"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i,r=[n(61),n(65),n(69),n(74),n(78),n(82),n(86),n(98),n(104),n(26),n(125),n(136),n(141),n(165),n(171),n(197),n(205)],o=n(0),s=n(212),a=n(49);o.$||(o.$=$),t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.temporary||(i&&clearInterval(i),i=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=$(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()}})},function(t,e,n){"use strict";t.exports=function(){var t=n(62),e=n(63),i=n(64);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},e.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var n=t||{};this.elT=0,this.elL=0,this.borderOffset=n.borderOffset||10;var i=n.container;this.el="string"==typeof i?document.querySelector(i):i,this.$el=$(this.el),this.containerSel=n.containerSel||"div",this.itemSel=n.itemSel||"div",this.draggable=n.draggable||!0,this.nested=n.nested||0,this.pfx=n.pfx||"",this.ppfx=n.ppfx||"",this.freezeClass=n.freezeClass||this.pfx+"freezed",this.onStart=n.onStart||"",this.onEndMove=n.onEndMove||"",this.direction=n.direction||"v",this.onMoveClb=n.onMove||"",this.relative=n.relative||0,this.ignoreViewChildren=n.ignoreViewChildren||0,this.ignoreModels=n.ignoreModels||0,this.plh=n.placer||"",this.wmargin=n.wmargin||0,this.offTop=n.offsetTop||0,this.offLeft=n.offsetLeft||0,this.document=n.document||document,this.$document=$(this.document),this.dropContent=null,this.em=n.em||"",this.dragHelper=null,this.canvasRelative=n.canvasRelative||0,this.selectOnEnd=!n.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=$(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",i=t.cloneNode(1),r="",o=getComputedStyle(t),s=0;ss||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]:{};return i(this,t),this.setOptions(e),this}return r(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=$([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){$([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}},function(t,e,n){"use strict";var i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=$(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";t.exports=function(){var t={},e=n(66),i=n(67),r=n(68),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(75),o=n(76),s=n(77);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(81);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.hide(),this.$input.show().focus()},endNewTag:function(t){this.$addBtn.show(),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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(7);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),events:{},initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this.target.get("selectedComponent");e&&e.get("classes").remove(this.model),this.coll&&(this.coll.remove(this.model),this.target.trigger("targetClassRemoved")),this.remove()},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input"));var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(83),o=n(84),s=n(85);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},getCollector:function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},getContent:function(){return this.$content||(this.$content=this.$el.find("."+this.pfx+"content #"+this.pfx+"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();this.getCollector().append(t.children()),t.html(this.model.get("content"))},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(87),i=n(88),r=n(89),o=n(90),s=n(91),a=n(92),l=n(97),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(5);n(93),n(20),n(96);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(5),n(94),n(95),n(20))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(5))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(5))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(Dt),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(Dt.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(Dt),r("operator","operator",t.current());if(Nt.test(n)){t.eatWhile(Nt);var o=t.current();if("."!=e.lastType){if(It.propertyIsEnumerable(o)){var c=It[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match(_t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=zt.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(Nt.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():$t?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),z):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?N:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return Ft.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(I(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?N:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(F,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,$)}function $(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function N(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function I(t){return function(e){return"."==e?p(t?_:D):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function D(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function _(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function z(t){return":"==t?p(b,w):f(P,x(";"),b)}function F(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||Dt.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,$t=n.json||Lt,Ot=n.typescript,Nt=n.wordCharacters||/[\w$\xa1-\uffff]/,It=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),Dt=/[+\-*&%=<>!?|~^@]/,_t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,zt="([{}])",Ft={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:$t?null:"/*",blockCommentEnd:$t?null:"*/",lineComment:$t?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:$t?"json":"javascript",jsonldMode:Lt,jsonMode:$t,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(5))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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").html(this.model.get("input")),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(99),o=n(21),s=n(101),a=(n(23),n(103));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(22);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(21);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e){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=n(0);t.exports=r.View.extend({tagName:"span",initialize:function(t){e.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var n=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(n?" "+n:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append($("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",$(document).on("mouseup",this.stopDrag)},stopDrag:function(){$(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),$(document).on("mouseup",this.stopTimer)},stopTimer:function(){$(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),$(document).on("mousedown",this.hideButtons),$(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&$(t.target).trigger("click"),this.model.set("bntsVis",!1),$(document).off("mousedown",this.hideButtons),$(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":i(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(24),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append($("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(23);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i,r,o={},s=n(105),a=(n(106),n(107)),l=n(109);return{customRte:null,name:"rte",init:function(n){r=this,o=n||{};for(var c in s)c in o||(o[c]=s[c]);var u=o.pStylePrefix;return u&&(o.stylePrefix=u+o.stylePrefix),t=o.stylePrefix,i=new a(o.commands),e=new l({collection:i,config:o}),this},add:function(t,e){var n=e||{};return n.command=t,i.add(n)},get:function(t){return i.where({command:t})[0]},getAll:function(){return i},udpatePosition:function(){var t=o.em.get("Canvas"),n=t.getTargetToElementDim(e.el,this.lastEl,{event:"rteToolbarPosUpdate"});o.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var i=e.el.style;i.top=n.top+"px",i.left=n.left+"px"},attach:function(t,n){this.lastEl=t.el;var i=t.getChildrenContainer(),r=this.customRte;return r?n=r.enable(i,n):$(i).wysiwyg({}).focus(),this.show(),o.em&&(setTimeout(this.udpatePosition.bind(this),0),o.em.off("change:canvasOffset",this.udpatePosition,this),o.em.on("change:canvasOffset",this.udpatePosition,this),o.em.off("canvasScroll",this.udpatePosition,this),o.em.on("canvasScroll",this.udpatePosition,this)),e.$el.on("mousedown",this.disableProp),n},detach:function(t,n){var i=this.customRte,r=t.getChildrenContainer();i?(t.model.set("content",r.innerHTML),i.disable(r,n)):$(r).wysiwyg("destroy"),this.hide(),e.$el.off("mousedown",this.disableProp)},focus:function(t,e){var n=this.customRte,i=t.getChildrenContainer();n?n.focus&&n.focus(i,e):this.attach(t)},show:function(){e.el.style.display="block"},hide:function(){e.el.style.display="none"},disableProp:function(t){t.stopPropagation()},getToolbarEl:function(){return e.el},render:function(){return e.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",toolbarId:"toolbar",adjustToolbar:1,commands:[{command:"bold",title:"Bold",class:"fa fa-bold"},{command:"italic",title:"Italic",class:"fa fa-italic"},{command:"underline",title:"Underline",class:"fa fa-underline"},{command:"strikethrough",title:"Strikethrough",class:"fa fa-strikethrough",group:"format"},{command:"insertHTML",title:"Link",class:"fa fa-link",args:'${content}'}]}},function(t,e,n){"use strict";var i=function(t){var e=$.Deferred(),n=new FileReader;return n.onload=function(t){e.resolve(t.target.result)},n.onerror=e.reject,n.onprogress=e.notify,n.readAsDataURL(t),e.promise()};$.fn.cleanHtml=function(){var t=$(this).html();return t&&t.replace(/(
|\s|

<\/div>| )*$/,"")},$.fn.wysiwyg=function(t){var e,n,r,o=this,s=function(){var t=n.activeToolbarClass;t&&$(n.toolbarSelector).find(r).each(function(){var e=$(this),i=e.data(n.commandRole);o.get(0).ownerDocument.queryCommandState(i)?e.addClass(t):e.removeClass(t)})},a=function(t,e){var n=t.split(" "),i=n.shift(),r=n.join(" ")+(e||"");o.get(0).ownerDocument.execCommand("styleWithCSS",!1,!0),o.get(0).ownerDocument.execCommand(i,0,r),s(),o.trigger("change")},l=function(){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount)return t.getRangeAt(0)},c=function(){e=l()},u=function(){var t=window.getSelection();if(e){try{t.removeAllRanges()}catch(t){document.body.createTextRange().select(),document.selection.empty()}t.addRange(e)}},h=function(t){o.focus(),$.each(t,function(t,e){/^image\//.test(e.type)?$.when(i(e)).done(function(t){a("insertimage",t)}).fail(function(t){n.fileUploadError("file-reader",t)}):n.fileUploadError("unsupported-file-type",e.type)})},d=function(t,e){u(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,e||"transparent"),c(),t.data(n.selectionMarker,e)};if("string"==typeof t&&"destroy"==t)return o.attr("contenteditable",!1).unbind("mouseup keyup mouseout dragenter dragover"),$(window).unbind("touchend"),this;n=$.extend({},$.fn.wysiwyg.defaults,t);var f="[data-"+n.commandRole+"]";return r="a"+f+",button"+f+",input[type=button]"+f+", select"+f,n.dragAndDropImages&&function(){o.on("dragenter dragover",!1).on("drop",function(t){var e=t.originalEvent.dataTransfer;t.stopPropagation(),t.preventDefault(),e&&e.files&&e.files.length>0&&h(e.files)})}(),function(t,e){t.find(r).unbind().click(function(){u();var t=o.get(0).ownerDocument,n=$(this),i=n.data(e.commandRole),r=n.data("args");r?(r=r.replace("${content}",t.getSelection()),a(i,r)):t.execCommand(i),c()}),t.find("[data-toggle=dropdown]").click(u);var n="[data-"+e.commandRole+"]";t.find("select"+n).on("webkitspeechchange change",function(){var t=this.value;u(),t&&(o.focus(),a($(this).data(e.commandRole),t)),c()}),t.find("input[type=text]"+n,", select"+n).on("webkitspeechchange change",function(){var t=this.value;this.value="",u(),t&&(o.focus(),a($(this).data(e.commandRole),t)),c()}).on("focus",function(){var t=$(this);t.data(e.selectionMarker)||(d(t,e.selectionColor),t.focus())}).on("blur",function(){var t=$(this);t.data(e.selectionMarker)&&d(t,!1)}),t.find("input[type=file][data-"+e.commandRole+"]").change(function(){u(),"file"===this.type&&this.files&&this.files.length>0&&h(this.files),c(),this.value=""})}($(n.toolbarSelector),n),o.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){c(),s()}),$(window).bind("touchend",function(t){var e=o.is(t.target)||o.has(t.target).length>0,n=l();n&&n.startContainer===n.endContainer&&n.startOffset===n.endOffset&&!e||(c(),s())}),this},$.fn.wysiwyg.defaults={toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(t,e){console.log("File upload error",t,e)}},t.exports=$},function(t,e,n){"use strict";var i=n(0),r=n(108);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({idAttribute:"command",defaults:{command:"",type:"",title:"",class:"",options:[]},initialize:function(){this.get("options").length&&this.set("type","select")}})},function(t,e,n){"use strict";var i=n(0),r=n(25),o=n(110);t.exports=i.View.extend({attributes:{"data-role":"editor-toolbar"},initialize:function(t){this.config=t.config||{};var e=this.config.stylePrefix||"";this.id=e+this.config.toolbarId,this.listenTo(this.collection,"add",this.addTo),this.$el.data("helper",1)},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=r;switch(t.get("type")){case"select":i=o}var s=t.get("args"),a={title:t.get("title"),"data-edit":t.get("command")};s&&(a["data-args"]=s);var l=new i({model:t,attributes:a},this.config),c=l.render().el;n?n.appendChild(c):this.$el.append(c)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this.$el.attr("id",this.id),this}})},function(t,e,n){"use strict";var i=(n(0),n(25));t.exports=i.extend({initialize:function(t,e){i.prototype.initialize.apply(this,arguments)},getInput:function(){var t=this.model;if(!this.input){var e=t.get("command"),n='",this.input=$(n)}return this.input},getInputCont:function(){var t=this.getInput(),e=this.ppfx;return $('
').append(t)},render:function(){for(var t=arguments.length,e=Array(t),n=0;n"),initialize:function(t){var e=t||{},n=e.ppfx||"";this.target=e.target||{},this.inputClass=n+"field",this.inputHolderClass=n+"input-holder",this.ppfx=n,this.listenTo(this.model,"change:value",this.handleModelChange)},handleChange:function(t){t.stopPropagation(),this.setValue(this.getInputEl().value)},setValue:function(t,e){var n=e||{},i=this.model;i.set({value:t||i.get("defaults")},n),n.silent&&this.handleModelChange(i,t,n)},handleModelChange:function(t,e,n){this.getInputEl().value=this.model.get("value")},getInputEl:function(){return this.inputEl||(this.inputEl=$("",{type:"text",class:this.inputCls,placeholder:this.model.get("defaults")})),this.inputEl.get(0)},render:function(){var t=this.$el;return t.addClass(this.inputClass),t.html(this.template({holderClass:this.inputHolderClass,ppfx:this.ppfx})),t.find("."+this.inputHolderClass).html(this.getInputEl()),this}})}).call(e,n(1))},function(t,e,n){var i,r,o;!function(s){"use strict";r=[n(12)],i=s,void 0!==(o="function"==typeof i?i.apply(e,r):i)&&(t.exports=o)}(function(t,e){"use strict";function n(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function i(){for(var t=0;t1&&(delete window.localStorage[G],t.each(e,function(t,e){b(e)}))}catch(t){}try{gt=window.localStorage[G].split(";")}catch(t){}}}function b(e){if(K){var n=tinycolor(e).toRgbString();if(!pt[n]&&-1===t.inArray(n,gt))for(gt.push(n);gt.length>mt;)gt.shift();if(G&&window.localStorage)try{window.localStorage[G]=gt.join(";")}catch(t){}}}function x(){var t=[];if(U.showPalette)for(var e=0;eMath.abs(e-r);yt=o?"x":"y"}}else yt=null;var s=!yt||"x"===yt,a=!yt||"y"===yt;s&&(ct=parseFloat(t/tt)),a&&(ut=parseFloat((et-e)/et)),Gt=!1,U.showAlpha||(ht=1),D()},k,S),Wt?(O(Wt),_(),qt=U.preferredFormat||tinycolor(Wt).format,b(Wt)):_(),q&&E();var i=g?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Ot.delegate(".sp-thumb-el",i,e),Nt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Xt={show:E,hide:L,toggle:M,reflow:R,option:V,enable:B,disable:j,offset:W,set:function(t){O(t),F()},get:N,destroy:H,container:Ct};return Xt.id=p.push(Xt)-1,Xt}function s(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth+t(s).scrollLeft(),c=a.clientHeight+t(s).scrollTop(),u=n.offset();return u.top+=o,u.left-=Math.min(u.left,u.left+i>l&&l>i?Math.abs(u.left+i-l):0),u.top-=Math.min(u.top,u.top+r>c&&c>r?Math.abs(r+o-0):0),u}function a(){}function l(t){t.stopPropagation()}function c(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function u(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(g&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),m=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,m,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(m),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(m),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,m={};m.selectstart=o,m.dragstart=o,m["touchmove mousemove"]=s,m["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function h(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function d(){return t.fn.spectrum.inputTypeColorSupport()}var f={beforeShow:a,move:a,change:a,show:a,hide:a,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},p=[],g=!!/msie/i.exec(window.navigator.userAgent),m=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),v=["
","
","
","
"].join(""),y=function(){var t="";if(g)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=p[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=o(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=u,t.fn.spectrum.defaults=f,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&&!d()&&e.spectrum({preferredFormat:"hex6"})},function(){function t(t){var n={r:0,g:0,b:0},r=1,s=!1,a=!1;return"string"==typeof t&&(t=$(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=e(t.r,t.g,t.b),s=!0,a="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=P(t.s),t.v=P(t.v),n=o(t.h,t.s,t.v),s=!0,a="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=P(t.s),t.l=P(t.l),n=i(t.h,t.s,t.l),s=!0,a="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=w(r),{ok:s,format:t.format||a,r:z(255,F(n.r,0)),g:z(255,F(n.g,0)),b:z(255,F(n.b,0)),a:r}}function e(t,e,n){return{r:255*C(t,255),g:255*C(e,255),b:255*C(n,255)}}function n(t,e,n){t=C(t,255),e=C(e,255),n=C(n,255);var i,r,o=F(t,e,n),s=z(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=C(t,360),e=C(e,100),n=C(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function r(t,e,n){t=C(t,255),e=C(e,255),n=C(n,255);var i,r,o=F(t,e,n),s=z(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(H(i));return o}function x(t,e){e=e||6;for(var n=H(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(H({h:i,s:r,v:o})),o=(o+a)%1;return s}function w(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(t,e){T(t)&&(t="100%");var n=M(t);return t=z(e,F(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),D.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function k(t){return z(1,F(0,t))}function S(t){return parseInt(t,16)}function T(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function M(t){return"string"==typeof t&&-1!=t.indexOf("%")}function E(t){return 1==t.length?"0"+t:""+t}function P(t){return t<=1&&(t=100*t+"%"),t}function A(t){return Math.round(255*parseFloat(t)).toString(16)}function L(t){return S(t)/255}function $(t){t=t.replace(O,"").replace(N,"").toLowerCase();var e=!1;if(V[t])t=V[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=j.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=j.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=j.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=j.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=j.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=j.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=j.hex8.exec(t))?{a:L(n[1]),r:S(n[2]),g:S(n[3]),b:S(n[4]),format:e?"name":"hex8"}:(n=j.hex6.exec(t))?{r:S(n[1]),g:S(n[2]),b:S(n[3]),format:e?"name":"hex"}:!!(n=j.hex3.exec(t))&&{r:S(n[1]+""+n[1]),g:S(n[2]+""+n[2]),b:S(n[3]+""+n[3]),format:e?"name":"hex"}}var O=/^[\s,#]+/,N=/\s+$/,I=0,D=Math,_=D.round,z=D.min,F=D.max,R=D.random,H=function(e,n){if(e=e||"",n=n||{},e instanceof H)return e;if(!(this instanceof H))return new H(e,n);var i=t(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=_(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=_(this._r)),this._g<1&&(this._g=_(this._g)),this._b<1&&(this._b=_(this._b)),this._ok=i.ok,this._tc_id=I++};H.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=_(100*this._a)/100,this},toHsv:function(){var t=r(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=r(this._r,this._g,this._b),e=_(360*t.h),n=_(100*t.s),i=_(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=_(360*t.h),i=_(100*t.s),r=_(100*t.l);return 1==this._a?"hsl("+e+", "+i+"%, "+r+"%)":"hsla("+e+", "+i+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return s(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:_(this._r),g:_(this._g),b:_(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+_(this._r)+", "+_(this._g)+", "+_(this._b)+")":"rgba("+_(this._r)+", "+_(this._g)+", "+_(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:_(100*C(this._r,255))+"%",g:_(100*C(this._g,255))+"%",b:_(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+_(100*C(this._r,255))+"%, "+_(100*C(this._g,255))+"%, "+_(100*C(this._b,255))+"%)":"rgba("+_(100*C(this._r,255))+"%, "+_(100*C(this._g,255))+"%, "+_(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B[s(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, ":"";if(t){n=H(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(h,arguments)},brighten:function(){return this._applyModification(d,arguments)},darken:function(){return this._applyModification(f,arguments)},desaturate:function(){return this._applyModification(l,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(p,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(b,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(y,arguments)},triad:function(){return this._applyCombination(m,arguments)},tetrad:function(){return this._applyCombination(v,arguments)}},H.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]="a"===i?t[i]:P(t[i]));t=n}return H(t,e)},H.equals=function(t,e){return!(!t||!e)&&H(t).toRgbString()==H(e).toRgbString()},H.random=function(){return H.fromRatio({r:R(),g:R(),b:R()})},H.mix=function(t,e,n){n=0===n?0:n||50;var i,r=H(t).toRgb(),o=H(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 H(u)},H.readability=function(t,e){var n=H(t),i=H(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}},H.isReadable=function(t,e){var n=H.readability(t,e);return n.brightness>125&&n.color>500},H.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=H(e[o]))}return n};var V=H.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=H.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(V),j=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=H}(),t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})})},function(t,e,n){"use strict";var i=n(0),r=n(119);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||"";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=r;void 0!==this.preview&&t.set("preview",this.preview);var s=new o({model:t,stackModel:this.stackModel,config:this.config,sorter:this.sorter}),a=s.render().el;if(i)i.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},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";(function(e){var i=n(0);t.exports=i.View.extend({events:{click:"updateIndex"},template:e.template('\n
\n \n
\n
<%= label %>
\n
\n \t
\n
\n
\n
\n
'),initialize:function(t){var e=this.model;this.stackModel=t.stackModel||{},this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"layer",this.sorter=t.sorter||null,this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.valueChanged),this.listenTo(e,"change:props",this.showProps),this.events["click #"+this.pfx+"close-layer"]="remove",this.events["mousedown > #"+this.pfx+"move"]="initSorter",e.get("preview")||this.$el.addClass(this.pfx+"no-preview"),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e),this.delegateEvents()},initSorter:function(t){this.sorter&&this.sorter.startSort(this.el)},getProps:function(){return this.stackModel.get?this.stackModel.get("properties"):null},valueChanged:function(){var t=this.model.get("preview");if(t){this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview"));var e=this.getProps(),n=this.$preview;"function"==typeof t?t(e,n):this.onPreview(e,n)}},onPreview:function(t,e){var n=this.model.get("value").split(" "),i="";if(t.each(function(t,e){var r=n[e]||"";if(r&&"integer"==t.get("type")){var o=parseInt(r,10),s=r.replace(o,"");o=isNaN(o)?0:o,o>3&&(o=3),o<-3&&(o=-3),r=o+s}i+=r+" "}),this.stackModel.get){var r=this.stackModel.get("property");r&&(this.$preview.get(0).style[r]=i)}},showProps:function(){this.$props=this.model.get("props"),this.$el.find("#"+this.pfx+"inputs").html(this.$props.show()),this.model.set({props:null},{silent:!0})},remove:function(t){this.$props&&this.$props.detach(),t&&t.stopPropagation&&t.stopPropagation(),i.View.prototype.remove.apply(this,arguments),this.model.collection.contains(this.model)&&this.model.collection.remove(this.model),this.stackModel&&this.stackModel.set&&(this.stackModel.set({stackIndex:null},{silent:!0}),this.stackModel.trigger("updateValue"))},updateIndex:function(t){var e=this.getIndex();this.stackModel.set("stackIndex",e),this.model.collection&&this.model.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"active")},getIndex:function(){var t=0,e=this.model;return e.collection&&(t=e.collection.indexOf(e)),t},render:function(){return this.$el.html(this.template({label:"Layer "+this.model.get("index"),pfx:this.pfx})),this.$el.attr("class",this.className),this.valueChanged(),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(38);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(15),n(9));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= label %>\n
'),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.open=this.model.get("open"),this.caretR="fa-caret-right",this.caretD="fa-caret-down",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"updateVisibility",this.updateVisibility),this.events["click ."+this.pfx+"title"]="toggle",this.delegateEvents()},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.$el.find("."+this.pfx+"properties").show(),this.$caret.removeClass(this.caretR).addClass(this.caretD)},hide:function(){this.$el.removeClass(this.pfx+"open"),this.$el.find("."+this.pfx+"properties").hide(),this.$caret.removeClass(this.caretD).addClass(this.caretR)},toggle:function(){var t=this.model.get("open")?0:1;this.model.set("open",t)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(126),i=n(127),r=n(130),o=n(41),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(27),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(128),view:n(39),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(129);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";n(40),n(39),n(41);t.exports=Backbone.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},toggleNoAssets:function(t){var e=this.$el.find("."+this.pfx+"assets");t?e.empty():e.append(this.config.noAssets)},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";Object.defineProperty(e,"__esModule",{value:!0});var i=n(132),r=function(t){return t&&t.__esModule?t:{default:t}}(i);window.Promise=window.Promise||r.default,e.default="function"==typeof fetch?fetch.bind():function(t,e){return new r.default(function(n,i){var o=new XMLHttpRequest;o.open(e.method||"get",t),o.withCredentials="include"==e.credentials;for(var s in e.headers||{})o.setRequestHeader(s,e.headers[s]);o.onload=function(t){return n({status:o.status,statusText:o.statusText,text:function(){return r.default.resolve(o.responseText)}})},o.onerror=i,o.upload&&e.onProgress&&(o.upload.onprogress=e.onProgress),o.send(e.body)})}},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(134),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;na.top+a.height?a.top+a.height:g;var m={top:g,left:p,elementTop:a.top,elementLeft:a.left,elementWidth:a.width,elementHeight:a.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&i.em&&i.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=s.getFrameOffset(1),t.on("mousemove",this.autoscroll),t.on("mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},stopAutoscroll:function(){this.dragging=0;var t=this.getScrollListeners();t.off("mousemove",this.autoscroll),t.off("mouseup",this.stopAutoscroll)},getScrollListeners:function(){return this.scrollListeners||(this.scrollListeners=$(this.getFrameEl().contentWindow,this.getElement())),this.scrollListeners},getFrameWrapperEl:function(){return s.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(168);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(170);t.exports=i.View.extend({initialize:function(t){e.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=$(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),o=e.get("Config"),s=this.config,a=o.protectedCss,l="";s.styles.forEach(function(t){l+=''});var c="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(o.canvasCss||"")+"\n "+(a||"")+"\n ";l&&i.append(l),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 u=document,h=this.frame.el.contentDocument,d=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};h.addEventListener("keydown",function(t){u.dispatchEvent(d(t))}),h.addEventListener("keyup",function(t){u.dispatchEvent(d(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=$("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html(""),t.scriptContainer.append("`); + }, 1);`; + view.scriptContainer.get(0).appendChild(script); }, /** From 4f32857be841bf3419da0c353ab3697a56504cd6 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 5 Oct 2017 01:12:18 +0200 Subject: [PATCH 102/143] Bump v0.11.3-rc --- dist/grapes.min.js | 6 +++--- package.json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dist/grapes.min.js b/dist/grapes.min.js index d6ad105702..011c8d2089 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,11 +1,11 @@ /*! grapesjs - 0.11.3-rc */ -!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()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=56)}([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(14),e],void 0!==(o=function(t,e,n){a.Backbone=s(a,n,t,e)}.apply(e,r))&&(t.exports=o)}(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){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],l(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],l(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=s(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(44),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(144),l=n(22),c=n(46),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=0;i
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return t},renderField:function(){if(!this.$input){this.$el.append(this.tmpl);var t=this.getInputEl();this.$el.find("."+this.inputhClass).prepend(t)}},render:function(){return this.renderLabel(),this.renderField(),this.el.className=this.className,this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(30),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(119),view:n(32),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(31),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(37),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(35),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(38),view:n(34),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(38),view:n(33),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(126),view:n(127),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(39),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(4),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(4),n(12),n(33),n(34),n(35),n(37),n(16),n(32);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(4).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(4),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(6),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===h?"undefined":i(h))&&(d=Object.assign(d,h)),r.runCommand("resize",{el:t,options:d}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(51),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(105);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(107);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({tagName:"a",initialize:function(t,e){this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"btn "+this.model.get("class")},render:function(){return this.$el.addClass(this.className),this}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(116),o=n(117),s=n(9),a=n(129),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(4).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(36);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(122);n(123);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="text"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(44),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(45);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(145),o=n(146);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.events={},this.events["click #"+e+"btn-eye"]="toggleVisibility",this.events["click ."+this.caretCls]="toggleOpening",this.events["click ."+this.titleCls]="handleSelect",this.events["click ."+this.editBtnCls]="handleEdit",this.events["blur ."+this.inputNameCls]="handleEditEnd",this.$el.data("model",i),this.$el.data("collection",r),t.config.sortable&&(this.events["mousedown #"+e+"move"]="startSort"),this.delegateEvents()},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(54));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(53);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r,a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l},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=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.isCountable(e,this.config.hideTextnode)&&this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(57)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(58),e=n(59),i=n(217),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.11.1",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(60),r=n(61),o=n(216);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("rte"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(62),n(66),n(74),n(79),n(83),n(87),n(91),n(103),n(109),n(29),n(131),n(137),n(142),n(166),n(172),n(198),n(206)],o=n(0),s=n(213),a=n(50),l=void 0;n(215)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(63),e=n(64),i=n(65);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(67),i=n(68),r=n(69),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body;for(var c in a)l&&l.append(c,a[c]);(0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&(s["Content-Type"]=r?"application/json; charset=utf-8":"x-www-form-urlencoded"),this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:l}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(72),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(80),o=n(81),s=n(82);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(86);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(88),o=n(89),s=n(90);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(92),i=n(93),r=n(94),o=n(95),s=n(96),a=n(97),l=n(102),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(5);n(98),n(23),n(101);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(5),n(99),n(100),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(5))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(5))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(5))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(104),o=n(24),s=n(106),a=(n(26),n(108));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";(function(e){e.$;t.exports=function(){var t,e,i,r,o={},s=n(110),a=(n(111),n(112)),l=n(114),c=n(0).$;return{customRte:null,name:"rte",init:function(n){r=this,o=n||{};for(var c in s)c in o||(o[c]=s[c]);var u=o.pStylePrefix;return u&&(o.stylePrefix=u+o.stylePrefix),t=o.stylePrefix,i=new a(o.commands),e=new l({collection:i,config:o}),this},add:function(t,e){var n=e||{};return n.command=t,i.add(n)},get:function(t){return i.where({command:t})[0]},getAll:function(){return i},udpatePosition:function(){var t=o.em.get("Canvas"),n=t.getTargetToElementDim(e.el,this.lastEl,{event:"rteToolbarPosUpdate"});o.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var i=e.el.style;i.top=n.top+"px",i.left=n.left+"px"},attach:function(t,n){this.lastEl=t.el;var i=t.getChildrenContainer(),r=this.customRte;return r?n=r.enable(i,n):c(i).wysiwyg({}).focus(),this.show(),o.em&&(setTimeout(this.udpatePosition.bind(this),0),o.em.off("change:canvasOffset",this.udpatePosition,this),o.em.on("change:canvasOffset",this.udpatePosition,this),o.em.off("canvasScroll",this.udpatePosition,this),o.em.on("canvasScroll",this.udpatePosition,this)),e.$el.on("mousedown",this.disableProp),n},detach:function(t,n){var i=this.customRte,r=t.getChildrenContainer();i?(t.model.set("content",r.innerHTML),i.disable(r,n)):c(r).wysiwyg("destroy"),this.hide(),e.$el.off("mousedown",this.disableProp)},focus:function(t,e){var n=this.customRte,i=t.getChildrenContainer();n?n.focus&&n.focus(i,e):this.attach(t)},show:function(){e.el.style.display="block"},hide:function(){e.el.style.display="none"},disableProp:function(t){t.stopPropagation()},getToolbarEl:function(){return e.el},render:function(){return e.render().el}}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",toolbarId:"toolbar",adjustToolbar:1,commands:[{command:"bold",title:"Bold",class:"fa fa-bold"},{command:"italic",title:"Italic",class:"fa fa-italic"},{command:"underline",title:"Underline",class:"fa fa-underline"},{command:"strikethrough",title:"Strikethrough",class:"fa fa-strikethrough",group:"format"},{command:"insertHTML",title:"Link",class:"fa fa-link",args:'${content}'}]}},function(t,e,n){"use strict";var i=n(0),r=i.$,o=function(t){var e=r.Deferred(),n=new FileReader;return n.onload=function(t){e.resolve(t.target.result)},n.onerror=e.reject,n.onprogress=e.notify,n.readAsDataURL(t),e.promise()};r.fn.cleanHtml=function(){var t=r(this).html();return t&&t.replace(/(
|\s|

<\/div>| )*$/,"")},r.fn.wysiwyg=function(t){var e,n,i,s=this,a=function(){var t=n.activeToolbarClass;t&&r(n.toolbarSelector).find(i).each(function(){var e=r(this),i=e.data(n.commandRole);s.get(0).ownerDocument.queryCommandState(i)?e.addClass(t):e.removeClass(t)})},l=function(t,e){var n=t.split(" "),i=n.shift(),r=n.join(" ")+(e||"");s.get(0).ownerDocument.execCommand("styleWithCSS",!1,!0),s.get(0).ownerDocument.execCommand(i,0,r),a(),s.trigger("change")},c=function(){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount)return t.getRangeAt(0)},u=function(){e=c()},h=function(){var t=window.getSelection();if(e){try{t.removeAllRanges()}catch(t){document.body.createTextRange().select(),document.selection.empty()}t.addRange(e)}},d=function(t){s.focus(),r.each(t,function(t,e){/^image\//.test(e.type)?r.when(o(e)).done(function(t){l("insertimage",t)}).fail(function(t){n.fileUploadError("file-reader",t)}):n.fileUploadError("unsupported-file-type",e.type)})},f=function(t,e){h(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,e||"transparent"),u(),t.data(n.selectionMarker,e)};if("string"==typeof t&&"destroy"==t)return s.attr("contenteditable",!1).off("mouseup keyup mouseout dragenter dragover"),r(window).off("touchend"),this;n=r.extend({},r.fn.wysiwyg.defaults,t);var p="[data-"+n.commandRole+"]";return i="a"+p+",button"+p+",input[type=button]"+p+", select"+p,n.dragAndDropImages&&function(){s.on("dragenter dragover",!1).on("drop",function(t){var e=t.originalEvent.dataTransfer;t.stopPropagation(),t.preventDefault(),e&&e.files&&e.files.length>0&&d(e.files)})}(),function(t,e){t.find(i).off("click").on("click",function(){h();var t=s.get(0).ownerDocument,n=r(this),i=n.data(e.commandRole),o=n.data("args");o?(o=o.replace("${content}",t.getSelection()),l(i,o)):t.execCommand(i),u()}),t.find("[data-toggle=dropdown]").on("click",h);var n="[data-"+e.commandRole+"]";t.find("select"+n).on("webkitspeechchange change",function(){var t=this.value;h(),t&&(s.focus(),l(r(this).data(e.commandRole),t)),u()}),t.find("input[type=text]"+n,", select"+n).on("webkitspeechchange change",function(){var t=this.value;this.value="",h(),t&&(s.focus(),l(r(this).data(e.commandRole),t)),u()}).on("focus",function(){var t=r(this);t.data(e.selectionMarker)||(f(t,e.selectionColor),t.focus())}).on("blur",function(){var t=r(this);t.data(e.selectionMarker)&&f(t,!1)}),t.find("input[type=file][data-"+e.commandRole+"]").on("change",function(){h(),"file"===this.type&&this.files&&this.files.length>0&&d(this.files),u(),this.value=""})}(r(n.toolbarSelector),n),s.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){u(),a()}),r(window).on("touchend",function(t){var e=s.is(t.target)||s.has(t.target).length>0,n=c();n&&n.startContainer===n.endContainer&&n.startOffset===n.endOffset&&!e||(u(),a())}),this},r.fn.wysiwyg.defaults={toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(t,e){console.log("File upload error",t,e)}},t.exports=r},function(t,e,n){"use strict";var i=n(0),r=n(113);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({idAttribute:"command",defaults:{command:"",type:"",title:"",class:"",options:[]},initialize:function(){this.get("options").length&&this.set("type","select")}})},function(t,e,n){"use strict";var i=n(0),r=n(28),o=n(115);t.exports=i.View.extend({attributes:{"data-role":"editor-toolbar"},initialize:function(t){this.config=t.config||{};var e=this.config.stylePrefix||"";this.id=e+this.config.toolbarId,this.listenTo(this.collection,"add",this.addTo),this.$el.data("helper",1)},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=r;switch(t.get("type")){case"select":i=o}var s=t.get("args"),a={title:t.get("title"),"data-edit":t.get("command")};s&&(a["data-args"]=s);var l=new i({model:t,attributes:a},this.config),c=l.render().el;n?n.appendChild(c):this.$el.append(c)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this.$el.attr("id",this.id),this}})},function(t,e,n){"use strict";(function(e){var i=n(28),r=e.$;t.exports=i.extend({initialize:function(t,e){i.prototype.initialize.apply(this,arguments)},getInput:function(){var t=this.model;if(!this.input){var e=t.get("command"),n='",this.input=r(n)}return this.input},getInputCont:function(){var t=this.getInput(),e=this.ppfx;return r('
').append(t)},render:function(){for(var t=arguments.length,e=Array(t),n=0;n'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(125);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(39);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(132),i=n(133),r=n(136),o=n(42),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(30),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(134),view:n(40),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(135);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(41),n(40),n(42);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(138),o=n(43),s=n(139),a=n(45),l=n(140);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(169);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(171),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html(""),t.scriptContainer.append(" diff --git a/package.json b/package.json index 723d15d508..39e4f58e7b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grapesjs", "description": "Free and Open Source Web Builder Framework", - "version": "0.11.4", + "version": "0.12.3", "author": "Artur Arseniev", "license": "BSD-3-Clause", "homepage": "http://grapesjs.com", @@ -44,18 +44,15 @@ "whatwg-fetch": "^2.0.3" }, "keywords": [ - "wte", "grapes", "grapesjs", - "web template editor", - "web site builder", - "web template builder", - "html website builder", - "site builder", - "newsletter builder", "wysiwyg", + "web", "template", - "editor" + "editor", + "newsletter", + "site", + "builder" ], "babel": { "presets": [ diff --git a/src/block_manager/index.js b/src/block_manager/index.js index deb81bd1de..c7edca7b80 100644 --- a/src/block_manager/index.js +++ b/src/block_manager/index.js @@ -99,11 +99,11 @@ module.exports = () => { }, /** - * Loading blocks with `onLoad` allows to init starting collection - * from plugins + * Load default blocks if the collection is empty */ onLoad() { - this.getAll().reset(c.blocks); + const blocks = this.getAll(); + !blocks.length && blocks.reset(c.blocks); }, /** From 9bcd9673b10af1bb696181deba6903a68b1b6c3f Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 10 Oct 2017 01:47:08 +0200 Subject: [PATCH 113/143] Bump v0.12.5 --- README.md | 7 ------- dist/grapes.min.js | 4 ++-- package.json | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a1bfe3bb9e..e9231357e0 100644 --- a/README.md +++ b/README.md @@ -111,13 +111,6 @@ $ npm run build ## Usage -JQuery is the only hard dependency so you have to include it before using GrapesJS - -```html - -``` -After that include scripts from GrapesJS with all your configurations - ```html diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 91b1aeb963..3ea3418946 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,5 +1,5 @@ -/*! grapesjs - 0.12.3 */ -!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()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=56)}([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(14),e],void 0!==(o=function(t,e,n){a.Backbone=s(a,n,t,e)}.apply(e,r))&&(t.exports=o)}(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){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],l(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],l(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=s(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(44),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(144),l=n(22),c=n(46),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=0;i
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(30),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(119),view:n(32),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(31),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(37),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(35),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(38),view:n(34),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(38),view:n(33),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(126),view:n(127),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(39),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(4),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(4),n(12),n(33),n(34),n(35),n(37),n(16),n(32);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(4).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(4),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(6),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(51),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(105);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(107);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({tagName:"a",initialize:function(t,e){this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"btn "+this.model.get("class")},render:function(){return this.$el.addClass(this.className),this}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(116),o=n(117),s=n(9),a=n(129),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(4).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(36);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(122);n(123);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(44),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(45);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(145),o=n(146);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.events={},this.events["click #"+e+"btn-eye"]="toggleVisibility",this.events["click ."+this.caretCls]="toggleOpening",this.events["click ."+this.titleCls]="handleSelect",this.events["click ."+this.editBtnCls]="handleEdit",this.events["blur ."+this.inputNameCls]="handleEditEnd",this.$el.data("model",i),this.$el.data("collection",r),t.config.sortable&&(this.events["mousedown #"+e+"move"]="startSort"),this.delegateEvents()},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(54));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(53);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r,a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l},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=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.isCountable(e,this.config.hideTextnode)&&this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(57)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(58),e=n(59),i=n(217),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.3",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(60),r=n(61),o=n(216);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("rte"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(62),n(66),n(74),n(79),n(83),n(87),n(91),n(103),n(109),n(29),n(131),n(137),n(142),n(166),n(172),n(198),n(206)],o=n(0),s=n(213),a=n(50),l=void 0;n(215)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(63),e=n(64),i=n(65);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(67),i=n(68),r=n(69),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(72),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(80),o=n(81),s=n(82);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(86);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(88),o=n(89),s=n(90);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(92),i=n(93),r=n(94),o=n(95),s=n(96),a=n(97),l=n(102),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(5);n(98),n(23),n(101);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(5),n(99),n(100),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(5))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(5))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(5))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(104),o=n(24),s=n(106),a=(n(26),n(108));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";(function(e){e.$;t.exports=function(){var t,e,i,r,o={},s=n(110),a=(n(111),n(112)),l=n(114),c=n(0).$;return{customRte:null,name:"rte",init:function(n){r=this,o=n||{};for(var c in s)c in o||(o[c]=s[c]);var u=o.pStylePrefix;return u&&(o.stylePrefix=u+o.stylePrefix),t=o.stylePrefix,i=new a(o.commands),e=new l({collection:i,config:o}),this},add:function(t,e){var n=e||{};return n.command=t,i.add(n)},get:function(t){return i.where({command:t})[0]},getAll:function(){return i},udpatePosition:function(){var t=o.em.get("Canvas"),n=t.getTargetToElementDim(e.el,this.lastEl,{event:"rteToolbarPosUpdate"});o.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var i=e.el.style;i.top=n.top+"px",i.left=n.left+"px"},attach:function(t,n){this.lastEl=t.el;var i=t.getChildrenContainer(),r=this.customRte;return r?n=r.enable(i,n):c(i).wysiwyg({}).focus(),this.show(),o.em&&(setTimeout(this.udpatePosition.bind(this),0),o.em.off("change:canvasOffset",this.udpatePosition,this),o.em.on("change:canvasOffset",this.udpatePosition,this),o.em.off("canvasScroll",this.udpatePosition,this),o.em.on("canvasScroll",this.udpatePosition,this)),e.$el.on("mousedown",this.disableProp),n},detach:function(t,n){var i=this.customRte,r=t.getChildrenContainer();i?(t.model.set("content",r.innerHTML),i.disable(r,n)):c(r).wysiwyg("destroy"),this.hide(),e.$el.off("mousedown",this.disableProp)},focus:function(t,e){var n=this.customRte,i=t.getChildrenContainer();n?n.focus&&n.focus(i,e):this.attach(t)},show:function(){e.el.style.display="block"},hide:function(){e.el.style.display="none"},disableProp:function(t){t.stopPropagation()},getToolbarEl:function(){return e.el},render:function(){return e.render().el}}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",toolbarId:"toolbar",adjustToolbar:1,commands:[{command:"bold",title:"Bold",class:"fa fa-bold"},{command:"italic",title:"Italic",class:"fa fa-italic"},{command:"underline",title:"Underline",class:"fa fa-underline"},{command:"strikethrough",title:"Strikethrough",class:"fa fa-strikethrough",group:"format"},{command:"insertHTML",title:"Link",class:"fa fa-link",args:'${content}'}]}},function(t,e,n){"use strict";var i=n(0),r=i.$,o=function(t){var e=r.Deferred(),n=new FileReader;return n.onload=function(t){e.resolve(t.target.result)},n.onerror=e.reject,n.onprogress=e.notify,n.readAsDataURL(t),e.promise()};r.fn.cleanHtml=function(){var t=r(this).html();return t&&t.replace(/(
|\s|

<\/div>| )*$/,"")},r.fn.wysiwyg=function(t){var e,n,i,s=this,a=function(){var t=n.activeToolbarClass;t&&r(n.toolbarSelector).find(i).each(function(){var e=r(this),i=e.data(n.commandRole);s.get(0).ownerDocument.queryCommandState(i)?e.addClass(t):e.removeClass(t)})},l=function(t,e){var n=t.split(" "),i=n.shift(),r=n.join(" ")+(e||"");s.get(0).ownerDocument.execCommand("styleWithCSS",!1,!0),s.get(0).ownerDocument.execCommand(i,0,r),a(),s.trigger("change")},c=function(){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount)return t.getRangeAt(0)},u=function(){e=c()},h=function(){var t=window.getSelection();if(e){try{t.removeAllRanges()}catch(t){document.body.createTextRange().select(),document.selection.empty()}t.addRange(e)}},d=function(t){s.focus(),r.each(t,function(t,e){/^image\//.test(e.type)?r.when(o(e)).done(function(t){l("insertimage",t)}).fail(function(t){n.fileUploadError("file-reader",t)}):n.fileUploadError("unsupported-file-type",e.type)})},f=function(t,e){h(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,e||"transparent"),u(),t.data(n.selectionMarker,e)};if("string"==typeof t&&"destroy"==t)return s.attr("contenteditable",!1).off("mouseup keyup mouseout dragenter dragover"),r(window).off("touchend"),this;n=r.extend({},r.fn.wysiwyg.defaults,t);var p="[data-"+n.commandRole+"]";return i="a"+p+",button"+p+",input[type=button]"+p+", select"+p,n.dragAndDropImages&&function(){s.on("dragenter dragover",!1).on("drop",function(t){var e=t.originalEvent.dataTransfer;t.stopPropagation(),t.preventDefault(),e&&e.files&&e.files.length>0&&d(e.files)})}(),function(t,e){t.find(i).off("click").on("click",function(){h();var t=s.get(0).ownerDocument,n=r(this),i=n.data(e.commandRole),o=n.data("args");o?(o=o.replace("${content}",t.getSelection()),l(i,o)):t.execCommand(i),u()}),t.find("[data-toggle=dropdown]").on("click",h);var n="[data-"+e.commandRole+"]";t.find("select"+n).on("webkitspeechchange change",function(){var t=this.value;h(),t&&(s.focus(),l(r(this).data(e.commandRole),t)),u()}),t.find("input[type=text]"+n,", select"+n).on("webkitspeechchange change",function(){var t=this.value;this.value="",h(),t&&(s.focus(),l(r(this).data(e.commandRole),t)),u()}).on("focus",function(){var t=r(this);t.data(e.selectionMarker)||(f(t,e.selectionColor),t.focus())}).on("blur",function(){var t=r(this);t.data(e.selectionMarker)&&f(t,!1)}),t.find("input[type=file][data-"+e.commandRole+"]").on("change",function(){h(),"file"===this.type&&this.files&&this.files.length>0&&d(this.files),u(),this.value=""})}(r(n.toolbarSelector),n),s.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){u(),a()}),r(window).on("touchend",function(t){var e=s.is(t.target)||s.has(t.target).length>0,n=c();n&&n.startContainer===n.endContainer&&n.startOffset===n.endOffset&&!e||(u(),a())}),this},r.fn.wysiwyg.defaults={toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(t,e){console.log("File upload error",t,e)}},t.exports=r},function(t,e,n){"use strict";var i=n(0),r=n(113);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({idAttribute:"command",defaults:{command:"",type:"",title:"",class:"",options:[]},initialize:function(){this.get("options").length&&this.set("type","select")}})},function(t,e,n){"use strict";var i=n(0),r=n(28),o=n(115);t.exports=i.View.extend({attributes:{"data-role":"editor-toolbar"},initialize:function(t){this.config=t.config||{};var e=this.config.stylePrefix||"";this.id=e+this.config.toolbarId,this.listenTo(this.collection,"add",this.addTo),this.$el.data("helper",1)},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=r;switch(t.get("type")){case"select":i=o}var s=t.get("args"),a={title:t.get("title"),"data-edit":t.get("command")};s&&(a["data-args"]=s);var l=new i({model:t,attributes:a},this.config),c=l.render().el;n?n.appendChild(c):this.$el.append(c)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this.$el.attr("id",this.id),this}})},function(t,e,n){"use strict";(function(e){var i=n(28),r=e.$;t.exports=i.extend({initialize:function(t,e){i.prototype.initialize.apply(this,arguments)},getInput:function(){var t=this.model;if(!this.input){var e=t.get("command"),n='",this.input=r(n)}return this.input},getInputCont:function(){var t=this.getInput(),e=this.ppfx;return r('
').append(t)},render:function(){for(var t=arguments.length,e=Array(t),n=0;n'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(125);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(39);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(132),i=n(133),r=n(136),o=n(42),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(30),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(134),view:n(40),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(135);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(41),n(40),n(42);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(138),o=n(43),s=n(139),a=n(45),l=n(140);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(169);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(171),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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=this.em.get("rte"),r=n.querySelector("#"+e+"tools");if(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"),i){var o=i.render();o.style.pointerEvents="all",r.appendChild(o)}return this.toolsEl=r,this.el.className=this.className,this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(173),o=n(174),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(179),i["image-comp"]=n(180),i["move-comp"]=n(181),i["text-comp"]=n(182),i["insert-custom"]=n(52),i["export-template"]=n(183),i["sw-visibility"]=n(184),i["open-layers"]=n(185),i["open-sm"]=n(188),i["open-tm"]=n(189),i["open-blocks"]=n(190),i["open-assets"]=n(191),i["show-offset"]=n(192),i["select-parent"]=n(193),i.fullscreen=n(194),i.preview=n(195),i.resize=n(196),i.drag=n(197),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(49)),r=n(176);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(178);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(52));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(6),o=n(19),s=n(51),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(186),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(187),r=n(53),o=n(54);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(29),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(199),s=n(200),a=n(202),l=n(203),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(201);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(55);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(55)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(204),o=n(205);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(207),r=(n(46),n(208));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(49),r=n(7),o=n(209),s=n(210),a=n(211),l=n(212);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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;rthis.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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(44),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(144),l=n(22),c=n(46),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=0;i
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(30),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(119),view:n(32),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(31),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(37),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(35),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(38),view:n(34),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(38),view:n(33),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(126),view:n(127),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(39),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(4),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(4),n(12),n(33),n(34),n(35),n(37),n(16),n(32);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(4).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(4),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(6),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(51),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(105);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(107);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({tagName:"a",initialize:function(t,e){this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"btn "+this.model.get("class")},render:function(){return this.$el.addClass(this.className),this}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(116),o=n(117),s=n(9),a=n(129),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(4).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(36);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(122);n(123);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(44),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(45);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(145),o=n(146);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.events={},this.events["click #"+e+"btn-eye"]="toggleVisibility",this.events["click ."+this.caretCls]="toggleOpening",this.events["click ."+this.titleCls]="handleSelect",this.events["click ."+this.editBtnCls]="handleEdit",this.events["blur ."+this.inputNameCls]="handleEditEnd",this.$el.data("model",i),this.$el.data("collection",r),t.config.sortable&&(this.events["mousedown #"+e+"move"]="startSort"),this.delegateEvents()},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(54));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(53);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r,a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l},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=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.isCountable(e,this.config.hideTextnode)&&this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(57)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(58),e=n(59),i=n(217),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.5",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(60),r=n(61),o=n(216);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("rte"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(62),n(66),n(74),n(79),n(83),n(87),n(91),n(103),n(109),n(29),n(131),n(137),n(142),n(166),n(172),n(198),n(206)],o=n(0),s=n(213),a=n(50),l=void 0;n(215)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(63),e=n(64),i=n(65);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(67),i=n(68),r=n(69),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(72),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(80),o=n(81),s=n(82);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(86);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(88),o=n(89),s=n(90);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(92),i=n(93),r=n(94),o=n(95),s=n(96),a=n(97),l=n(102),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(5);n(98),n(23),n(101);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(5),n(99),n(100),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(5))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(5))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(5))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(104),o=n(24),s=n(106),a=(n(26),n(108));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";(function(e){e.$;t.exports=function(){var t,e,i,r,o={},s=n(110),a=(n(111),n(112)),l=n(114),c=n(0).$;return{customRte:null,name:"rte",init:function(n){r=this,o=n||{};for(var c in s)c in o||(o[c]=s[c]);var u=o.pStylePrefix;return u&&(o.stylePrefix=u+o.stylePrefix),t=o.stylePrefix,i=new a(o.commands),e=new l({collection:i,config:o}),this},add:function(t,e){var n=e||{};return n.command=t,i.add(n)},get:function(t){return i.where({command:t})[0]},getAll:function(){return i},udpatePosition:function(){var t=o.em.get("Canvas"),n=t.getTargetToElementDim(e.el,this.lastEl,{event:"rteToolbarPosUpdate"});o.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var i=e.el.style;i.top=n.top+"px",i.left=n.left+"px"},attach:function(t,n){this.lastEl=t.el;var i=t.getChildrenContainer(),r=this.customRte;return r?n=r.enable(i,n):c(i).wysiwyg({}).focus(),this.show(),o.em&&(setTimeout(this.udpatePosition.bind(this),0),o.em.off("change:canvasOffset",this.udpatePosition,this),o.em.on("change:canvasOffset",this.udpatePosition,this),o.em.off("canvasScroll",this.udpatePosition,this),o.em.on("canvasScroll",this.udpatePosition,this)),e.$el.on("mousedown",this.disableProp),n},detach:function(t,n){var i=this.customRte,r=t.getChildrenContainer();i?(t.model.set("content",r.innerHTML),i.disable(r,n)):c(r).wysiwyg("destroy"),this.hide(),e.$el.off("mousedown",this.disableProp)},focus:function(t,e){var n=this.customRte,i=t.getChildrenContainer();n?n.focus&&n.focus(i,e):this.attach(t)},show:function(){e.el.style.display="block"},hide:function(){e.el.style.display="none"},disableProp:function(t){t.stopPropagation()},getToolbarEl:function(){return e.el},render:function(){return e.render().el}}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",toolbarId:"toolbar",adjustToolbar:1,commands:[{command:"bold",title:"Bold",class:"fa fa-bold"},{command:"italic",title:"Italic",class:"fa fa-italic"},{command:"underline",title:"Underline",class:"fa fa-underline"},{command:"strikethrough",title:"Strikethrough",class:"fa fa-strikethrough",group:"format"},{command:"insertHTML",title:"Link",class:"fa fa-link",args:'${content}'}]}},function(t,e,n){"use strict";var i=n(0),r=i.$,o=function(t){var e=r.Deferred(),n=new FileReader;return n.onload=function(t){e.resolve(t.target.result)},n.onerror=e.reject,n.onprogress=e.notify,n.readAsDataURL(t),e.promise()};r.fn.cleanHtml=function(){var t=r(this).html();return t&&t.replace(/(
|\s|

<\/div>| )*$/,"")},r.fn.wysiwyg=function(t){var e,n,i,s=this,a=function(){var t=n.activeToolbarClass;t&&r(n.toolbarSelector).find(i).each(function(){var e=r(this),i=e.data(n.commandRole);s.get(0).ownerDocument.queryCommandState(i)?e.addClass(t):e.removeClass(t)})},l=function(t,e){var n=t.split(" "),i=n.shift(),r=n.join(" ")+(e||"");s.get(0).ownerDocument.execCommand("styleWithCSS",!1,!0),s.get(0).ownerDocument.execCommand(i,0,r),a(),s.trigger("change")},c=function(){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount)return t.getRangeAt(0)},u=function(){e=c()},h=function(){var t=window.getSelection();if(e){try{t.removeAllRanges()}catch(t){document.body.createTextRange().select(),document.selection.empty()}t.addRange(e)}},d=function(t){s.focus(),r.each(t,function(t,e){/^image\//.test(e.type)?r.when(o(e)).done(function(t){l("insertimage",t)}).fail(function(t){n.fileUploadError("file-reader",t)}):n.fileUploadError("unsupported-file-type",e.type)})},f=function(t,e){h(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,e||"transparent"),u(),t.data(n.selectionMarker,e)};if("string"==typeof t&&"destroy"==t)return s.attr("contenteditable",!1).off("mouseup keyup mouseout dragenter dragover"),r(window).off("touchend"),this;n=r.extend({},r.fn.wysiwyg.defaults,t);var p="[data-"+n.commandRole+"]";return i="a"+p+",button"+p+",input[type=button]"+p+", select"+p,n.dragAndDropImages&&function(){s.on("dragenter dragover",!1).on("drop",function(t){var e=t.originalEvent.dataTransfer;t.stopPropagation(),t.preventDefault(),e&&e.files&&e.files.length>0&&d(e.files)})}(),function(t,e){t.find(i).off("click").on("click",function(){h();var t=s.get(0).ownerDocument,n=r(this),i=n.data(e.commandRole),o=n.data("args");o?(o=o.replace("${content}",t.getSelection()),l(i,o)):t.execCommand(i),u()}),t.find("[data-toggle=dropdown]").on("click",h);var n="[data-"+e.commandRole+"]";t.find("select"+n).on("webkitspeechchange change",function(){var t=this.value;h(),t&&(s.focus(),l(r(this).data(e.commandRole),t)),u()}),t.find("input[type=text]"+n,", select"+n).on("webkitspeechchange change",function(){var t=this.value;this.value="",h(),t&&(s.focus(),l(r(this).data(e.commandRole),t)),u()}).on("focus",function(){var t=r(this);t.data(e.selectionMarker)||(f(t,e.selectionColor),t.focus())}).on("blur",function(){var t=r(this);t.data(e.selectionMarker)&&f(t,!1)}),t.find("input[type=file][data-"+e.commandRole+"]").on("change",function(){h(),"file"===this.type&&this.files&&this.files.length>0&&d(this.files),u(),this.value=""})}(r(n.toolbarSelector),n),s.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){u(),a()}),r(window).on("touchend",function(t){var e=s.is(t.target)||s.has(t.target).length>0,n=c();n&&n.startContainer===n.endContainer&&n.startOffset===n.endOffset&&!e||(u(),a())}),this},r.fn.wysiwyg.defaults={toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(t,e){console.log("File upload error",t,e)}},t.exports=r},function(t,e,n){"use strict";var i=n(0),r=n(113);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({idAttribute:"command",defaults:{command:"",type:"",title:"",class:"",options:[]},initialize:function(){this.get("options").length&&this.set("type","select")}})},function(t,e,n){"use strict";var i=n(0),r=n(28),o=n(115);t.exports=i.View.extend({attributes:{"data-role":"editor-toolbar"},initialize:function(t){this.config=t.config||{};var e=this.config.stylePrefix||"";this.id=e+this.config.toolbarId,this.listenTo(this.collection,"add",this.addTo),this.$el.data("helper",1)},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=r;switch(t.get("type")){case"select":i=o}var s=t.get("args"),a={title:t.get("title"),"data-edit":t.get("command")};s&&(a["data-args"]=s);var l=new i({model:t,attributes:a},this.config),c=l.render().el;n?n.appendChild(c):this.$el.append(c)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this.$el.attr("id",this.id),this}})},function(t,e,n){"use strict";(function(e){var i=n(28),r=e.$;t.exports=i.extend({initialize:function(t,e){i.prototype.initialize.apply(this,arguments)},getInput:function(){var t=this.model;if(!this.input){var e=t.get("command"),n='",this.input=r(n)}return this.input},getInputCont:function(){var t=this.getInput(),e=this.ppfx;return r('
').append(t)},render:function(){for(var t=arguments.length,e=Array(t),n=0;n'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(125);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(39);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(132),i=n(133),r=n(136),o=n(42),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(30),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(134),view:n(40),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(135);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(41),n(40),n(42);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(138),o=n(43),s=n(139),a=n(45),l=n(140);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(169);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(171),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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=this.em.get("rte"),r=n.querySelector("#"+e+"tools");if(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"),i){var o=i.render();o.style.pointerEvents="all",r.appendChild(o)}return this.toolsEl=r,this.el.className=this.className,this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(173),o=n(174),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(179),i["image-comp"]=n(180),i["move-comp"]=n(181),i["text-comp"]=n(182),i["insert-custom"]=n(52),i["export-template"]=n(183),i["sw-visibility"]=n(184),i["open-layers"]=n(185),i["open-sm"]=n(188),i["open-tm"]=n(189),i["open-blocks"]=n(190),i["open-assets"]=n(191),i["show-offset"]=n(192),i["select-parent"]=n(193),i.fullscreen=n(194),i.preview=n(195),i.resize=n(196),i.drag=n(197),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(49)),r=n(176);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(178);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(52));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(6),o=n(19),s=n(51),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(186),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(187),r=n(53),o=n(54);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(29),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(199),s=n(200),a=n(202),l=n(203),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(201);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(55);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(55)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(204),o=n(205);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(207),r=(n(46),n(208));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(49),r=n(7),o=n(209),s=n(210),a=n(211),l=n(212);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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 Date: Tue, 10 Oct 2017 14:49:56 +0200 Subject: [PATCH 114/143] Update RichTextEditor --- src/rich_text_editor/view/RichTextEditor.js | 61 ++++++++++++++++----- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/src/rich_text_editor/view/RichTextEditor.js b/src/rich_text_editor/view/RichTextEditor.js index a5a212aa26..cf2313e2fc 100644 --- a/src/rich_text_editor/view/RichTextEditor.js +++ b/src/rich_text_editor/view/RichTextEditor.js @@ -1,6 +1,8 @@ // The initial version of this RTE was borrowed from https://github.com/jaredreich/pell // and adapted to the GrapesJS's need +const RTE_KEY = '_rte'; + const actions = { bold: { icon: 'B', @@ -37,8 +39,8 @@ export default class RichTextEditor { constructor(settings = {}) { const el = settings.element; - if (el.rte) { - return el.rte; + if (el[RTE_KEY]) { + return el[RTE_KEY]; } settings.actions = settings.actions @@ -71,7 +73,7 @@ export default class RichTextEditor { el.oninput = e => settings.onChange(e.target.innerHTML) el.onkeydown = e => (e.which === 9 && e.preventDefault()); - el.rte = this; + el[RTE_KEY] = this; this.el = el; this.doc = el.ownerDocument; @@ -83,8 +85,19 @@ export default class RichTextEditor { return this; } + enable() { + this.actionbar().style.display = ''; + this.el.contentEditable = true; + this.syncActions(); + } + + disable() { + this.actionbar().style.display = 'none'; + this.el.contentEditable = false; + } + /** - * Sync actions with a current rte + * Sync actions with the current RTE */ syncActions() { this.actions().forEach(action => { @@ -99,40 +112,58 @@ export default class RichTextEditor { */ addAction(action) { const btn = document.createElement('span'); + const icon = action.icon; btn.className = this.classes.button; - btn.insertAdjacentHTML('afterbegin', action.icon); btn.title = action.title; action.btn = btn; - this.actionbar().appendChild(btn); - } - enable() { - this.actionbar().style.display = ''; - el.contentEditable = true; - this.syncActions(); - } + if (typeof icon == 'string') { + btn.innerHTML = icon; + } else { + btn.appendChild(icon); + } - disable() { - this.actionbar().style.display = 'none'; - el.contentEditable = false; + this.actionbar().appendChild(btn); } + /** + * Get the array of current actions + * @return {Array} + */ actions() { return this.settings.actions; } + /** + * Returns the Selection instance + * @return {Selection} + */ selection() { this.doc.getSelection() } + /** + * Execute the command + * @param {string} command Command name + * @param {any} [value=null Command's arguments + */ exec(command, value = null) { this.doc.execCommand(command, false, value); } + /** + * Get the actionbar element + * @return {HTMLElement} + */ actionbar() { return this.actionbar; } + /** + * Set custom HTML to the selection, useful as the default 'insertHTML' command + * doesn't work in the same way on all browsers + * @param {string} value HTML string + */ insertHTML(value) { const doc = this.doc; const sel = doc.getSelection(); From 608a1751fac4a4a51fac8deac24ab777b6389af1 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 10 Oct 2017 21:34:31 +0200 Subject: [PATCH 115/143] Refactor ComponentTextView --- src/dom_components/view/ComponentTextView.js | 92 +++++++++----------- src/dom_components/view/ComponentView.js | 42 ++++----- src/dom_components/view/ComponentsView.js | 61 +++++++------ src/utils/extender.js | 6 ++ 4 files changed, 98 insertions(+), 103 deletions(-) diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index 058e11f320..e907f6d0cc 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -6,18 +6,16 @@ module.exports = ComponentView.extend({ events: { 'dblclick': 'enableEditing', - 'change': 'parseRender', }, initialize(o) { ComponentView.prototype.initialize.apply(this, arguments); - _.bindAll(this,'disableEditing'); + this.disableEditing = this.disableEditing.bind(this); const model = this.model; this.listenTo(model, 'focus active', this.enableEditing); this.listenTo(model, 'change:content', this.updateContent); this.rte = this.config.rte || ''; this.activeRte = null; - this.em = this.config.em; }, /** @@ -26,15 +24,18 @@ module.exports = ComponentView.extend({ * @private * */ enableEditing(e) { - var editable = this.model.get('editable'); - if(this.rte && editable) { + const editable = this.model.get('editable'); + const rte = this.rte; + + if (rte && editable) { try { - this.activeRte = this.rte.attach(this, this.activeRte); - this.rte.focus(this, this.activeRte); + this.activeRte = rte.attach(this, this.activeRte); + rte.focus(this, this.activeRte); } catch (err) { console.error(err); } } + this.toggleEvents(1); }, @@ -44,23 +45,46 @@ module.exports = ComponentView.extend({ * @private * */ disableEditing(e) { - var model = this.model; - var editable = model.get('editable'); + const model = this.model; + const editable = model.get('editable'); + const rte = this.rte; - if(this.rte && editable) { + if (rte && editable) { try { - this.rte.detach(this, this.activeRte); + rte.detach(this, this.activeRte); } catch (err) { console.error(err); } - var el = this.getChildrenContainer(); - // Avoid double content by removing its children components - model.get('components').reset(); - model.set('content', el.innerHTML); - } - if(!this.rte.customRte && editable) { - this.parseRender(); + const content = this.getChildrenContainer().innerHTML; + const comps = model.get('components'); + + // If there is a custom RTE the content is just baked staticly + // inside 'content' + if (rte.customRte) { + // Avoid double content by removing its children components + comps.reset(); + model.set('content', content); + } else { + const clean = model => { + model.set({ + highlightable: 0, + removable: 0, + draggable: 0, + copyable: 0, + toolbar: '', + }); + model.get('components').each(model => clean(model)); + } + + // Avoid re-render on reset with silent option + model.set('content', ''); + comps.reset(); + comps.add(content); + comps.each(model => clean(model)); + // With rerender is possible to see changes applied after clean + this.render(); + } } this.toggleEvents(); @@ -75,38 +99,6 @@ module.exports = ComponentView.extend({ e.stopPropagation(); }, - /** - * Parse content and re-render it - * @private - */ - parseRender() { - const model = this.model; - var el = this.getChildrenContainer(); - var comps = model.get('components'); - var opts = {silent: true}; - const clean = model => { - model.set({ - highlightable: 0, - removable: 0, - draggable: 0, - copyable: 0, - toolbar: '', - }, opts); - model.get('components').each(model => clean(model)); - } - - // Avoid re-render on reset with silent option - comps.reset(null, opts); - comps.add(el.innerHTML, opts); - comps.each(model => clean(model)); - model.set('content', ''); - this.render(); - - // As the reset was in silent mode I need to notify - // the navigator about the change - comps.trigger('resetNavigator'); - }, - /** * Enable/Disable events * @param {Boolean} enable diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index 28c9f6f850..e2def9bd6d 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -1,5 +1,4 @@ const ComponentsView = require('./ComponentsView'); -const $ = Backbone.$; module.exports = Backbone.View.extend({ @@ -12,15 +11,16 @@ module.exports = Backbone.View.extend({ }, initialize(opt) { - var model = this.model; + const model = this.model; this.opts = opt || {}; this.config = this.opts.config || {}; this.em = this.config.em || ''; this.pfx = this.config.stylePrefix || ''; this.ppfx = this.config.pStylePrefix || ''; - this.components = model.get('components'); - this.attr = model.get("attributes"); + this.attr = model.get('attributes'); this.classe = this.attr.class || []; + const $el = this.$el; + const classes = model.get('classes'); this.listenTo(model, 'destroy remove', this.remove); this.listenTo(model, 'change:style', this.updateStyle); this.listenTo(model, 'change:attributes', this.updateAttributes); @@ -28,26 +28,20 @@ module.exports = Backbone.View.extend({ this.listenTo(model, 'change:state', this.updateState); this.listenTo(model, 'change:script', this.render); this.listenTo(model, 'change', this.handleChange); - this.listenTo(model.get('classes'), 'add remove change', this.updateClasses); - - const $el = this.$el; - const el = this.el; - const em = this.em; + this.listenTo(classes, 'add remove change', this.updateClasses); $el.data('model', model); - $el.data('collection', this.components); + $el.data('collection', model.get('components')); model.view = this; - - if (em) { - em.data(el, 'model', model); - em.data(el, 'collection', model.get('components')); - } - - if(model.get('classes').length) - this.importClasses(); - + classes.length && this.importClasses(); this.init(); }, + remove() { + Backbone.View.prototype.remove.apply(this); + const children = this.childrenView; + children && children.stopListening(); + }, + /** * Initialize callback */ @@ -309,15 +303,16 @@ module.exports = Backbone.View.extend({ * @private */ renderChildren() { - var view = new ComponentsView({ + const container = this.getChildrenContainer(); + const view = new ComponentsView({ collection: this.model.get('components'), config: this.config, componentTypes: this.opts.componentTypes, }); - var container = this.getChildrenContainer(); - var childNodes = view.render($(container)).el.childNodes; - childNodes = Array.prototype.slice.call(childNodes); + view.render(container); + this.childrenView = view; + const childNodes = Array.prototype.slice.call(view.el.childNodes); for (var i = 0, len = childNodes.length ; i < len; i++) { container.appendChild(childNodes.shift()); @@ -348,7 +343,6 @@ module.exports = Backbone.View.extend({ render() { this.renderAttributes(); - var model = this.model; this.updateContent(); this.renderChildren(); this.updateScript(); diff --git a/src/dom_components/view/ComponentsView.js b/src/dom_components/view/ComponentsView.js index 5f9366cf4c..8becdc5bf4 100644 --- a/src/dom_components/view/ComponentsView.js +++ b/src/dom_components/view/ComponentsView.js @@ -1,12 +1,13 @@ -var Backbone = require('backbone'); +import { isUndefined } from 'underscore' module.exports = Backbone.View.extend({ initialize(o) { this.opts = o || {}; this.config = o.config || {}; - this.listenTo( this.collection, 'add', this.addTo ); - this.listenTo( this.collection, 'reset', this.render ); + const coll = this.collection; + this.listenTo(coll, 'add', this.addTo); + this.listenTo(coll, 'reset', this.resetChildren); }, /** @@ -17,7 +18,7 @@ module.exports = Backbone.View.extend({ * @private * */ addTo(model) { - var i = this.collection.indexOf(model); + var i = this.collection.indexOf(model); this.addToCollection(model, null, i); var em = this.config.em; @@ -42,7 +43,6 @@ module.exports = Backbone.View.extend({ this.compView = require('./ComponentView'); var fragment = fragmentEl || null, viewObject = this.compView; - //console.log('Add to collection', model, 'Index',i); var dt = this.opts.componentTypes; @@ -66,44 +66,47 @@ module.exports = Backbone.View.extend({ if(view.model.get('type') == 'textnode') rendered = document.createTextNode(view.model.get('content')); - if(fragment){ + if (fragment) { fragment.appendChild(rendered); - }else{ - var p = this.$parent; - var pc = p.children; - if(typeof index != 'undefined'){ - var method = 'before'; + } else { + const parent = this.parentEl; + const children = parent.childNodes; + + if (!isUndefined(index)) { + const lastIndex = children.length == index; + // If the added model is the last of collection // need to change the logic of append - if(pc && p.children().length == index){ + if (lastIndex) { index--; - method = 'after'; } + // In case the added is new in the collection index will be -1 - if(index < 0) { - p.append(rendered); - }else { - if(pc) { - p.children().eq(index)[method](rendered); - } + if (lastIndex || !children.length) { + parent.appendChild(rendered); + } else { + parent.insertBefore(rendered, children[index]); } - }else{ - p.append(rendered); + } else { + parent.appendChild(rendered); } } return rendered; }, - render($p) { - var fragment = document.createDocumentFragment(); - this.$parent = $p || this.$el; - this.$el.empty(); - this.collection.each(function(model){ - this.addToCollection(model, fragment); - },this); - this.$el.append(fragment); + resetChildren() { + this.parentEl.innerHTML = ''; + this.collection.each(model => this.addToCollection(model)); + }, + render(parent) { + const el = this.el; + const frag = document.createDocumentFragment(); + this.parentEl = parent || this.el; + this.collection.each(model => this.addToCollection(model, frag)); + el.innerHTML = ''; + el.appendChild(frag); return this; } diff --git a/src/utils/extender.js b/src/utils/extender.js index f058e364da..45e05908e7 100644 --- a/src/utils/extender.js +++ b/src/utils/extender.js @@ -213,6 +213,12 @@ module.exports = ({$, Backbone}) => { return this; } + fn.remove = function () { + return this.each(node => { + return node.parentNode && node.parentNode.removeChild(node); + }); + }, + // For spectrum compatibility fn.bind = function(ev, h) { return this.on(ev, h); From 72a31c27605dcc78a33b3cf0222458ac131d7bf0 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 10 Oct 2017 22:36:11 +0200 Subject: [PATCH 116/143] Update navigator items --- src/dom_components/view/ComponentTextView.js | 5 +++- src/navigator/view/ItemView.js | 31 +++++++++----------- src/navigator/view/ItemsView.js | 22 +++++++------- 3 files changed, 28 insertions(+), 30 deletions(-) diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index e907f6d0cc..d8fc5cdeb6 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -82,8 +82,11 @@ module.exports = ComponentView.extend({ comps.reset(); comps.add(content); comps.each(model => clean(model)); - // With rerender is possible to see changes applied after clean + + // With rerender it's possible to see changes applied + // after clean method this.render(); + comps.trigger('resetNavigator'); } } diff --git a/src/navigator/view/ItemView.js b/src/navigator/view/ItemView.js index 2332a3e463..2cc552040a 100644 --- a/src/navigator/view/ItemView.js +++ b/src/navigator/view/ItemView.js @@ -4,16 +4,25 @@ var ItemsView; module.exports = Backbone.View.extend({ + events: { + 'mousedown [data-toggle-move]': 'startSort', + 'click [data-toggle-visible]': 'toggleVisibility', + 'click [data-toggle-select]': 'handleSelect', + 'click [data-toggle-open]': 'toggleOpening', + 'click [data-toggle-edit]': 'handleEdit', + 'focusout input': 'handleEditEnd', + }, + template: _.template(` <% if (hidable) { %> - + <% } %>
-
+
- - + + <%= icon %>
@@ -22,7 +31,7 @@ module.exports = Backbone.View.extend({
<%= (count ? count : '') %>
-
+
@@ -50,20 +59,8 @@ module.exports = Backbone.View.extend({ this.inputNameCls = `${ppfx}nav-comp-name`; this.caretCls = `${ppfx}nav-item-caret`; this.titleCls = `${pfx}title`; - this.events = {}; - this.events[`click #${pfx}btn-eye`] = 'toggleVisibility'; - this.events['click .' + this.caretCls] = 'toggleOpening'; - this.events['click .' + this.titleCls] = 'handleSelect'; - this.events['click .' + this.editBtnCls] = 'handleEdit'; - this.events['blur .' + this.inputNameCls] = 'handleEditEnd'; - this.$el.data('model', model); this.$el.data('collection', components); - - if(o.config.sortable) - this.events['mousedown #'+pfx+'move'] = 'startSort'; - - this.delegateEvents(); }, /** diff --git a/src/navigator/view/ItemsView.js b/src/navigator/view/ItemsView.js index d38807902b..9713384420 100644 --- a/src/navigator/view/ItemsView.js +++ b/src/navigator/view/ItemsView.js @@ -14,7 +14,7 @@ module.exports = Backbone.View.extend({ this.parent = o.parent; this.listenTo(this.collection, 'add', this.addTo); this.listenTo(this.collection, 'reset resetNavigator', this.render); - this.className = this.pfx + 'items'; + this.className = this.pfx + 'items'; if (config.sortable && !this.opt.sorter) { var pfx = this.pfx; @@ -65,6 +65,10 @@ module.exports = Backbone.View.extend({ var fragment = fragmentEl || null; var viewObject = ItemView; + if(!this.isCountable(model, this.config.hideTextnode)) { + return; + } + var view = new viewObject({ level, model, @@ -115,17 +119,11 @@ module.exports = Backbone.View.extend({ }, render() { - var fragment = document.createDocumentFragment(); - this.$el.empty(); - - this.collection.each(function(model) { - if(!this.isCountable(model, this.config.hideTextnode)) - return; - this.addToCollection(model, fragment); - }, this); - - this.$el.append(fragment); - this.$el.attr('class', _.result(this, 'className')); + const frag = document.createDocumentFragment(); + this.el.innerHTML = ''; + this.collection.each(model => this.addToCollection(model, frag)); + this.el.appendChild(frag); + this.$el.attr('class', this.className); return this; } }); From be25a49064e80b3a4559edeb45871909563118cf Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Oct 2017 01:36:23 +0200 Subject: [PATCH 117/143] Move RTE rendering from canvas to its module --- src/canvas/index.js | 2 +- src/canvas/view/CanvasView.js | 8 --- src/dom_components/view/ComponentTextView.js | 3 +- src/rich_text_editor/config/config.js | 35 ++---------- src/rich_text_editor/index.js | 56 ++++++++++---------- src/rich_text_editor/view/RichTextEditor.js | 20 +++---- 6 files changed, 45 insertions(+), 79 deletions(-) diff --git a/src/canvas/index.js b/src/canvas/index.js index fc3b591f7e..9f75d794e8 100644 --- a/src/canvas/index.js +++ b/src/canvas/index.js @@ -106,7 +106,7 @@ module.exports = () => { }, /** - * Returns element containing canvas tools + * Returns element containing all canvas tools * @return {HTMLElement} */ getToolsEl() { diff --git a/src/canvas/view/CanvasView.js b/src/canvas/view/CanvasView.js index d3d11feefe..86a0e888e6 100644 --- a/src/canvas/view/CanvasView.js +++ b/src/canvas/view/CanvasView.js @@ -362,7 +362,6 @@ module.exports = Backbone.View.extend({
`); const el = this.el; - const rte = this.em.get('rte'); const toolsEl = el.querySelector(`#${ppfx}tools`); this.hlEl = el.querySelector(`.${ppfx}highlighter`); this.badgeEl = el.querySelector(`.${ppfx}badge`); @@ -372,13 +371,6 @@ module.exports = Backbone.View.extend({ this.resizerEl = el.querySelector(`.${ppfx}resizer`); this.offsetEl = el.querySelector(`.${ppfx}offset-v`); this.fixedOffsetEl = el.querySelector(`.${ppfx}offset-fixed-v`); - - if (rte) { - const rteEl = rte.render(); - rteEl.style.pointerEvents = 'all'; - toolsEl.appendChild(rteEl); - } - this.toolsEl = toolsEl; this.el.className = this.className; return this; diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index d8fc5cdeb6..ee9d2498ef 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -12,9 +12,10 @@ module.exports = ComponentView.extend({ ComponentView.prototype.initialize.apply(this, arguments); this.disableEditing = this.disableEditing.bind(this); const model = this.model; + const em = this.em; this.listenTo(model, 'focus active', this.enableEditing); this.listenTo(model, 'change:content', this.updateContent); - this.rte = this.config.rte || ''; + this.rte = em && em.get('rte'); this.activeRte = null; }, diff --git a/src/rich_text_editor/config/config.js b/src/rich_text_editor/config/config.js index b2d8b6a567..f27a589f08 100644 --- a/src/rich_text_editor/config/config.js +++ b/src/rich_text_editor/config/config.js @@ -1,40 +1,11 @@ module.exports = { + stylePrefix : 'rte-', - toolbarId : 'toolbar', // If true, moves the toolbar below the element when the top canvas // edge is reached adjustToolbar: 1, - // Default toolbar commands - commands : [{ - command: 'bold', - title: 'Bold', - class: 'fa fa-bold', - },{ - command: 'italic', - title: 'Italic', - class: 'fa fa-italic', - },{ - command: 'underline', - title: 'Underline', - class: 'fa fa-underline', - },{ - command: 'strikethrough', - title: 'Strikethrough', - class: 'fa fa-strikethrough', - group: 'format' - },{ - command: 'insertHTML', - title: 'Link', - class: 'fa fa-link', - args: '${content}', - }/*,{ - command: 'fontSize', - options: [ - {name: 'Huge', value: '7'}, - {name: 'Normal', value: '5'}, - {value: '1'} - ] - }*/], + // Default RTE actions + actions: ['bold', 'italic', 'underline', 'strikethrough', 'link'], }; diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index e2e39765b1..b3faa620ed 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -30,8 +30,7 @@ module.exports = () => { CommandButtons = require('./model/CommandButtons'), CommandButtonsView = require('./view/CommandButtonsView'); const $ = require('backbone').$; - var tlbPfx, toolbar, commands; - var mainSelf; + let toolbar, commands; return { @@ -50,26 +49,39 @@ module.exports = () => { * @private */ init(config) { - mainSelf = this; c = config || {}; - for (var name in defaults) { - if (!(name in c)) + + for (let name in defaults) { + if (!(name in c)) { c[name] = defaults[name]; + } } - var ppfx = c.pStylePrefix; - if(ppfx) + const ppfx = c.pStylePrefix; + + if (ppfx) { c.stylePrefix = ppfx + c.stylePrefix; + } - tlbPfx = c.stylePrefix; + toolbar = document.createElement('div'); + toolbar.className = `${ppfx}rte-toolbar`; + + /* commands = new CommandButtons(c.commands); toolbar = new CommandButtonsView({ collection: commands, config: c, }); + */ return this; }, + postRender(ev) { + const canvas = ev.model.get('Canvas'); + toolbar.style.pointerEvents = 'all'; + canvas.getToolsEl().appendChild(toolbar); + }, + /** * Add a new command to the toolbar * @param {string} command Command name @@ -145,6 +157,7 @@ module.exports = () => { * @private * */ attach(view, rte) { + const em = c.em; // lastEl will be used to place the RTE toolbar this.lastEl = view.el; var el = view.getChildrenContainer(); @@ -159,13 +172,13 @@ module.exports = () => { this.show(); - if(c.em) { + if (em) { setTimeout(this.udpatePosition.bind(this), 0); - c.em.off('change:canvasOffset', this.udpatePosition, this); - c.em.on('change:canvasOffset', this.udpatePosition, this); + em.off('change:canvasOffset', this.udpatePosition, this); + em.on('change:canvasOffset', this.udpatePosition, this); // Update position on scrolling - c.em.off('canvasScroll', this.udpatePosition, this); - c.em.on('canvasScroll', this.udpatePosition, this); + em.off('canvasScroll', this.udpatePosition, this); + em.on('canvasScroll', this.udpatePosition, this); } //Avoid closing edit mode clicking on toolbar @@ -214,8 +227,7 @@ module.exports = () => { * @private * */ show() { - var toolbarStyle = toolbar.el.style; - toolbarStyle.display = "block"; + toolbar.style.display = ''; }, /** @@ -223,7 +235,7 @@ module.exports = () => { * @private * */ hide() { - toolbar.el.style.display = "none"; + toolbar.style.display = 'none'; }, /** @@ -240,17 +252,7 @@ module.exports = () => { * @private */ getToolbarEl() { - return toolbar.el; + return toolbar; }, - - /** - * Render toolbar - * @return {HTMLElement} - * @private - */ - render() { - return toolbar.render().el; - } - }; }; diff --git a/src/rich_text_editor/view/RichTextEditor.js b/src/rich_text_editor/view/RichTextEditor.js index cf2313e2fc..e737289558 100644 --- a/src/rich_text_editor/view/RichTextEditor.js +++ b/src/rich_text_editor/view/RichTextEditor.js @@ -29,7 +29,7 @@ const actions = { title: 'Link', result: (rte) => { const url = window.prompt('Enter the link URL') - if (url) rte.exec('createLink', url) + if (url) rte.exec('createLink', url)//class="link" } }, } @@ -43,14 +43,20 @@ export default class RichTextEditor { return el[RTE_KEY]; } + el.oninput = e => settings.onChange && settings.onChange(e.target.innerHTML); + el.onkeydown = e => (e.which === 9 && e.preventDefault()); + el[RTE_KEY] = this; + this.el = el; + this.doc = el.ownerDocument; + settings.actions = settings.actions ? settings.actions.map(action => { if (typeof action === 'string') { - return actions[action] + return actions[action]; } else if (actions[action.name]) { - return { ...actions[action.name], ...action } + return {...actions[action.name], ...action}; } - return action + return action; }) : Object.keys(actions).map(action => actions[action]) settings.classes = { ...{ @@ -71,12 +77,6 @@ export default class RichTextEditor { settings.actions.forEach(action => this.addAction(action)) } - el.oninput = e => settings.onChange(e.target.innerHTML) - el.onkeydown = e => (e.which === 9 && e.preventDefault()); - el[RTE_KEY] = this; - - this.el = el; - this.doc = el.ownerDocument; this.settings = settings; this.classes = classes; settings.styleWithCSS && this.exec('styleWithCSS'); From 9b892e05254d052ff14c260a3da161fa480e34fa Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Oct 2017 01:38:37 +0200 Subject: [PATCH 118/143] Rename RTE module --- src/dom_components/index.js | 1 - src/dom_components/view/ComponentTextView.js | 2 +- src/editor/index.js | 2 +- src/rich_text_editor/index.js | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dom_components/index.js b/src/dom_components/index.js index 62b6161de9..719dcd353c 100644 --- a/src/dom_components/index.js +++ b/src/dom_components/index.js @@ -162,7 +162,6 @@ module.exports = () => { // Load dependencies if (em) { - c.rte = em.get('rte') || ''; c.modal = em.get('Modal') || ''; c.am = em.get('AssetManager') || ''; em.get('Parser').compTypes = componentTypes; diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index ee9d2498ef..0caab19529 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -15,7 +15,7 @@ module.exports = ComponentView.extend({ const em = this.em; this.listenTo(model, 'focus active', this.enableEditing); this.listenTo(model, 'change:content', this.updateContent); - this.rte = em && em.get('rte'); + this.rte = em && em.get('RichTextEditor'); this.activeRte = null; }, diff --git a/src/editor/index.js b/src/editor/index.js index cd70bbae94..acd146167a 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -207,7 +207,7 @@ module.exports = config => { * @property {RichTextEditor} * @private */ - RichTextEditor: em.get('rte'), + RichTextEditor: em.get('RichTextEditor'), /** * @property {Utils} diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index b3faa620ed..0bbbe9650a 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -41,7 +41,7 @@ module.exports = () => { * @type {String} * @private */ - name: 'rte', + name: 'RichTextEditor', /** * Initialize module. Automatically called with a new instance of the editor From a331d97fb32b5aeaa7ee6ad15f7813e8e10609c7 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Oct 2017 02:06:10 +0200 Subject: [PATCH 119/143] Refactor few ComponentTextView methods --- src/dom_components/view/ComponentTextView.js | 5 ++--- src/rich_text_editor/{view => model}/RichTextEditor.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) rename src/rich_text_editor/{view => model}/RichTextEditor.js (99%) diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index 0caab19529..ba3ec68aa2 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -16,7 +16,6 @@ module.exports = ComponentView.extend({ this.listenTo(model, 'focus active', this.enableEditing); this.listenTo(model, 'change:content', this.updateContent); this.rte = em && em.get('RichTextEditor'); - this.activeRte = null; }, /** @@ -30,7 +29,7 @@ module.exports = ComponentView.extend({ if (rte && editable) { try { - this.activeRte = rte.attach(this, this.activeRte); + this.activeRte = rte.enable(this, this.activeRte); rte.focus(this, this.activeRte); } catch (err) { console.error(err); @@ -52,7 +51,7 @@ module.exports = ComponentView.extend({ if (rte && editable) { try { - rte.detach(this, this.activeRte); + rte.disable(this, this.activeRte); } catch (err) { console.error(err); } diff --git a/src/rich_text_editor/view/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js similarity index 99% rename from src/rich_text_editor/view/RichTextEditor.js rename to src/rich_text_editor/model/RichTextEditor.js index e737289558..f42d2a03b3 100644 --- a/src/rich_text_editor/view/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -37,7 +37,7 @@ const actions = { export default class RichTextEditor { constructor(settings = {}) { - const el = settings.element; + const el = settings.el; if (el[RTE_KEY]) { return el[RTE_KEY]; From b9f5c59ff3c7ffdddc1e20d6800ac5274ae353a7 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Oct 2017 02:06:46 +0200 Subject: [PATCH 120/143] Update RichTextEditor module --- src/dom_components/view/ComponentTextView.js | 10 +-- src/rich_text_editor/index.js | 94 +++++++------------- 2 files changed, 37 insertions(+), 67 deletions(-) diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index ba3ec68aa2..6239ef75b8 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -19,11 +19,10 @@ module.exports = ComponentView.extend({ }, /** - * Enable the component to be editable - * @param {Event} e + * Enable element content editing * @private * */ - enableEditing(e) { + enableEditing() { const editable = this.model.get('editable'); const rte = this.rte; @@ -40,11 +39,10 @@ module.exports = ComponentView.extend({ }, /** - * Disable this component to be editable - * @param {Event} + * Disable element content editing * @private * */ - disableEditing(e) { + disableEditing() { const model = this.model; const editable = model.get('editable'); const rte = this.rte; diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 0bbbe9650a..e14a766c63 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -3,6 +3,7 @@ * * [get](#get) * * [getAll](#getall) * * [remove](#remove) + * * [getToolbarEl](#gettoolbarel) * * This module allows to customize the toolbar of the Rich Text Editor and use commands from the HTML Editing APIs. * For more info about HTML Editing APIs check here: @@ -21,16 +22,17 @@ * http://www.quirksmode.org/dom/execCommand.html * @module RichTextEditor */ -const $ = Backbone.$; +import RichTextEditor from './model/RichTextEditor'; +import {on, off} from 'utils/mixins' module.exports = () => { - var c = {}, + let config = {}, defaults = require('./config/config'), rte = require('./view/TextEditorView'), CommandButtons = require('./model/CommandButtons'), CommandButtonsView = require('./view/CommandButtonsView'); const $ = require('backbone').$; - let toolbar, commands; + let toolbar, commands, lastEl; return { @@ -45,27 +47,30 @@ module.exports = () => { /** * Initialize module. Automatically called with a new instance of the editor - * @param {Object} config Configurations + * @param {Object} opts Options * @private */ - init(config) { - c = config || {}; + init(opts) { + config = opts || {}; for (let name in defaults) { - if (!(name in c)) { - c[name] = defaults[name]; + if (!(name in config)) { + config[name] = defaults[name]; } } - const ppfx = c.pStylePrefix; + const ppfx = config.pStylePrefix; if (ppfx) { - c.stylePrefix = ppfx + c.stylePrefix; + config.stylePrefix = ppfx + config.stylePrefix; } toolbar = document.createElement('div'); toolbar.className = `${ppfx}rte-toolbar`; + //Avoid closing on toolbar clicking + on(toolbar, 'mousedown', e => e.stopPropagation()); + /* commands = new CommandButtons(c.commands); toolbar = new CommandButtonsView({ @@ -133,12 +138,12 @@ module.exports = () => { */ udpatePosition() { var u = 'px'; - var canvas = c.em.get('Canvas'); - var pos = canvas.getTargetToElementDim(toolbar.el, this.lastEl, { + var canvas = config.em.get('Canvas'); + var pos = canvas.getTargetToElementDim(toolbar.el, lastEl, { event: 'rteToolbarPosUpdate', }); - if (c.adjustToolbar) { + if (config.adjustToolbar) { // Move the toolbar down when the top canvas edge is reached if (pos.top <= pos.canvasTop) { pos.top = pos.elementTop + pos.elementHeight; @@ -151,26 +156,19 @@ module.exports = () => { }, /** - * Bind rich text editor to the element + * Enable rich text editor on the element * @param {View} view * @param {Object} rte The instance of already defined RTE * @private * */ - attach(view, rte) { - const em = c.em; - // lastEl will be used to place the RTE toolbar - this.lastEl = view.el; - var el = view.getChildrenContainer(); - var customRte = this.customRte; - - // If a custom RTE is defined - if (customRte) { - rte = customRte.enable(el, rte); - } else { - $(el).wysiwyg({}).focus(); - } + enable(view, rte) { + lastEl = view.el; + const em = config.em; + const el = view.getChildrenContainer(); + const customRte = this.customRte; - this.show(); + rte = customRte ? customRte.enable(el, rte) : new RichTextEditor({el}); + toolbar.style.display = ''; if (em) { setTimeout(this.udpatePosition.bind(this), 0); @@ -181,8 +179,6 @@ module.exports = () => { em.on('canvasScroll', this.udpatePosition, this); } - //Avoid closing edit mode clicking on toolbar - toolbar.$el.on('mousedown', this.disableProp); return rte; }, @@ -192,17 +188,17 @@ module.exports = () => { * @param {Object} rte The instance of already defined RTE * @private * */ - detach(view, rte) { - var customRte = this.customRte; + disable(view, rte) { + const customRte = this.customRte; var el = view.getChildrenContainer(); + if (customRte) { - view.model.set('content', el.innerHTML); customRte.disable(el, rte); } else { - $(el).wysiwyg('destroy'); + rte.disable(); } - this.hide(); - toolbar.$el.off('mousedown', this.disableProp); + + toolbar.style.display = 'none'; }, /** @@ -223,31 +219,7 @@ module.exports = () => { }, /** - * Show the toolbar - * @private - * */ - show() { - toolbar.style.display = ''; - }, - - /** - * Hide the toolbar - * @private - * */ - hide() { - toolbar.style.display = 'none'; - }, - - /** - * Isolate the disable propagation method - * @private - * */ - disableProp(e) { - e.stopPropagation(); - }, - - /** - * Return toolbar element + * Return the toolbar element * @return {HTMLElement} * @private */ From 7394bb42b8f4a7c2f0b453cd8e8c5dd9b2690bf2 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Oct 2017 02:17:00 +0200 Subject: [PATCH 121/143] Remove focus from the RTE module --- src/dom_components/view/ComponentTextView.js | 1 - src/rich_text_editor/index.js | 31 +++++--------------- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index 6239ef75b8..d48d7192a6 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -29,7 +29,6 @@ module.exports = ComponentView.extend({ if (rte && editable) { try { this.activeRte = rte.enable(this, this.activeRte); - rte.focus(this, this.activeRte); } catch (err) { console.error(err); } diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index e14a766c63..479c71975d 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -157,7 +157,7 @@ module.exports = () => { /** * Enable rich text editor on the element - * @param {View} view + * @param {View} view Component view * @param {Object} rte The instance of already defined RTE * @private * */ @@ -166,17 +166,17 @@ module.exports = () => { const em = config.em; const el = view.getChildrenContainer(); const customRte = this.customRte; + const actionbarContainer = toolbar; - rte = customRte ? customRte.enable(el, rte) : new RichTextEditor({el}); toolbar.style.display = ''; + rte = customRte ? customRte.enable(el, rte) : + new RichTextEditor({el, actionbarContainer}); if (em) { setTimeout(this.udpatePosition.bind(this), 0); - em.off('change:canvasOffset', this.udpatePosition, this); - em.on('change:canvasOffset', this.udpatePosition, this); - // Update position on scrolling - em.off('canvasScroll', this.udpatePosition, this); - em.on('canvasScroll', this.udpatePosition, this); + const event = 'change:canvasOffset canvasScroll'; + em.off(event, this.udpatePosition, this); + em.on(event, this.udpatePosition, this); } return rte; @@ -201,23 +201,6 @@ module.exports = () => { toolbar.style.display = 'none'; }, - /** - * Unbind rich text editor from the element - * @param {View} view - * @param {Object} rte The instance of already defined RTE - * @private - * */ - focus(view, rte) { - var customRte = this.customRte; - var el = view.getChildrenContainer(); - if (customRte) { - if(customRte.focus) - customRte.focus(el, rte); - } else { - this.attach(view); - } - }, - /** * Return the toolbar element * @return {HTMLElement} From d9eb5389e328239f743a91c7ed580b29b4bd184e Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Oct 2017 03:00:12 +0200 Subject: [PATCH 122/143] Prepare add action in RTE --- src/rich_text_editor/index.js | 52 ++++++++++++++++------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 479c71975d..f5f7bdc53a 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -26,13 +26,9 @@ import RichTextEditor from './model/RichTextEditor'; import {on, off} from 'utils/mixins' module.exports = () => { - let config = {}, - defaults = require('./config/config'), - rte = require('./view/TextEditorView'), - CommandButtons = require('./model/CommandButtons'), - CommandButtonsView = require('./view/CommandButtonsView'); - const $ = require('backbone').$; - let toolbar, commands, lastEl; + let config = {}; + const defaults = require('./config/config'); + let toolbar, actions, lastEl; return { @@ -50,8 +46,8 @@ module.exports = () => { * @param {Object} opts Options * @private */ - init(opts) { - config = opts || {}; + init(opts = {}) { + config = opts; for (let name in defaults) { if (!(name in config)) { @@ -65,6 +61,7 @@ module.exports = () => { config.stylePrefix = ppfx + config.stylePrefix; } + actions = config.actions || []; toolbar = document.createElement('div'); toolbar.className = `${ppfx}rte-toolbar`; @@ -88,29 +85,28 @@ module.exports = () => { }, /** - * Add a new command to the toolbar - * @param {string} command Command name - * @param {Object} opts Command options - * @return {Model} Added command + * Add a new action to the RTE toolbar + * @param {string} name Action name + * @param {Object} opts Action options * @example - * var cm = rte.add('bold', { - * title: 'Make bold', - * class: 'fa fa-bold', + * rte.add('bold', { + * icon: 'B', + * title: 'Bold', + * result: rte => rte.exec('bold') * }); - * // With arguments - * var cm = rte.add('fontSize', { - * title: 'Font size', - * options: [ - * {name: 'Big', value: 5}, - * {name: 'Normal', value: 3}, - * {name: 'Small', value: 1} - * ] + * rte.add('link', { + * icon: 'L', + * title: 'Link', + * result: rte => { + * const url = window.prompt('Enter the link URL') + * if (url) rte.exec('createLink', url) + * } * }); */ - add(command, opts) { - var obj = opts || {}; - obj.command = command; - return commands.add(obj); + add(name, opts = {}) { + opts.name = name; + actions.push(opts); + //gloabl.addAction(); }, /** From a3cc56016b56131762895417a03bc68fdf09a43a Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Oct 2017 21:32:42 +0200 Subject: [PATCH 123/143] Remove jquery from package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 73ba5ab5e3..fd4ef86294 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "codemirror": "^5.21.0", "codemirror-formatting": "^1.0.0", "font-awesome": "^4.7.0", - "jquery": "^3.1.1", "keymaster": "^1.6.2", "promise-polyfill": "^6.0.2", "spectrum-colorpicker": "^1.8.0", From b74c2f903fbd258759e96b124e71b6ea4d0a6be8 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Oct 2017 22:58:24 +0200 Subject: [PATCH 124/143] Update version and npmignore --- .npmignore | 1 - package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.npmignore b/.npmignore index 0e14b84bf5..2c8faf0ad6 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,3 @@ test index.html webpack.config.js -grapesjs-*.tgz diff --git a/package.json b/package.json index fd4ef86294..ee16bfaa88 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grapesjs", "description": "Free and Open Source Web Builder Framework", - "version": "0.12.5", + "version": "0.12.6", "author": "Artur Arseniev", "license": "BSD-3-Clause", "homepage": "http://grapesjs.com", From 152224fa1149a59926515e4bcc8781c16385a20a Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 11 Oct 2017 23:33:15 +0200 Subject: [PATCH 125/143] Create rte style --- dist/css/grapes.min.css | 2 +- src/rich_text_editor/index.js | 4 +-- src/rich_text_editor/model/RichTextEditor.js | 12 +++---- src/styles/scss/_gjs_rte.scss | 33 ++++++++++++++++++++ src/styles/scss/main.scss | 28 +---------------- 5 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 src/styles/scss/_gjs_rte.scss diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 2f99df5267..8fffbbaaf4 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,#gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,#gjs-rte-toolbar .gjs-rte-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:11px;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}#gjs-rte-toolbar .gjs-rte-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn.btn-info{background-color:rgba(0,0,0,0.2)}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,0.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,.gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,.gjs-rte-toolbar-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:11px;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-toolbar-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-toolbar-btn:last-child{border-right:none}.gjs-rte-toolbar-btn.btn-info{background-color:rgba(0,0,0,0.2)}.gjs-rte-toolbar-btn:hover{background-color:rgba(255,255,255,0.1)}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index f5f7bdc53a..025d9ddcf4 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -135,7 +135,7 @@ module.exports = () => { udpatePosition() { var u = 'px'; var canvas = config.em.get('Canvas'); - var pos = canvas.getTargetToElementDim(toolbar.el, lastEl, { + var pos = canvas.getTargetToElementDim(toolbar, lastEl, { event: 'rteToolbarPosUpdate', }); @@ -146,7 +146,7 @@ module.exports = () => { } } - var toolbarStyle = toolbar.el.style; + const toolbarStyle = toolbar.style; toolbarStyle.top = pos.top + u; toolbarStyle.left = pos.left + u; }, diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index f42d2a03b3..086f7a41e9 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -67,6 +67,8 @@ export default class RichTextEditor { const classes = settings.classes; let actionbar = settings.actionbar; this.actionbar = actionbar; + this.settings = settings; + this.classes = classes; if (!actionbar) { const actionbarCont = settings.actionbarContainer; @@ -77,8 +79,6 @@ export default class RichTextEditor { settings.actions.forEach(action => this.addAction(action)) } - this.settings = settings; - this.classes = classes; settings.styleWithCSS && this.exec('styleWithCSS'); this.syncActions(); @@ -86,13 +86,13 @@ export default class RichTextEditor { } enable() { - this.actionbar().style.display = ''; + this.actionbarEl().style.display = ''; this.el.contentEditable = true; this.syncActions(); } disable() { - this.actionbar().style.display = 'none'; + this.actionbarEl().style.display = 'none'; this.el.contentEditable = false; } @@ -123,7 +123,7 @@ export default class RichTextEditor { btn.appendChild(icon); } - this.actionbar().appendChild(btn); + this.actionbarEl().appendChild(btn); } /** @@ -155,7 +155,7 @@ export default class RichTextEditor { * Get the actionbar element * @return {HTMLElement} */ - actionbar() { + actionbarEl() { return this.actionbar; } diff --git a/src/styles/scss/_gjs_rte.scss b/src/styles/scss/_gjs_rte.scss new file mode 100644 index 0000000000..cc5bb5cd42 --- /dev/null +++ b/src/styles/scss/_gjs_rte.scss @@ -0,0 +1,33 @@ +.#{$rte-prefix}toolbar { + @extend .#{$app-prefix}bg-main; + + display: none; + border: 1px solid $mainDkColor; + position: absolute; + border-radius: 3px; + z-index: 10; + + &-btn { + @extend .#{$app-prefix}color-main; + + display: inline-block; + padding: 5px; + min-width: 25px; + border-right: 1px solid $mainDkColor; + text-align: center; + cursor: pointer; + outline: none; + + &:last-child { + border-right: none; + } + + &.btn-info { + background-color: $mainDkColor; + } + + &:hover { + background-color: $mainLhColor; + } + } +} diff --git a/src/styles/scss/main.scss b/src/styles/scss/main.scss index eb107ea97c..1ce74afd7d 100644 --- a/src/styles/scss/main.scss +++ b/src/styles/scss/main.scss @@ -769,33 +769,7 @@ ol.example li.placeholder:before {position: absolute;} /*************RTE****************/ -##{$rte-prefix}toolbar { - @extend .#{$app-prefix}bg-main; - display: none; - border: 1px solid $mainDkColor; - position: absolute; - border-radius: 3px; - z-index: 10; - - .#{$rte-prefix}btn { - @extend .#{$app-prefix}color-main; - display: inline-block; - padding: 5px; - min-width: 25px; - border-right: 1px solid $mainDkColor; - text-align: center; - cursor: pointer; - outline: none; - - &:last-child{ border-right:none; } - &.btn-info{ background-color: $mainDkColor;} - &:hover { background-color: $mainLhColor;} - } - - select{ - height: 16px; - } -} +@import 'gjs_rte'; /********* Spectrum **********/ From 3635a8442e2504310802228ddd022b110f055445 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 00:00:30 +0200 Subject: [PATCH 126/143] Update rte styles --- dist/css/grapes.min.css | 2 +- src/rich_text_editor/index.js | 18 +++++++++----- src/rich_text_editor/model/RichTextEditor.js | 4 +++- src/styles/scss/_gjs_rte.scss | 25 +++++++++++++------- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 8fffbbaaf4..a76c4abfd3 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,.gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,.gjs-rte-toolbar-btn{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:11px;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-toolbar-btn{display:inline-block;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-toolbar-btn:last-child{border-right:none}.gjs-rte-toolbar-btn.btn-info{background-color:rgba(0,0,0,0.2)}.gjs-rte-toolbar-btn:hover{background-color:rgba(255,255,255,0.1)}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,.gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,.gjs-rte-action{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name,.gjs-rte-toolbar{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:11px;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action.btn-info{background-color:rgba(0,0,0,0.2)}.gjs-rte-action:hover{background-color:rgba(255,255,255,0.1)}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 025d9ddcf4..0478e413c4 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -61,6 +61,7 @@ module.exports = () => { config.stylePrefix = ppfx + config.stylePrefix; } + this.pfx = config.stylePrefix; actions = config.actions || []; toolbar = document.createElement('div'); toolbar.className = `${ppfx}rte-toolbar`; @@ -133,9 +134,9 @@ module.exports = () => { * @private */ udpatePosition() { - var u = 'px'; - var canvas = config.em.get('Canvas'); - var pos = canvas.getTargetToElementDim(toolbar, lastEl, { + const un = 'px'; + const canvas = config.em.get('Canvas'); + const pos = canvas.getTargetToElementDim(toolbar, lastEl, { event: 'rteToolbarPosUpdate', }); @@ -147,8 +148,8 @@ module.exports = () => { } const toolbarStyle = toolbar.style; - toolbarStyle.top = pos.top + u; - toolbarStyle.left = pos.left + u; + toolbarStyle.top = pos.top + un; + toolbarStyle.left = pos.left + un; }, /** @@ -160,13 +161,18 @@ module.exports = () => { enable(view, rte) { lastEl = view.el; const em = config.em; + const pfx = this.pfx; const el = view.getChildrenContainer(); const customRte = this.customRte; const actionbarContainer = toolbar; + const classes = { + actionbar: `${pfx}actionbar`, + button: `${pfx}action`, + }; toolbar.style.display = ''; rte = customRte ? customRte.enable(el, rte) : - new RichTextEditor({el, actionbarContainer}); + new RichTextEditor({el, actionbarContainer, classes}).enable(); if (em) { setTimeout(this.udpatePosition.bind(this), 0); diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index 086f7a41e9..cb67d9dd88 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -61,7 +61,7 @@ export default class RichTextEditor { settings.classes = { ...{ actionbar: 'actionbar', - button: 'button', + button: 'action', }, ...settings.classes}; const classes = settings.classes; @@ -89,11 +89,13 @@ export default class RichTextEditor { this.actionbarEl().style.display = ''; this.el.contentEditable = true; this.syncActions(); + return this; } disable() { this.actionbarEl().style.display = 'none'; this.el.contentEditable = false; + return this; } /** diff --git a/src/styles/scss/_gjs_rte.scss b/src/styles/scss/_gjs_rte.scss index cc5bb5cd42..29342cd1e3 100644 --- a/src/styles/scss/_gjs_rte.scss +++ b/src/styles/scss/_gjs_rte.scss @@ -1,16 +1,23 @@ -.#{$rte-prefix}toolbar { - @extend .#{$app-prefix}bg-main; +.#{$rte-prefix} { + &toolbar { + @extend .#{$app-prefix}bg-main; + @extend .#{$app-prefix}no-user-select; - display: none; - border: 1px solid $mainDkColor; - position: absolute; - border-radius: 3px; - z-index: 10; + border: 1px solid $mainDkColor; + position: absolute; + border-radius: 3px; + z-index: 10; + } + + &actionbar { + display: flex; + } - &-btn { + &action { @extend .#{$app-prefix}color-main; - display: inline-block; + display: flex; + align-items: center; padding: 5px; min-width: 25px; border-right: 1px solid $mainDkColor; From 8f7f80bc726b58d71033d3fe67029005a97ebbcd Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 00:26:48 +0200 Subject: [PATCH 127/143] Make text children not editable --- src/dom_components/view/ComponentTextView.js | 1 + src/rich_text_editor/index.js | 7 ++++++- src/rich_text_editor/model/RichTextEditor.js | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index d48d7192a6..491a990e97 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -65,6 +65,7 @@ module.exports = ComponentView.extend({ } else { const clean = model => { model.set({ + editable: 0, highlightable: 0, removable: 0, draggable: 0, diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 0478e413c4..08267d12d2 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -164,6 +164,7 @@ module.exports = () => { const pfx = this.pfx; const el = view.getChildrenContainer(); const customRte = this.customRte; + const actionbar = this.actionbar; const actionbarContainer = toolbar; const classes = { actionbar: `${pfx}actionbar`, @@ -172,7 +173,11 @@ module.exports = () => { toolbar.style.display = ''; rte = customRte ? customRte.enable(el, rte) : - new RichTextEditor({el, actionbarContainer, classes}).enable(); + new RichTextEditor({el, actionbarContainer, classes, actionbar}).enable(); + + if (rte.actionbar) { + this.actionbar = rte.actionbar; + } if (em) { setTimeout(this.udpatePosition.bind(this), 0); diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index cb67d9dd88..4fb97a8a6b 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -25,7 +25,7 @@ const actions = { result: (rte) => rte.exec('strikeThrough') }, link: { - icon: '🔗', + icon: 'Link', title: 'Link', result: (rte) => { const url = window.prompt('Enter the link URL') @@ -43,8 +43,8 @@ export default class RichTextEditor { return el[RTE_KEY]; } - el.oninput = e => settings.onChange && settings.onChange(e.target.innerHTML); - el.onkeydown = e => (e.which === 9 && e.preventDefault()); + //el.oninput = e => settings.onChange && settings.onChange(e.target.innerHTML); + //el.onkeydown = e => (e.which === 9 && e.preventDefault()); el[RTE_KEY] = this; this.el = el; this.doc = el.ownerDocument; From a30809308e08ebfe29f7518e025af86ce1cb9c15 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 01:08:47 +0200 Subject: [PATCH 128/143] Add attributes to rte actions --- dist/css/grapes.min.css | 2 +- src/rich_text_editor/model/RichTextEditor.js | 21 +++++++++++++------- src/styles/scss/_gjs_rte.scss | 1 + 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index a76c4abfd3..48536baa2d 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,.gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,.gjs-rte-action{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name,.gjs-rte-toolbar{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:11px;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action.btn-info{background-color:rgba(0,0,0,0.2)}.gjs-rte-action:hover{background-color:rgba(255,255,255,0.1)}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,.gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,.gjs-rte-action{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name,.gjs-rte-toolbar{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:11px;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;justify-content:center;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action.btn-info{background-color:rgba(0,0,0,0.2)}.gjs-rte-action:hover{background-color:rgba(255,255,255,0.1)}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index 4fb97a8a6b..e17df20fba 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -6,27 +6,30 @@ const RTE_KEY = '_rte'; const actions = { bold: { icon: 'B', - title: 'Bold', + attributes: {title: 'Bold'}, result: (rte) => rte.exec('bold') }, italic: { icon: 'I', - title: 'Italic', + attributes: {title: 'Italic'}, result: (rte) => rte.exec('italic') }, underline: { icon: 'U', - title: 'Underline', + attributes: {title: 'Underline'}, result: (rte) => rte.exec('underline') }, strikethrough: { icon: 'S', - title: 'Strike-through', + attributes: {title: 'Strike-through'}, result: (rte) => rte.exec('strikeThrough') }, link: { - icon: 'Link', - title: 'Link', + icon: ``, + attributes: { + style: 'font-size:1.4rem;padding:0 4px 2px;', + title: 'Link', + }, result: (rte) => { const url = window.prompt('Enter the link URL') if (url) rte.exec('createLink', url)//class="link" @@ -115,10 +118,14 @@ export default class RichTextEditor { addAction(action) { const btn = document.createElement('span'); const icon = action.icon; + const attr = action.attributes || {}; btn.className = this.classes.button; - btn.title = action.title; action.btn = btn; + for (let key in attr) { + btn.setAttribute(key, attr[key]); + } + if (typeof icon == 'string') { btn.innerHTML = icon; } else { diff --git a/src/styles/scss/_gjs_rte.scss b/src/styles/scss/_gjs_rte.scss index 29342cd1e3..801a99ab15 100644 --- a/src/styles/scss/_gjs_rte.scss +++ b/src/styles/scss/_gjs_rte.scss @@ -18,6 +18,7 @@ display: flex; align-items: center; + justify-content: center; padding: 5px; min-width: 25px; border-right: 1px solid $mainDkColor; From 3b2991dba1008878189a20a85d31d450a6d329e8 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 02:27:27 +0200 Subject: [PATCH 129/143] Update insertHTML in RichTextEditor --- src/rich_text_editor/index.js | 8 -------- src/rich_text_editor/model/RichTextEditor.js | 21 ++++++++++---------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 08267d12d2..0414774726 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -68,14 +68,6 @@ module.exports = () => { //Avoid closing on toolbar clicking on(toolbar, 'mousedown', e => e.stopPropagation()); - - /* - commands = new CommandButtons(c.commands); - toolbar = new CommandButtonsView({ - collection: commands, - config: c, - }); - */ return this; }, diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index e17df20fba..00e816cb4f 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -30,10 +30,7 @@ const actions = { style: 'font-size:1.4rem;padding:0 4px 2px;', title: 'Link', }, - result: (rte) => { - const url = window.prompt('Enter the link URL') - if (url) rte.exec('createLink', url)//class="link" - } + result: (rte) => rte.insertHTML(`${rte.selection()}`) }, } @@ -148,7 +145,7 @@ export default class RichTextEditor { * @return {Selection} */ selection() { - this.doc.getSelection() + return this.doc.getSelection() } /** @@ -174,21 +171,23 @@ export default class RichTextEditor { * @param {string} value HTML string */ insertHTML(value) { + let lastNode; const doc = this.doc; const sel = doc.getSelection(); if (sel && sel.rangeCount) { const node = doc.createElement('div'); const range = sel.getRangeAt(0); - range.collapse(true); - node.outerHTML = value.replace('${content}', sel); - range.insertNode(node); + range.deleteContents(); + node.innerHTML = value; + Array.prototype.slice.call(node.childNodes).forEach(nd => { + range.insertNode(nd); + lastNode = nd; + }) - // Move the caret immediately after the inserted node - range.setStartAfter(node); - range.collapse(true); sel.removeAllRanges(); sel.addRange(range); + this.el.focus(); } } } From 76af3011f191717b316d353e855a822a203274f2 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 02:59:01 +0200 Subject: [PATCH 130/143] Make the RTE understand active commands --- dist/css/grapes.min.css | 2 +- src/rich_text_editor/index.js | 1 + src/rich_text_editor/model/RichTextEditor.js | 28 ++++++++++++++++- src/styles/scss/_gjs_rte.scss | 8 ++--- src/styles/scss/main.scss | 33 +------------------- 5 files changed, 34 insertions(+), 38 deletions(-) diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 48536baa2d..b4404e9a11 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -1,4 +1,4 @@ .sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid black;background:white;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#fff), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-moz-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-o-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:-ms-linear-gradient(left, #fff, rgba(204,154,129,0));background-image:linear-gradient(to right, #fff, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000), to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-o-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom, #000, rgba(204,154,129,0));background-image:linear-gradient(to top, #000, rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.sp-hue{background:-moz-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-ms-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-o-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:-webkit-gradient(linear, left top, left bottom, from(red), color-stop(0.17, #ff0), color-stop(0.33, lime), color-stop(0.5, cyan), color-stop(0.67, blue), color-stop(0.83, #f0f), to(red));background:-webkit-linear-gradient(top, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%);background:linear-gradient(to bottom, red 0%, #ff0 17%, lime 33%, cyan 50%, blue 67%, #f0f 83%, red 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}.sp-cf{*zoom:1}@media (max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:white;opacity:.8}.sp-container{border-radius:0;background-color:#ECECEC;border:solid 1px #f0c49B;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:transparent;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px transparent}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;*zoom:1;*display:inline;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#F0C49B;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{*width:220px;max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eeeeee;background-image:-webkit-linear-gradient(top, #eee, #ccc);background-image:-moz-linear-gradient(top, #eee, #ccc);background-image:-ms-linear-gradient(top, #eee, #ccc);background-image:-o-linear-gradient(top, #eee, #ccc);background-image:linear-gradient(to bottom, #eee, #ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#dddddd;background-image:-webkit-linear-gradient(top, #ddd, #bbb);background-image:-moz-linear-gradient(top, #ddd, #bbb);background-image:-ms-linear-gradient(top, #ddd, #bbb);background-image:-o-linear-gradient(top, #ddd, #bbb);background-image:linear-gradient(to bottom, #ddd, #bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-moz-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-ms-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;-o-box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;box-shadow:inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,.gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,.gjs-rte-action{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name,.gjs-rte-toolbar{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}#commands.panel{min-width:35px;height:100%;z-index:3}#options.panel{z-index:4;bottom:0}#views.panel{width:16.5%;font-weight:lighter;color:#ddd;right:0;top:0;z-index:3;height:100%;padding:0}#views.panel .c{height:100%}#commands.panel,#options.panel{width:3.5%;left:0}#options .c{display:table;margin:0 auto}body.dragging,body.dragging *{cursor:move !important}.dragged{position:absolute;opacity:.5;filter:alpha(opacity=50);z-index:2000}ol.example li.placeholder{position:relative}ol.example li.placeholder:before{position:absolute}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:11px;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;justify-content:center;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action.btn-info{background-color:rgba(0,0,0,0.2)}.gjs-rte-action:hover{background-color:rgba(255,255,255,0.1)}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} + */@font-face{font-family:'FontAwesome';src:url("../fonts/fontawesome-webfont.eot?v=4.7.0");src:url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:""}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-signing:before,.fa-sign-language:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-vcard:before,.fa-address-card:before{content:""}.fa-vcard-o:before,.fa-address-card-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{0%{}50%{background-color:transparent}100%{}}@-webkit-keyframes blink{0%{}50%{background-color:transparent}100%{}}@keyframes blink{0%{}50%{background-color:transparent}100%{}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:#f00}.cm-invalidchar{color:#f00}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}@font-face{font-family:'font3336';src:url("../fonts/main-fonts.eot?v=20");src:url("../fonts/main-fonts.woff?v=20") format("woff"),url("../fonts/main-fonts.ttf?v=20") format("truetype"),url("../fonts/main-fonts.svg?v=20") format("svg"),url("../fonts/main-fonts.eot?v=20") format("embedded-opentype");font-weight:normal;font-style:normal}.gjs-bg-main,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-sm-unit option,.gjs-field-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-block,.gjs-nv-item .gjs-nv-title-c,.gjs-mdl-dialog,.gjs-rte-toolbar,.sp-container{background-color:#444}.gjs-color-main,.gjs-off-prv,.gjs-pn-panel,.gjs-pn-btn,.gjs-btnt,.gjs-btn-prim,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-block-svg-path,.gjs-mdl-dialog,.gjs-rte-action{color:#ddd;fill:#ddd}.gjs-color-active,.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:5em}.gjs-f-b1::before{content:'Q'}.gjs-f-b2::before{content:'W'}.gjs-f-b3::before{content:'E'}.gjs-f-b37::before{content:'R'}.gjs-f-hero::before{content:'T'}.gjs-f-h1p::before{content:'y'}.gjs-f-3ba::before{content:'u'}.gjs-f-image::before{content:'I'}.gjs-f-text::before{content:'o'}.gjs-f-quo::before{content:'p'}.gjs-f-button::before{content:'B'}.gjs-f-divider::before{content:'D'}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.opac50,.gjs-clm-tags #gjs-clm-close{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-grabbing,.gjs-grabbing *,.gjs-nav-comp-name,.gjs-rte-toolbar{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-resizer-c,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,0.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,0.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-com-no-select,.gjs-com-no-select img,.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title,.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-editor{font-family:Helvetica,sans-serif;background-color:#444;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-nv-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,0.2);font-size:13px;font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-trt-trait{display:flex;justify-content:start;padding:5px 10px;font-size:0.75em;font-weight:lighter}.gjs-trt-trait .gjs-label{width:30%;text-align:left}.gjs-trt-trait .gjs-field{width:70%}.gjs-cv-canvas{background-color:rgba(0,0,0,0.15);box-sizing:border-box;position:absolute;width:85%;height:100%;bottom:0;left:0;overflow:hidden;padding-top:40px;z-index:1}.gjs-cv-canvas>iframe{height:100%;outline:medium none;width:100%;border:none;margin:0 auto;display:block}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:3px solid #3b97e3}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:none}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{transition:width 0.35s ease}.gjs-toolbar{position:absolute;background-color:#3b97e3;color:white;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:0.8rem;cursor:pointer}.gjs-resizer-c{position:absolute;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:yellow}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,0.2);border:none;opacity:0;transition:opacity 0.25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-mdl-dialog .gjs-mdl-btn-close,.gjs-am-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover,.gjs-am-close:hover{opacity:.7;filter:alpha(opacity=70)}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-cv-canvas .gjs-comp-selected{outline:3px solid #3b97e3 !important}*.gjs-com-hover,div.gjs-com-hover{outline:1px solid #3b97e3}*.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:2px solid #dd3636;opacity:.5;filter:alpha(opacity=50)}*.gjs-com-hover-move,div.gjs-com-hover-move{outline:3px solid #ffca6f}.gjs-com-badge,.gjs-com-badge-red,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-nv-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-nv-placeholder{border-style:solid !important;border-color:#62c462;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-nv-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,0.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;box-sizing:border-box;text-align:center;z-index:3}.gjs-pn-panel#gjs-pn-commands,.gjs-pn-panel#gjs-pn-options2{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-panel#gjs-pn-options{right:15%;top:0}.gjs-pn-panel#gjs-pn-options2{bottom:150px;height:auto}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(0,0,0,0.2);right:0;width:15%;z-index:4}.gjs-pn-panel#gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,0.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-pn-btn,.gjs-btnt{box-sizing:border-box;height:30px;width:30px;line-height:21px;background-color:transparent;border:none;font-size:18px;margin-right:5px;border-radius:2px;cursor:pointer;padding:5px;position:relative}.gjs-pn-btn.gjs-pn-active,.gjs-btnt.gjs-pn-active{background-color:rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.25) inset}.gjs-pn-btn>.gjs-pn-arrow-rd,.gjs-btnt>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,0.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-pn-btn>.gjs-pn-buttons,.gjs-btnt>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible,.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-pn-btn>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l{border-bottom:5px solid transparent;border-right:5px solid #444;border-top:5px solid transparent;left:-5px;top:15px;position:absolute}.btn.expand,.gjs-layers .gjs-nv-item .expand#gjs-nv-btn-eye{background-image:none}.gjs-comp-image-placeholder{display:block;background-color:#f5f5f5;color:#777;height:50px;width:50px;line-height:50px;outline:3px solid #ffca6f;outline-offset:-3px;text-align:center;font-size:16.66667px;cursor:pointer}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field-range{flex:9 1 auto}.gjs-field{background-color:rgba(0,0,0,0.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative;color:rgba(255,255,255,0.7)}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field textarea{resize:vertical}.gjs-field option{padding:3px 0}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,0.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field .gjs-field-number{padding-right:30px}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,0.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px;position:absolute;top:0}.gjs-field-radio{float:left;overflow:hidden;padding:0;width:auto}.gjs-field-checkbox{padding:0;width:auto !important}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,0.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,0.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,0.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,0.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,0.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:transparent;border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,0.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,0.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{background-color:rgba(255,255,255,0.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,0.1)}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px;cursor:pointer}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,0.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:0.7em;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-sm-sector.gjs-sm-open,.gjs-sm-open.gjs-clm-tags,.gjs-block-category.gjs-open{border-bottom:1px solid rgba(0,0,0,0.25)}.gjs-category-title,.gjs-sm-sector .gjs-sm-title,.gjs-clm-tags .gjs-sm-title,.gjs-block-category .gjs-title,.gjs-nv-title{font-weight:lighter;background-color:rgba(0,0,0,0.1);font-size:13px;letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,0.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{font-size:1rem;line-height:0;cursor:pointer}.gjs-sm-header{font-size:11px;font-weight:lighter;padding:10px}.gjs-sm-properties{font-size:11px;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0}.gjs-sm-close-btn,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.2;filter:alpha(opacity=20)}.gjs-sm-close-btn:hover,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-sm-sector,.gjs-clm-tags{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector #gjs-sm-caret,.gjs-clm-tags #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-sm-sector .gjs-sm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-clm-tags .gjs-clm-field{width:100%;position:relative}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{background-color:transparent;color:rgba(255,255,255,0.7);border:none;width:100%}.gjs-sm-sector .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field input{box-sizing:border-box}.gjs-sm-sector .gjs-sm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-clm-tags .gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-sector .gjs-sm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-clm-field select::-ms-expand{display:none}.gjs-sm-sector .gjs-sm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-clm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,0.7)}.gjs-sm-sector .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-clm-tags .gjs-clm-field select:focus{outline:none}.gjs-sm-sector .gjs-sm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,0.7);cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,0.7);top:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,0.7);bottom:4px}.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{background-color:rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.1);box-shadow:1px 1px 0 rgba(255,255,255,0.1);color:rgba(255,255,255,0.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-clm-tags .gjs-clm-select{padding:0}.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-clm-tags .gjs-clm-select select{height:20px}.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-clm-tags .gjs-clm-select option{padding:3px 0}.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,0.1);border:1px solid rgba(0,0,0,0.25)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,0.2)}.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-sector .gjs-sm-list .gjs-sm-el,.gjs-clm-tags .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover,.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,0.2)}.gjs-sm-sector .gjs-sm-slider .gjs-field-integer,.gjs-clm-tags .gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-sector .gjs-sm-property,.gjs-clm-tags .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-radio,.gjs-clm-tags .gjs-sm-property.gjs-sm-radio,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-slider,.gjs-clm-tags .gjs-sm-property.gjs-sm-slider,.gjs-sm-sector .gjs-sm-property.gjs-sm-color,.gjs-clm-tags .gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,0.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,0.2),1px 1px 0 rgba(43,43,43,0.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,0.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c,.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,0.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,0.05);padding:3px 20px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{top:-5px;display:block}.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-sm-sector .gjs-sm-property .gjs-sm-layers,.gjs-clm-tags .gjs-sm-property .gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,0.055);border-radius:2px;margin:2px 0;padding:7px;position:relative;cursor:pointer}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:white;height:100%;width:100%;background-size:cover !important}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,0.12)}.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties,.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;font-size:22px;line-height:10px;position:absolute;right:0;top:-17px;opacity:0.75}.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-sector .gjs-sm-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg,.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-field-colorp-c,.gjs-clm-tags .gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-sector .gjs-sm-color-picker,.gjs-clm-tags .gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,0.2);border-radius:1px}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-label,.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;padding:1em;box-sizing:border-box;height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;display:flex;flex-direction:column;justify-content:flex-end;border:1px solid rgba(0,0,0,0.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,0.15);transition:all 0.2s ease 0s;transition-property:box-shadow, color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,0.15)}.gjs-block-svg{width:61%}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:0.65rem;font-weight:normal;font-family:Helvetica, sans-serif}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-nv-selected-parent{border:1px solid #ffca6f}.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-nv-placeholder{width:100%;position:absolute}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-layers #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-layers .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,0.1)}.gjs-layers .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-layers .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-layers .gjs-nv-item #gjs-nv-btn-eye{height:auto !important;width:auto !important;font-size:13px;left:0;top:0;padding:7px 5px 7px 10px;position:absolute;cursor:pointer;z-index:1}.gjs-nv-item #gjs-nv-caret{font-size:7px;width:8px;padding:2px;cursor:pointer;position:absolute;left:-9px;top:6px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-nv-title-inn{position:relative}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,0.2)}.gjs-nv-item>.gjs-nv-children{display:none}.gjs-nv-item.open>.gjs-nv-children{display:block}.gjs-nv-item>.gjs-nv-no-chld>#gjs-nv-caret::before{content:''}.gjs-nv-no-chld>.gjs-nv-title-inn>#gjs-nv-caret{display:none}.gjs-nv-item>#gjs-nv-move{position:absolute;cursor:move;font-size:12px;right:0;top:0;padding:7px 10px 7px 5px}.gjs-nv-selected .gjs-nv-title{background-color:rgba(255,255,255,0.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:9px;position:absolute;left:-27px;top:1px;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-nav-item-edit:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title-c:hover .gjs-nv-nav-item-edit{visibility:visible;cursor:pointer}.gjs-nav-comp-name{padding:5px;box-sizing:content-box}.gjs-clm-tags{font-size:11px;padding:10px 5px}.gjs-clm-tags #gjs-clm-label,.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-status-c{float:right}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px}.gjs-clm-tags #gjs-clm-tags-c{display:inline-block;vertical-align:top}.gjs-clm-tags #gjs-clm-add-tag{background-color:rgba(255,255,255,0.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,0.2) inset;border:1px solid rgba(0,0,0,0.15);cursor:pointer}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags .gjs-clm-tag{background-color:#804f7b;border:1px solid #5a3857;box-shadow:1px 1px #9c6196 inset;text-shadow:1px 1px #6a4166;display:inline-block;border-radius:3px;margin:0 3px 3px 0;padding:4px;cursor:default}.gjs-clm-tags #gjs-clm-close{font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,0.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:.7;filter:alpha(opacity=70)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,0.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{cursor:text}.gjs-clm-tags #gjs-clm-tag-label input{width:auto;padding:0 4px}.gjs-mdl-backlayer{background-color:#000;position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{font-family:Helvetica,sans-serif;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,0.05);animation:gjs-slide-down 0.215s;margin:30px auto 0;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-dialog .gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down 0.216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,0.2);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,0.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity 0.25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,0.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,0.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,0.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,0.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,0.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px;border-left:1px solid rgba(255,255,255,0.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,0.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{border:1px solid rgba(0,0,0,0.2);position:absolute;border-radius:3px;z-index:10}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;justify-content:center;padding:5px;min-width:25px;border-right:1px solid rgba(0,0,0,0.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action:hover{background-color:rgba(255,255,255,0.1)}.gjs-rte-active{background-color:rgba(0,0,0,0.2)}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-inner,.sp-alpha-handle{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,0.2);box-shadow:0 0 7px rgba(0,0,0,0.2);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,0.2)}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333333}.sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:transparent;box-shadow:0 0 0 1px #111}.sp-button-container{float:none;width:100%;position:relative;text-align:right}.sp-container button,.sp-container button:hover,.sp-container button:active{background:rgba(0,0,0,0.2);border-color:rgba(0,0,0,0.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.sp-palette .sp-thumb-el,.sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,0.9)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,0.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}} diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 0414774726..6803c09ee9 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -161,6 +161,7 @@ module.exports = () => { const classes = { actionbar: `${pfx}actionbar`, button: `${pfx}action`, + active: `${pfx}active`, }; toolbar.style.display = ''; diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index 00e816cb4f..deed0b4570 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -1,25 +1,31 @@ // The initial version of this RTE was borrowed from https://github.com/jaredreich/pell // and adapted to the GrapesJS's need +import {on, off} from 'utils/mixins' + const RTE_KEY = '_rte'; const actions = { bold: { + name: 'bold', icon: 'B', attributes: {title: 'Bold'}, result: (rte) => rte.exec('bold') }, italic: { + name: 'italic', icon: 'I', attributes: {title: 'Italic'}, result: (rte) => rte.exec('italic') }, underline: { + name: 'underline', icon: 'U', attributes: {title: 'Underline'}, result: (rte) => rte.exec('underline') }, strikethrough: { + name: 'strikethrough', icon: 'S', attributes: {title: 'Strike-through'}, result: (rte) => rte.exec('strikeThrough') @@ -48,6 +54,7 @@ export default class RichTextEditor { el[RTE_KEY] = this; this.el = el; this.doc = el.ownerDocument; + this.updateActiveActions = this.updateActiveActions.bind(this); settings.actions = settings.actions ? settings.actions.map(action => { @@ -62,6 +69,7 @@ export default class RichTextEditor { settings.classes = { ...{ actionbar: 'actionbar', button: 'action', + active: 'active', }, ...settings.classes}; const classes = settings.classes; @@ -85,16 +93,31 @@ export default class RichTextEditor { return this; } + updateActiveActions() { + this.actions().forEach(action => { + const btn = action.btn; + const active = this.classes.active; + btn.className = btn.className.replace(active, '').trim(); + + if (this.doc.queryCommandState(action.name)) { + btn.className += ` ${active}`; + } + }) + } + enable() { this.actionbarEl().style.display = ''; this.el.contentEditable = true; + on(this.el, 'mouseup keyup', this.updateActiveActions) this.syncActions(); + this.el.focus(); return this; } disable() { this.actionbarEl().style.display = 'none'; this.el.contentEditable = false; + off(this.el, 'mouseup keyup', this.updateActiveActions) return this; } @@ -104,7 +127,10 @@ export default class RichTextEditor { syncActions() { this.actions().forEach(action => { const event = action.event || 'click'; - action.btn[`on${event}`] = e => action.result(this); + action.btn[`on${event}`] = e => { + action.result(this); + this.updateActiveActions(); + }; }) } diff --git a/src/styles/scss/_gjs_rte.scss b/src/styles/scss/_gjs_rte.scss index 801a99ab15..f531448339 100644 --- a/src/styles/scss/_gjs_rte.scss +++ b/src/styles/scss/_gjs_rte.scss @@ -30,12 +30,12 @@ border-right: none; } - &.btn-info { - background-color: $mainDkColor; - } - &:hover { background-color: $mainLhColor; } } + + &active { + background-color: $mainDkColor; + } } diff --git a/src/styles/scss/main.scss b/src/styles/scss/main.scss index 1ce74afd7d..f038783ce1 100644 --- a/src/styles/scss/main.scss +++ b/src/styles/scss/main.scss @@ -236,41 +236,10 @@ @import "gjs_canvas"; -/************* RTE ****************/ -#commands.panel { - min-width: 35px; - height: 100%; - z-index:3; -} -#options.panel{ z-index:4; bottom: 0;} -#views.panel { - width: 16.5%; - font-weight: lighter; - color: $fontColor; - right:0; top:0; - z-index: 3; - height: 100%; - padding:0; -} -#views.panel .c{height:100%} -#commands.panel, #options.panel {width: 3.5%; left:0;} -#options .c { display: table; margin: 0 auto; } - -/*********TEST**********/ -body.dragging, body.dragging * { cursor: move !important;} -.dragged { - position: absolute; - @include opacity(0.50); - z-index: 2000;} -ol.example li.placeholder {position: relative;} -ol.example li.placeholder:before {position: absolute;} -/*********END-TEST**********/ +/********* COMMANDS **********/ .no-dots, .ui-resizable-handle{ border: none !important; margin:0 !important; outline: none !important; } - -/********* COMMANDS **********/ - .#{$com-prefix}dashed *{ outline: 1px dashed #888; outline-offset: -2px; From 5d20e063008fa49bd7e105e327f196638309946f Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 15:46:14 +0200 Subject: [PATCH 131/143] Update RichTextEditor APIs --- src/rich_text_editor/index.js | 110 ++++++++++++------- src/rich_text_editor/model/RichTextEditor.js | 49 ++++++--- 2 files changed, 103 insertions(+), 56 deletions(-) diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 6803c09ee9..f98c71d55d 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -2,7 +2,6 @@ * * [add](#add) * * [get](#get) * * [getAll](#getall) - * * [remove](#remove) * * [getToolbarEl](#gettoolbarel) * * This module allows to customize the toolbar of the Rich Text Editor and use commands from the HTML Editing APIs. @@ -28,7 +27,7 @@ import {on, off} from 'utils/mixins' module.exports = () => { let config = {}; const defaults = require('./config/config'); - let toolbar, actions, lastEl; + let toolbar, actions, lastEl, globalRte; return { @@ -65,6 +64,7 @@ module.exports = () => { actions = config.actions || []; toolbar = document.createElement('div'); toolbar.className = `${ppfx}rte-toolbar`; + globalRte = this.initRte(document.createElement('div')); //Avoid closing on toolbar clicking on(toolbar, 'mousedown', e => e.stopPropagation()); @@ -77,48 +77,89 @@ module.exports = () => { canvas.getToolsEl().appendChild(toolbar); }, + /** - * Add a new action to the RTE toolbar + * Init the built-in RTE + * @param {HTMLElement} el + * @return {RichTextEditor} + * @private + */ + initRte(el) { + const pfx = this.pfx; + const actionbarContainer = toolbar; + const actionbar = this.actionbar; + const actions = this.actions || config.actions; + const classes = { + actionbar: `${pfx}actionbar`, + button: `${pfx}action`, + active: `${pfx}active`, + }; + const rte = new RichTextEditor({ + el, + classes, + actions, + actionbar, + actionbarContainer, + }); + + if (rte.actionbar) { + this.actionbar = rte.actionbar; + } + + if (rte.actions) { + this.actions = rte.actions; + } + + return rte; + }, + + /** + * Add a new action to the built-in RTE toolbar * @param {string} name Action name - * @param {Object} opts Action options + * @param {Object} action Action options * @example * rte.add('bold', { * icon: 'B', - * title: 'Bold', + * attributes: {title: 'Bold',} * result: rte => rte.exec('bold') * }); * rte.add('link', { * icon: 'L', - * title: 'Link', - * result: rte => { - * const url = window.prompt('Enter the link URL') - * if (url) rte.exec('createLink', url) - * } + * attributes: {title: 'Link',} + * result: rte => + * rte.insertHTML(`${rte.selection()}`) * }); */ - add(name, opts = {}) { - opts.name = name; - actions.push(opts); - //gloabl.addAction(); + add(name, action = {}) { + action.name = name; + globalRte.getActions().push(action); + globalRte.addAction(action, {sync: 1}); }, /** - * Get the command by its name - * @param {string} command Command name - * @return {Model} + * Get the action by its name + * @param {string} name Action name + * @return {Object} * @example - * var cm = rte.get('fontSize'); + * const action = rte.get('bold'); + * // {name: 'bold', ...} */ - get(command) { - return commands.where({command})[0]; + get(name) { + let result; + globalRte.getActions().forEach(action => { + if (action.name == name) { + result = action; + } + }); + return result; }, /** - * Returns the collection of commands - * @return {Collection} + * Get all actions + * @return {Array} */ getAll() { - return commands; + return globalRte.getActions(); }, /** @@ -153,24 +194,11 @@ module.exports = () => { enable(view, rte) { lastEl = view.el; const em = config.em; - const pfx = this.pfx; const el = view.getChildrenContainer(); const customRte = this.customRte; - const actionbar = this.actionbar; - const actionbarContainer = toolbar; - const classes = { - actionbar: `${pfx}actionbar`, - button: `${pfx}action`, - active: `${pfx}active`, - }; toolbar.style.display = ''; - rte = customRte ? customRte.enable(el, rte) : - new RichTextEditor({el, actionbarContainer, classes, actionbar}).enable(); - - if (rte.actionbar) { - this.actionbar = rte.actionbar; - } + rte = customRte ? customRte.enable(el, rte) : this.initRte(el).enable(); if (em) { setTimeout(this.udpatePosition.bind(this), 0); @@ -190,6 +218,7 @@ module.exports = () => { * */ disable(view, rte) { const customRte = this.customRte; + const style = toolbar.style; var el = view.getChildrenContainer(); if (customRte) { @@ -198,13 +227,14 @@ module.exports = () => { rte.disable(); } - toolbar.style.display = 'none'; + style.display = 'none'; + style.top = 0; + style.left = 0; }, /** - * Return the toolbar element + * Get the toolbar element * @return {HTMLElement} - * @private */ getToolbarEl() { return toolbar; diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index deed0b4570..faf8478c06 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -5,7 +5,7 @@ import {on, off} from 'utils/mixins' const RTE_KEY = '_rte'; -const actions = { +const defActions = { bold: { name: 'bold', icon: 'B', @@ -38,6 +38,12 @@ const actions = { }, result: (rte) => rte.insertHTML(`${rte.selection()}`) }, + avoid: { + name: 'avoid', + icon: 'avoid', + attributes: {title: 'avoid'}, + result: (rte) => rte.insertHTML(`Avoid`) + }, } export default class RichTextEditor { @@ -49,22 +55,25 @@ export default class RichTextEditor { return el[RTE_KEY]; } - //el.oninput = e => settings.onChange && settings.onChange(e.target.innerHTML); - //el.onkeydown = e => (e.which === 9 && e.preventDefault()); el[RTE_KEY] = this; this.el = el; this.doc = el.ownerDocument; + //el.oninput = e => settings.onChange && settings.onChange(e.target.innerHTML); + //el.onkeydown = e => (e.which === 9 && e.preventDefault()); + this.updateActiveActions = this.updateActiveActions.bind(this); - settings.actions = settings.actions - ? settings.actions.map(action => { + const settAct = settings.actions || []; + settAct.forEach((action, i) => { if (typeof action === 'string') { - return actions[action]; - } else if (actions[action.name]) { - return {...actions[action.name], ...action}; + action = defActions[action]; + } else if (defActions[action.name]) { + action = {...defActions[action.name], ...action}; } - return action; - }) : Object.keys(actions).map(action => actions[action]) + settAct[i] = action; + }); + const actions = settAct.length ? settAct : + Object.keys(defActions).map(action => defActions[action]) settings.classes = { ...{ actionbar: 'actionbar', @@ -77,6 +86,7 @@ export default class RichTextEditor { this.actionbar = actionbar; this.settings = settings; this.classes = classes; + this.actions = actions; if (!actionbar) { const actionbarCont = settings.actionbarContainer; @@ -84,7 +94,7 @@ export default class RichTextEditor { actionbar.className = classes.actionbar; actionbarCont.appendChild(actionbar); this.actionbar = actionbar; - settings.actions.forEach(action => this.addAction(action)) + actions.forEach(action => this.addAction(action)) } settings.styleWithCSS && this.exec('styleWithCSS'); @@ -94,7 +104,7 @@ export default class RichTextEditor { } updateActiveActions() { - this.actions().forEach(action => { + this.getActions().forEach(action => { const btn = action.btn; const active = this.classes.active; btn.className = btn.className.replace(active, '').trim(); @@ -110,6 +120,7 @@ export default class RichTextEditor { this.el.contentEditable = true; on(this.el, 'mouseup keyup', this.updateActiveActions) this.syncActions(); + this.updateActiveActions(); this.el.focus(); return this; } @@ -125,7 +136,7 @@ export default class RichTextEditor { * Sync actions with the current RTE */ syncActions() { - this.actions().forEach(action => { + this.getActions().forEach(action => { const event = action.event || 'click'; action.btn[`on${event}`] = e => { action.result(this); @@ -137,8 +148,10 @@ export default class RichTextEditor { /** * Add new action to the actionbar * @param {Object} action + * @param {Object} [opts={}] */ - addAction(action) { + addAction(action, opts = {}) { + const sync = opts.sync; const btn = document.createElement('span'); const icon = action.icon; const attr = action.attributes || {}; @@ -156,14 +169,18 @@ export default class RichTextEditor { } this.actionbarEl().appendChild(btn); + + if (sync) { + this.syncActions(); + } } /** * Get the array of current actions * @return {Array} */ - actions() { - return this.settings.actions; + getActions() { + return this.actions; } /** From 61775c8c47abc3d90f9fa53f847bedd4180a1992 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 15:57:35 +0200 Subject: [PATCH 132/143] Add rte enable/disable events --- src/dom_components/view/ComponentTextView.js | 6 ++++++ src/editor/index.js | 2 ++ src/rich_text_editor/index.js | 19 +++++++++++-------- src/rich_text_editor/model/RichTextEditor.js | 2 -- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/dom_components/view/ComponentTextView.js b/src/dom_components/view/ComponentTextView.js index 491a990e97..2732a97df8 100644 --- a/src/dom_components/view/ComponentTextView.js +++ b/src/dom_components/view/ComponentTextView.js @@ -23,6 +23,10 @@ module.exports = ComponentView.extend({ * @private * */ enableEditing() { + if (this.rteEnabled) { + return; + } + const editable = this.model.get('editable'); const rte = this.rte; @@ -34,6 +38,7 @@ module.exports = ComponentView.extend({ } } + this.rteEnabled = 1; this.toggleEvents(1); }, @@ -88,6 +93,7 @@ module.exports = ComponentView.extend({ } } + this.rteEnabled = 0; this.toggleEvents(); }, diff --git a/src/editor/index.js b/src/editor/index.js index acd146167a..f14c8d5506 100644 --- a/src/editor/index.js +++ b/src/editor/index.js @@ -54,6 +54,8 @@ * * `storage:end` - After the storage request is ended * * `storage:error` - On any error on storage request, passes the error as an argument * * `selector:add` - Triggers when a new selector/class is created + * * `rte:enable` - RTE enabled. The view, on which RTE is enabled, is passed as an argument + * * `rte:disable` - RTE disabled. The view, on which RTE is disabled, is passed as an argument * * `canvasScroll` - Triggered when the canvas is scrolled * * `run:{commandName}` - Triggered when some command is called to run (eg. editor.runCommand('preview')) * * `stop:{commandName}` - Triggered when some command is called to stop (eg. editor.stopCommand('preview')) diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index f98c71d55d..e6f64a26b4 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -162,6 +162,14 @@ module.exports = () => { return globalRte.getActions(); }, + /** + * Get the toolbar element + * @return {HTMLElement} + */ + getToolbarEl() { + return toolbar; + }, + /** * Triggered when the offset of the editor is changed * @private @@ -205,6 +213,7 @@ module.exports = () => { const event = 'change:canvasOffset canvasScroll'; em.off(event, this.udpatePosition, this); em.on(event, this.udpatePosition, this); + em.trigger('rte:enable', view, rte); } return rte; @@ -217,6 +226,7 @@ module.exports = () => { * @private * */ disable(view, rte) { + const em = config.em; const customRte = this.customRte; const style = toolbar.style; var el = view.getChildrenContainer(); @@ -230,14 +240,7 @@ module.exports = () => { style.display = 'none'; style.top = 0; style.left = 0; - }, - - /** - * Get the toolbar element - * @return {HTMLElement} - */ - getToolbarEl() { - return toolbar; + em && em.trigger('rte:disable', view, rte); }, }; }; diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index faf8478c06..e9107bbf5f 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -58,8 +58,6 @@ export default class RichTextEditor { el[RTE_KEY] = this; this.el = el; this.doc = el.ownerDocument; - //el.oninput = e => settings.onChange && settings.onChange(e.target.innerHTML); - //el.onkeydown = e => (e.which === 9 && e.preventDefault()); this.updateActiveActions = this.updateActiveActions.bind(this); From 503ecf7ee49445fa50a1e14c7e8b6438eeeb997f Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 18:34:20 +0200 Subject: [PATCH 133/143] Cleanup RichTextEditor module --- src/rich_text_editor/index.js | 17 +- src/rich_text_editor/model/CommandButton.js | 21 -- src/rich_text_editor/model/CommandButtons.js | 6 - .../view/CommandButtonSelectView.js | 42 ---- .../view/CommandButtonView.js | 16 -- .../view/CommandButtonsView.js | 76 ------ src/rich_text_editor/view/TextEditorView.js | 234 ------------------ 7 files changed, 10 insertions(+), 402 deletions(-) delete mode 100644 src/rich_text_editor/model/CommandButton.js delete mode 100644 src/rich_text_editor/model/CommandButtons.js delete mode 100644 src/rich_text_editor/view/CommandButtonSelectView.js delete mode 100644 src/rich_text_editor/view/CommandButtonView.js delete mode 100644 src/rich_text_editor/view/CommandButtonsView.js delete mode 100644 src/rich_text_editor/view/TextEditorView.js diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index e6f64a26b4..cbc461158a 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -6,7 +6,7 @@ * * This module allows to customize the toolbar of the Rich Text Editor and use commands from the HTML Editing APIs. * For more info about HTML Editing APIs check here: - * https://developer.mozilla.org/it/docs/Web/API/Document/execCommand + * https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand * * 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. @@ -16,9 +16,6 @@ * ```js * var rte = editor.RichTextEditor; * ``` - * Complete list of commands - * https://developer.mozilla.org/it/docs/Web/API/Document/execCommand - * http://www.quirksmode.org/dom/execCommand.html * @module RichTextEditor */ import RichTextEditor from './model/RichTextEditor'; @@ -71,6 +68,12 @@ module.exports = () => { return this; }, + + /** + * Post render callback + * @param {View} ev + * @private + */ postRender(ev) { const canvas = ev.model.get('Canvas'); toolbar.style.pointerEvents = 'all'; @@ -124,10 +127,10 @@ module.exports = () => { * result: rte => rte.exec('bold') * }); * rte.add('link', { - * icon: 'L', + * icon: document.getElementById('t'), + * event: 'click', * attributes: {title: 'Link',} - * result: rte => - * rte.insertHTML(`${rte.selection()}`) + * result: rte => rte.insertHTML(`${rte.selection()}`) * }); */ add(name, action = {}) { diff --git a/src/rich_text_editor/model/CommandButton.js b/src/rich_text_editor/model/CommandButton.js deleted file mode 100644 index c5b841563c..0000000000 --- a/src/rich_text_editor/model/CommandButton.js +++ /dev/null @@ -1,21 +0,0 @@ -var Backbone = require('backbone'); - -module.exports = Backbone.Model.extend({ - - idAttribute: 'command', - - defaults: { - command: '', - type: '', - title: '', - class: '', - options: [], - }, - - initialize() { - var opts = this.get('options'); - if(opts.length) - this.set('type', 'select'); - }, - -}); diff --git a/src/rich_text_editor/model/CommandButtons.js b/src/rich_text_editor/model/CommandButtons.js deleted file mode 100644 index 2923246051..0000000000 --- a/src/rich_text_editor/model/CommandButtons.js +++ /dev/null @@ -1,6 +0,0 @@ -var Backbone = require('backbone'); -var CommandButton = require('./CommandButton'); - -module.exports = Backbone.Collection.extend({ - model: CommandButton, -}); diff --git a/src/rich_text_editor/view/CommandButtonSelectView.js b/src/rich_text_editor/view/CommandButtonSelectView.js deleted file mode 100644 index 04ba419c4d..0000000000 --- a/src/rich_text_editor/view/CommandButtonSelectView.js +++ /dev/null @@ -1,42 +0,0 @@ -const CommandButtonView = require('./CommandButtonView'); -const $ = Backbone.$; - -module.exports = CommandButtonView.extend({ - - initialize(o, config) { - CommandButtonView.prototype.initialize.apply(this, arguments); - }, - - getInput() { - var m = this.model; - if(!this.input){ - var cmd = m.get('command'); - var input = ''; - this.input = $(input); - } - return this.input; - }, - - getInputCont() { - var input = this.getInput(); - var pfx = this.ppfx; - var cont = $('
'); - return cont.append(input); - }, - - render(...args) { - CommandButtonView.prototype.render.apply(this, args); - this.$el.html(this.getInputCont()); - return this; - } -}); diff --git a/src/rich_text_editor/view/CommandButtonView.js b/src/rich_text_editor/view/CommandButtonView.js deleted file mode 100644 index 4f5c5d7903..0000000000 --- a/src/rich_text_editor/view/CommandButtonView.js +++ /dev/null @@ -1,16 +0,0 @@ -var Backbone = require('backbone'); - -module.exports = Backbone.View.extend({ - tagName: 'a', - - initialize(o, config) { - this.config = config || {}; - this.ppfx = this.config.pStylePrefix || ''; - this.className = this.config.stylePrefix + 'btn ' + this.model.get('class'); - }, - - render() { - this.$el.addClass(this.className); - return this; - } -}); diff --git a/src/rich_text_editor/view/CommandButtonsView.js b/src/rich_text_editor/view/CommandButtonsView.js deleted file mode 100644 index b3f5d10899..0000000000 --- a/src/rich_text_editor/view/CommandButtonsView.js +++ /dev/null @@ -1,76 +0,0 @@ -var Backbone = require('backbone'); -var CommandButtonView = require('./CommandButtonView'); -var CommandButtonSelectView = require('./CommandButtonSelectView'); - -module.exports = Backbone.View.extend({ - - attributes : { - 'data-role': 'editor-toolbar', - }, - - initialize(o) { - this.config = o.config || {}; - var pfx = this.config.stylePrefix || ''; - this.id = pfx + this.config.toolbarId; - this.listenTo(this.collection, 'add', this.addTo); - this.$el.data('helper', 1); - }, - - /** - * Add new model to the collection - * @param {Model} model - * @private - * */ - addTo(model) { - this.add(model); - }, - - /** - * Render new model inside the view - * @param {Model} model - * @param {Object} fragment Fragment collection - * @private - * */ - add(model, fragment) { - var frag = fragment || null; - var viewObj = CommandButtonView; - - switch (model.get('type')) { - case 'select': - viewObj = CommandButtonSelectView; - break; - } - var args = model.get('args'); - var attrs = { - 'title': model.get('title'), - 'data-edit': model.get('command'), - }; - if(args) - attrs['data-args'] = args; - var view = new viewObj({ - model, - attributes: attrs, - }, this.config); - - var rendered = view.render().el; - - if(frag) - frag.appendChild(rendered); - else - this.$el.append(rendered); - }, - - render() { - var frag = document.createDocumentFragment(); - this.$el.empty(); - - this.collection.each(function(model){ - this.add(model, frag); - }, this); - - this.$el.append(frag); - this.$el.attr('id', this.id ); - return this; - } - -}); diff --git a/src/rich_text_editor/view/TextEditorView.js b/src/rich_text_editor/view/TextEditorView.js deleted file mode 100644 index 5d9804e25c..0000000000 --- a/src/rich_text_editor/view/TextEditorView.js +++ /dev/null @@ -1,234 +0,0 @@ -const Backbone = require('backbone'); -const $ = Backbone.$; - -var readFileIntoDataUrl = fileInfo => { - var loader = $.Deferred(), - fReader = new FileReader(); - fReader.onload = e => { - loader.resolve(e.target.result); - }; - fReader.onerror = loader.reject; - fReader.onprogress = loader.notify; - fReader.readAsDataURL(fileInfo); - return loader.promise(); -}; -$.fn.cleanHtml = function () { - var html = $(this).html(); - return html && html.replace(/(
|\s|

<\/div>| )*$/, ''); -}; -$.fn.wysiwyg = function (userOptions) { - var editor = this, - selectedRange, - options, - toolbarBtnSelector, - updateToolbar = () => { - var actCls = options.activeToolbarClass; - if (actCls) { - $(options.toolbarSelector).find(toolbarBtnSelector).each(function () { - var el = $(this); - var command = el.data(options.commandRole); - var doc = editor.get(0).ownerDocument; - if (doc.queryCommandState(command)) { - el.addClass(actCls); - } else { - el.removeClass(actCls); - } - }); - } - }, - execCommand = (commandWithArgs, valueArg) => { - var commandArr = commandWithArgs.split(' '), - command = commandArr.shift(), - args = commandArr.join(' ') + (valueArg || ''); - //document.execCommand("insertHTML", false, ""+ document.getSelection()+""); - editor.get(0).ownerDocument.execCommand("styleWithCSS", false, true); - editor.get(0).ownerDocument.execCommand(command, 0, args); - updateToolbar(); - editor.trigger('change'); - }, - /* - bindHotkeys = function (hotKeys) { - $.each(hotKeys, function (hotkey, command) { - editor.keydown(hotkey, function (e) { - if (editor.attr('contenteditable') && editor.is(':visible')) { - e.preventDefault(); - e.stopPropagation(); - execCommand(command); - } - }).keyup(hotkey, function (e) { - if (editor.attr('contenteditable') && editor.is(':visible')) { - e.preventDefault(); - e.stopPropagation(); - } - }); - }); - }, - */ - getCurrentRange = () => { - var sel = window.getSelection(); - if (sel.getRangeAt && sel.rangeCount) { - return sel.getRangeAt(0); - } - }, - saveSelection = () => { - selectedRange = getCurrentRange(); - }, - restoreSelection = () => { - var selection = window.getSelection(); - if (selectedRange) { - try { - selection.removeAllRanges(); - } catch (ex) { - document.body.createTextRange().select(); - document.selection.empty(); - } - - selection.addRange(selectedRange); - } - }, - insertFiles = files => { - editor.focus(); - $.each(files, (idx, fileInfo) => { - if (/^image\//.test(fileInfo.type)) { - $.when(readFileIntoDataUrl(fileInfo)).done(dataUrl => { - execCommand('insertimage', dataUrl); - }).fail(e => { - options.fileUploadError("file-reader", e); - }); - } else { - options.fileUploadError("unsupported-file-type", fileInfo.type); - } - }); - }, - markSelection = (input, color) => { - restoreSelection(); - if (document.queryCommandSupported('hiliteColor')) { - document.execCommand('hiliteColor', 0, color || 'transparent'); - } - saveSelection(); - input.data(options.selectionMarker, color); - }, - bindToolbar = (toolbar, options) => { - toolbar.find(toolbarBtnSelector).off('click').on('click',function () { - restoreSelection(); - //editor.focus(); // cause defocus on selects - var doc = editor.get(0).ownerDocument; - var el = $(this); - var comm = el.data(options.commandRole); - var args = el.data('args'); - if(args){ - args = args.replace('${content}', doc.getSelection()); - execCommand(comm, args); - }else{ - doc.execCommand(comm); - } - saveSelection(); - }); - toolbar.find('[data-toggle=dropdown]').on('click', restoreSelection); - var dName = '[data-' + options.commandRole + ']'; - toolbar.find('select'+dName).on('webkitspeechchange change', function(){ - var newValue = this.value; - restoreSelection(); - if (newValue) { - editor.focus(); - execCommand($(this).data(options.commandRole), newValue); - } - saveSelection(); - }); - toolbar.find('input[type=text]'+dName,', select'+dName).on('webkitspeechchange change', function () { - var newValue = this.value; /* ugly but prevents fake double-calls due to selection restoration */ - this.value = ''; - restoreSelection(); - if (newValue) { - editor.focus(); - execCommand($(this).data(options.commandRole), newValue); - } - saveSelection(); - }).on('focus', function () { - var input = $(this); - if (!input.data(options.selectionMarker)) { - markSelection(input, options.selectionColor); - input.focus(); - } - }).on('blur', function () { - var input = $(this); - if (input.data(options.selectionMarker)) { - markSelection(input, false); - } - }); - toolbar.find('input[type=file][data-' + options.commandRole + ']').on('change', function () { - restoreSelection(); - if (this.type === 'file' && this.files && this.files.length > 0) { - insertFiles(this.files); - } - saveSelection(); - this.value = ''; - }); - }, - initFileDrops = () => { - editor.on('dragenter dragover', false) - .on('drop', e => { - var dataTransfer = e.originalEvent.dataTransfer; - e.stopPropagation(); - e.preventDefault(); - if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) { - insertFiles(dataTransfer.files); - } - }); - }; - /** Disable the editor - * @date 2015-03-19 */ - if(typeof userOptions=='string' && userOptions=='destroy'){ - editor.attr('contenteditable', false).off('mouseup keyup mouseout dragenter dragover'); - $(window).off('touchend'); - return this; - } - options = $.extend({}, $.fn.wysiwyg.defaults, userOptions); - var dName = '[data-' + options.commandRole + ']'; - toolbarBtnSelector = 'a'+dName+',button'+dName+',input[type=button]'+dName+', select'+dName; - //bindHotkeys(options.hotKeys); - if (options.dragAndDropImages) { - initFileDrops(); - } - bindToolbar($(options.toolbarSelector), options); - editor.attr('contenteditable', true).on('mouseup keyup mouseout', () => { - saveSelection(); - updateToolbar(); - }); - $(window).on('touchend', e => { - var isInside = (editor.is(e.target) || editor.has(e.target).length > 0), - currentRange = getCurrentRange(), - clear = currentRange && (currentRange.startContainer === currentRange.endContainer && currentRange.startOffset === currentRange.endOffset); - if (!clear || isInside) { - saveSelection(); - updateToolbar(); - } - }); - return this; -}; -$.fn.wysiwyg.defaults = { - /* - hotKeys: { - 'ctrl+b meta+b': 'bold', - 'ctrl+i meta+i': 'italic', - 'ctrl+u meta+u': 'underline', - 'ctrl+z meta+z': 'undo', - 'ctrl+y meta+y meta+shift+z': 'redo', - 'ctrl+l meta+l': 'justifyleft', - 'ctrl+r meta+r': 'justifyright', - 'ctrl+e meta+e': 'justifycenter', - 'ctrl+j meta+j': 'justifyfull', - 'shift+tab': 'outdent', - 'tab': 'indent' - }, - */ - toolbarSelector: '[data-role=editor-toolbar]', - commandRole: 'edit', - activeToolbarClass: 'btn-info', - selectionMarker: 'edit-focus-marker', - selectionColor: 'darkgrey', - dragAndDropImages: true, - fileUploadError(reason, detail) { console.log("File upload error", reason, detail); } -}; - -module.exports = $; From f94a055ae6a4512b6368bd72025fa22cc7d1d960 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 19:08:07 +0200 Subject: [PATCH 134/143] Update RichTextEditor, set element to globalRte --- src/rich_text_editor/index.js | 2 +- src/rich_text_editor/model/RichTextEditor.js | 27 ++++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index cbc461158a..de8e750d77 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -104,6 +104,7 @@ module.exports = () => { actionbar, actionbarContainer, }); + globalRte && globalRte.setEl(el); if (rte.actionbar) { this.actionbar = rte.actionbar; @@ -135,7 +136,6 @@ module.exports = () => { */ add(name, action = {}) { action.name = name; - globalRte.getActions().push(action); globalRte.addAction(action, {sync: 1}); }, diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index e9107bbf5f..565376b63e 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -32,18 +32,13 @@ const defActions = { }, link: { icon: ``, + name: 'link', attributes: { style: 'font-size:1.4rem;padding:0 4px 2px;', title: 'Link', }, result: (rte) => rte.insertHTML(`${rte.selection()}`) - }, - avoid: { - name: 'avoid', - icon: 'avoid', - attributes: {title: 'avoid'}, - result: (rte) => rte.insertHTML(`Avoid`) - }, + } } export default class RichTextEditor { @@ -56,9 +51,7 @@ export default class RichTextEditor { } el[RTE_KEY] = this; - this.el = el; - this.doc = el.ownerDocument; - + this.setEl(el); this.updateActiveActions = this.updateActiveActions.bind(this); const settAct = settings.actions || []; @@ -101,6 +94,11 @@ export default class RichTextEditor { return this; } + setEl(el) { + this.el = el; + this.doc = el.ownerDocument; + } + updateActiveActions() { this.getActions().forEach(action => { const btn = action.btn; @@ -114,19 +112,25 @@ export default class RichTextEditor { } enable() { + if (this.enabled) { + return this; + } + this.actionbarEl().style.display = ''; this.el.contentEditable = true; on(this.el, 'mouseup keyup', this.updateActiveActions) this.syncActions(); this.updateActiveActions(); this.el.focus(); + this.enabled = 1; return this; } disable() { this.actionbarEl().style.display = 'none'; this.el.contentEditable = false; - off(this.el, 'mouseup keyup', this.updateActiveActions) + off(this.el, 'mouseup keyup', this.updateActiveActions); + this.enabled = 0; return this; } @@ -169,6 +173,7 @@ export default class RichTextEditor { this.actionbarEl().appendChild(btn); if (sync) { + this.actions.push(action); this.syncActions(); } } From c8748b32c854595afbf66b69cc5ad5570b92d691 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 19:13:32 +0200 Subject: [PATCH 135/143] Update add doc in RichTextEditor --- src/rich_text_editor/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index de8e750d77..1ffa69c2b1 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -129,8 +129,10 @@ module.exports = () => { * }); * rte.add('link', { * icon: document.getElementById('t'), + * // Bind the 'result' on 'onclick' listener * event: 'click', * attributes: {title: 'Link',} + * // Example on it's easy to wrap a selected content * result: rte => rte.insertHTML(`${rte.selection()}`) * }); */ From 14423c21b934e491233238241d3812a0bfc54be3 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 20:29:15 +0200 Subject: [PATCH 136/143] Add remove method to RichTextEditor module --- src/rich_text_editor/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 1ffa69c2b1..934fa05696 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -2,6 +2,7 @@ * * [add](#add) * * [get](#get) * * [getAll](#getall) + * * [remove](#remove) * * [getToolbarEl](#gettoolbarel) * * This module allows to customize the toolbar of the Rich Text Editor and use commands from the HTML Editing APIs. @@ -167,6 +168,28 @@ module.exports = () => { return globalRte.getActions(); }, + /** + * Remove the action from the toolbar + * @param {string} name + * @return {Object} Removed action + * @example + * const action = rte.remove('bold'); + * // {name: 'bold', ...} + */ + remove(name) { + const actions = this.getAll(); + const action = this.get(name); + + if (action) { + const btn = action.btn; + const index = actions.indexOf(action); + btn.parentNode.removeChild(btn); + actions.splice(index, 1); + } + + return action; + }, + /** * Get the toolbar element * @return {HTMLElement} From f065479ee1bd582cbd9ea72da1f2cba58f78ba6e Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 21:32:13 +0200 Subject: [PATCH 137/143] Update ComponentTextView --- dist/grapes.min.js | 4 ++-- src/dom_components/view/ComponentTextView.js | 13 +++++-------- src/dom_components/view/ComponentView.js | 6 +++--- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 3ea3418946..190a0434ff 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,5 +1,5 @@ /*! grapesjs - 0.12.5 */ -!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()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=56)}([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(14),e],void 0!==(o=function(t,e,n){a.Backbone=s(a,n,t,e)}.apply(e,r))&&(t.exports=o)}(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){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],l(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],l(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=s(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(44),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(144),l=n(22),c=n(46),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,n){e=e.split(/\s+/),t=t instanceof Array?t:[t];for(var i=0;i
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(30),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(119),view:n(32),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(31),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(37),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(35),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(38),view:n(34),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(38),view:n(33),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(126),view:n(127),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(39),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(4),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(4),n(12),n(33),n(34),n(35),n(37),n(16),n(32);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(4).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(4),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(6),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(51),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(105);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(107);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.View.extend({tagName:"a",initialize:function(t,e){this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"btn "+this.model.get("class")},render:function(){return this.$el.addClass(this.className),this}})},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(116),o=n(117),s=n(9),a=n(129),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(4).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(36);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(122);n(123);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(44),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(45);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(145),o=n(146);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.events={},this.events["click #"+e+"btn-eye"]="toggleVisibility",this.events["click ."+this.caretCls]="toggleOpening",this.events["click ."+this.titleCls]="handleSelect",this.events["click ."+this.editBtnCls]="handleEdit",this.events["blur ."+this.inputNameCls]="handleEditEnd",this.$el.data("model",i),this.$el.data("collection",r),t.config.sortable&&(this.events["mousedown #"+e+"move"]="startSort"),this.delegateEvents()},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(54));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(53);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r,a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l},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=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.isCountable(e,this.config.hideTextnode)&&this.addToCollection(e,t)},this),this.$el.append(t),this.$el.attr("class",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(57)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(58),e=n(59),i=n(217),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.5",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(60),r=n(61),o=n(216);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("rte"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(62),n(66),n(74),n(79),n(83),n(87),n(91),n(103),n(109),n(29),n(131),n(137),n(142),n(166),n(172),n(198),n(206)],o=n(0),s=n(213),a=n(50),l=void 0;n(215)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(63),e=n(64),i=n(65);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(67),i=n(68),r=n(69),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(72),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(80),o=n(81),s=n(82);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(86);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(88),o=n(89),s=n(90);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(92),i=n(93),r=n(94),o=n(95),s=n(96),a=n(97),l=n(102),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(5);n(98),n(23),n(101);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(5),n(99),n(100),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(5))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(5))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(5))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(104),o=n(24),s=n(106),a=(n(26),n(108));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";(function(e){e.$;t.exports=function(){var t,e,i,r,o={},s=n(110),a=(n(111),n(112)),l=n(114),c=n(0).$;return{customRte:null,name:"rte",init:function(n){r=this,o=n||{};for(var c in s)c in o||(o[c]=s[c]);var u=o.pStylePrefix;return u&&(o.stylePrefix=u+o.stylePrefix),t=o.stylePrefix,i=new a(o.commands),e=new l({collection:i,config:o}),this},add:function(t,e){var n=e||{};return n.command=t,i.add(n)},get:function(t){return i.where({command:t})[0]},getAll:function(){return i},udpatePosition:function(){var t=o.em.get("Canvas"),n=t.getTargetToElementDim(e.el,this.lastEl,{event:"rteToolbarPosUpdate"});o.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var i=e.el.style;i.top=n.top+"px",i.left=n.left+"px"},attach:function(t,n){this.lastEl=t.el;var i=t.getChildrenContainer(),r=this.customRte;return r?n=r.enable(i,n):c(i).wysiwyg({}).focus(),this.show(),o.em&&(setTimeout(this.udpatePosition.bind(this),0),o.em.off("change:canvasOffset",this.udpatePosition,this),o.em.on("change:canvasOffset",this.udpatePosition,this),o.em.off("canvasScroll",this.udpatePosition,this),o.em.on("canvasScroll",this.udpatePosition,this)),e.$el.on("mousedown",this.disableProp),n},detach:function(t,n){var i=this.customRte,r=t.getChildrenContainer();i?(t.model.set("content",r.innerHTML),i.disable(r,n)):c(r).wysiwyg("destroy"),this.hide(),e.$el.off("mousedown",this.disableProp)},focus:function(t,e){var n=this.customRte,i=t.getChildrenContainer();n?n.focus&&n.focus(i,e):this.attach(t)},show:function(){e.el.style.display="block"},hide:function(){e.el.style.display="none"},disableProp:function(t){t.stopPropagation()},getToolbarEl:function(){return e.el},render:function(){return e.render().el}}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",toolbarId:"toolbar",adjustToolbar:1,commands:[{command:"bold",title:"Bold",class:"fa fa-bold"},{command:"italic",title:"Italic",class:"fa fa-italic"},{command:"underline",title:"Underline",class:"fa fa-underline"},{command:"strikethrough",title:"Strikethrough",class:"fa fa-strikethrough",group:"format"},{command:"insertHTML",title:"Link",class:"fa fa-link",args:'${content}'}]}},function(t,e,n){"use strict";var i=n(0),r=i.$,o=function(t){var e=r.Deferred(),n=new FileReader;return n.onload=function(t){e.resolve(t.target.result)},n.onerror=e.reject,n.onprogress=e.notify,n.readAsDataURL(t),e.promise()};r.fn.cleanHtml=function(){var t=r(this).html();return t&&t.replace(/(
|\s|

<\/div>| )*$/,"")},r.fn.wysiwyg=function(t){var e,n,i,s=this,a=function(){var t=n.activeToolbarClass;t&&r(n.toolbarSelector).find(i).each(function(){var e=r(this),i=e.data(n.commandRole);s.get(0).ownerDocument.queryCommandState(i)?e.addClass(t):e.removeClass(t)})},l=function(t,e){var n=t.split(" "),i=n.shift(),r=n.join(" ")+(e||"");s.get(0).ownerDocument.execCommand("styleWithCSS",!1,!0),s.get(0).ownerDocument.execCommand(i,0,r),a(),s.trigger("change")},c=function(){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount)return t.getRangeAt(0)},u=function(){e=c()},h=function(){var t=window.getSelection();if(e){try{t.removeAllRanges()}catch(t){document.body.createTextRange().select(),document.selection.empty()}t.addRange(e)}},d=function(t){s.focus(),r.each(t,function(t,e){/^image\//.test(e.type)?r.when(o(e)).done(function(t){l("insertimage",t)}).fail(function(t){n.fileUploadError("file-reader",t)}):n.fileUploadError("unsupported-file-type",e.type)})},f=function(t,e){h(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,e||"transparent"),u(),t.data(n.selectionMarker,e)};if("string"==typeof t&&"destroy"==t)return s.attr("contenteditable",!1).off("mouseup keyup mouseout dragenter dragover"),r(window).off("touchend"),this;n=r.extend({},r.fn.wysiwyg.defaults,t);var p="[data-"+n.commandRole+"]";return i="a"+p+",button"+p+",input[type=button]"+p+", select"+p,n.dragAndDropImages&&function(){s.on("dragenter dragover",!1).on("drop",function(t){var e=t.originalEvent.dataTransfer;t.stopPropagation(),t.preventDefault(),e&&e.files&&e.files.length>0&&d(e.files)})}(),function(t,e){t.find(i).off("click").on("click",function(){h();var t=s.get(0).ownerDocument,n=r(this),i=n.data(e.commandRole),o=n.data("args");o?(o=o.replace("${content}",t.getSelection()),l(i,o)):t.execCommand(i),u()}),t.find("[data-toggle=dropdown]").on("click",h);var n="[data-"+e.commandRole+"]";t.find("select"+n).on("webkitspeechchange change",function(){var t=this.value;h(),t&&(s.focus(),l(r(this).data(e.commandRole),t)),u()}),t.find("input[type=text]"+n,", select"+n).on("webkitspeechchange change",function(){var t=this.value;this.value="",h(),t&&(s.focus(),l(r(this).data(e.commandRole),t)),u()}).on("focus",function(){var t=r(this);t.data(e.selectionMarker)||(f(t,e.selectionColor),t.focus())}).on("blur",function(){var t=r(this);t.data(e.selectionMarker)&&f(t,!1)}),t.find("input[type=file][data-"+e.commandRole+"]").on("change",function(){h(),"file"===this.type&&this.files&&this.files.length>0&&d(this.files),u(),this.value=""})}(r(n.toolbarSelector),n),s.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){u(),a()}),r(window).on("touchend",function(t){var e=s.is(t.target)||s.has(t.target).length>0,n=c();n&&n.startContainer===n.endContainer&&n.startOffset===n.endOffset&&!e||(u(),a())}),this},r.fn.wysiwyg.defaults={toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(t,e){console.log("File upload error",t,e)}},t.exports=r},function(t,e,n){"use strict";var i=n(0),r=n(113);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({idAttribute:"command",defaults:{command:"",type:"",title:"",class:"",options:[]},initialize:function(){this.get("options").length&&this.set("type","select")}})},function(t,e,n){"use strict";var i=n(0),r=n(28),o=n(115);t.exports=i.View.extend({attributes:{"data-role":"editor-toolbar"},initialize:function(t){this.config=t.config||{};var e=this.config.stylePrefix||"";this.id=e+this.config.toolbarId,this.listenTo(this.collection,"add",this.addTo),this.$el.data("helper",1)},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=r;switch(t.get("type")){case"select":i=o}var s=t.get("args"),a={title:t.get("title"),"data-edit":t.get("command")};s&&(a["data-args"]=s);var l=new i({model:t,attributes:a},this.config),c=l.render().el;n?n.appendChild(c):this.$el.append(c)},render:function(){var t=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this.$el.attr("id",this.id),this}})},function(t,e,n){"use strict";(function(e){var i=n(28),r=e.$;t.exports=i.extend({initialize:function(t,e){i.prototype.initialize.apply(this,arguments)},getInput:function(){var t=this.model;if(!this.input){var e=t.get("command"),n='",this.input=r(n)}return this.input},getInputCont:function(){var t=this.getInput(),e=this.ppfx;return r('
').append(t)},render:function(){for(var t=arguments.length,e=Array(t),n=0;n'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(125);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(39);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(132),i=n(133),r=n(136),o=n(42),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(30),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(134),view:n(40),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(135);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(41),n(40),n(42);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(138),o=n(43),s=n(139),a=n(45),l=n(140);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(169);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(171),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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=this.em.get("rte"),r=n.querySelector("#"+e+"tools");if(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"),i){var o=i.render();o.style.pointerEvents="all",r.appendChild(o)}return this.toolsEl=r,this.el.className=this.className,this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(173),o=n(174),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(179),i["image-comp"]=n(180),i["move-comp"]=n(181),i["text-comp"]=n(182),i["insert-custom"]=n(52),i["export-template"]=n(183),i["sw-visibility"]=n(184),i["open-layers"]=n(185),i["open-sm"]=n(188),i["open-tm"]=n(189),i["open-blocks"]=n(190),i["open-assets"]=n(191),i["show-offset"]=n(192),i["select-parent"]=n(193),i.fullscreen=n(194),i.preview=n(195),i.resize=n(196),i.drag=n(197),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(49)),r=n(176);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(178);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(52));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(6),o=n(19),s=n(51),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(186),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(187),r=n(53),o=n(54);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(29),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(199),s=n(200),a=n(202),l=n(203),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(201);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(55);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(55)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(204),o=n(205);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(207),r=(n(46),n(208));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(49),r=n(7),o=n(209),s=n(210),a=n(211),l=n(212);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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;rthis.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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(43),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(139),l=n(22),c=n(45),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,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),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(114),view:n(31),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(30),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(36),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(34),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(37),view:n(33),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(37),view:n(32),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(121),view:n(122),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(38),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(5),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(5),n(12),n(32),n(33),n(34),n(36),n(16),n(31);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(5).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(50),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(104);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(106);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(111),o=n(112),s=n(9),a=n(124),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(5).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(35);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(117);n(118);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(43),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(44);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(140),o=n(141);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.$el.data("model",i),this.$el.data("collection",r)},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(53));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(52);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l}},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();return this.el.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),this.el.appendChild(e),this.$el.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(57),e=n(58),i=n(212),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.5",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(59),r=n(60),o=n(211);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("RichTextEditor"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(61),n(65),n(73),n(78),n(82),n(86),n(90),n(102),n(108),n(28),n(126),n(132),n(137),n(161),n(167),n(193),n(201)],o=n(0),s=n(208),a=n(49),l=void 0;n(210)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(62),e=n(63),i=n(64);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(66),i=n(67),r=n(68),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(71),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(79),o=n(80),s=n(81);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(85);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(87),o=n(88),s=n(89);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(91),i=n(92),r=n(93),o=n(94),s=n(95),a=n(96),l=n(101),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(6);n(97),n(23),n(100);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(6),n(98),n(99),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(6))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(6))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(6))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(103),o=n(24),s=n(105),a=(n(26),n(107));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";var i=n(109),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(4);t.exports=function(){var t={},e=n(110),i=void 0,s=void 0,a=void 0,l=void 0;return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n;for(var r in e)r in t||(t[r]=e[r]);var a=t.pStylePrefix;return a&&(t.stylePrefix=a+t.stylePrefix),this.pfx=t.stylePrefix,s=t.actions||[],i=document.createElement("div"),i.className=a+"rte-toolbar",l=this.initRte(document.createElement("div")),(0,o.on)(i,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");i.style.pointerEvents="all",e.getToolsEl().appendChild(i)},initRte:function(e){var n=this.pfx,o=i,s=this.actionbar,a=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new r.default({el:e,classes:c,actions:a,actionbar:s,actionbarContainer:o});return l&&l.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,l.addAction(e,{sync:1})},get:function(t){var e=void 0;return l.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return l.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 i},udpatePosition:function(){var e=t.em.get("Canvas"),n=e.getTargetToElementDim(i,a,{event:"rteToolbarPosUpdate"});t.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var r=i.style;r.top=n.top+"px",r.left=n.left+"px"},enable:function(e,n){a=e.el;var r=t.em,o=e.getChildrenContainer(),s=this.customRte;if(i.style.display="",n=s?s.enable(o,n):this.initRte(o).enable(),r){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";r.off(l,this.udpatePosition,this),r.on(l,this.udpatePosition,this),r.trigger("rte:enable",e,n)}return n},disable:function(e,n){var r=t.em,o=this.customRte,s=i.style,a=e.getChildrenContainer();o?o.disable(a,n):n.disable(),s.display="none",s.top=0,s.left=0,r&&r.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=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()+"")}}},c=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var o=n.el;if(o[a])return o[a];o[a]=this,this.setEl(o),this.updateActiveActions=this.updateActiveActions.bind(this);var s=n.actions||[];s.forEach(function(t,e){"string"==typeof t?t=l[t]:l[t.name]&&(t=r({},l[t.name],t)),s[e]=t});var c=s.length?s:Object.keys(l).map(function(t){return l[t]});n.classes=r({actionbar:"actionbar",button:"action",active:"active"},n.classes);var u=n.classes,h=n.actionbar;if(this.actionbar=h,this.settings=n,this.classes=u,this.actions=c,!h){var d=n.actionbarContainer;h=document.createElement("div"),h.className=u.actionbar,d.appendChild(h),this.actionbar=h,c.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return o(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=t.classes.active;n.className=n.className.replace(i,"").trim(),t.doc.queryCommandState(e.name)&&(n.className+=" "+i)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,s.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,s.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),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sync,i=document.createElement("span"),r=t.icon,o=t.attributes||{};i.className=this.classes.button,t.btn=i;for(var s in o)i.setAttribute(s,o[s]);"string"==typeof r?i.innerHTML=r:i.appendChild(r),this.actionbarEl().appendChild(i),n&&(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=void 0,n=this.doc,i=n.getSelection();if(i&&i.rangeCount){var r=n.createElement("div"),o=i.getRangeAt(0);o.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach(function(t){o.insertNode(t),e=t}),i.removeAllRanges(),i.addRange(o),this.el.focus()}}}]),t}();e.default=c},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link"]}},function(t,e,n){"use strict";t.exports={stylePrefix:"sm-",sectors:[],textNoElement:"Select an element before using Style Manager",hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!1,validComputed:["border-collapse","border-spacing","caption-side","color","cursor","direction","empty-cells","font-family","font-size","font-style","font-variant","font-weight","font-size-adjust","font-stretch","font","letter-spacing","line-height","list-style-image","list-style-position","list-style-type","list-style","orphans","quotes","tab-size","text-align","text-align-last","text-decoration-color","text-indent","text-justify","text-shadow","text-transform","visibility","white-space","widows","word-break","word-spacing","word-wrap"]}},function(t,e,n){"use strict";var i=n(113);t.exports=n(0).Collection.extend({model:i})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(9),o=n(123);t.exports=i.Model.extend({defaults:{id:"",name:"",open:!0,buildProps:"",extendBuilded:1,properties:[]},initialize:function(t){var e=t||{},n=[],i=this.buildProperties(e.buildProps);n=i?this.extendProperties(i):this.get("properties");var o=new r(n);o.sector=this,this.set("properties",o)},extendProperties:function(t,n,i){for(var r=t.length,o=n||this.get("properties"),s=this.get("extendBuilded"),a=[],l=0,c=o.length;l'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(120);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(38);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(127),i=n(128),r=n(131),o=n(41),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(129),view:n(39),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(130);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(40),n(39),n(41);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(133),o=n(42),s=n(134),a=n(44),l=n(135);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(164);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(166),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(168),o=n(169),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(174),i["image-comp"]=n(175),i["move-comp"]=n(176),i["text-comp"]=n(177),i["insert-custom"]=n(51),i["export-template"]=n(178),i["sw-visibility"]=n(179),i["open-layers"]=n(180),i["open-sm"]=n(183),i["open-tm"]=n(184),i["open-blocks"]=n(185),i["open-assets"]=n(186),i["show-offset"]=n(187),i["select-parent"]=n(188),i.fullscreen=n(189),i.preview=n(190),i.resize=n(191),i.drag=n(192),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(48)),r=n(171);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(173);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(51));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(4),o=n(19),s=n(50),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(181),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(182),r=n(52),o=n(53);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(28),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(194),s=n(195),a=n(197),l=n(198),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(196);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(54);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(54)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(199),o=n(200);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(202),r=(n(45),n(203));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(48),r=n(7),o=n(204),s=n(205),a=n(206),l=n(207);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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;rt.maximumStackLength&&(t.shift(),t.pointer--)}}}function h(){}function d(e,n,i,o){if("object"==typeof n)return t.each(n,function(t,n){2===e?d(e,t,i,o):d(e,n,t,i)});switch(e){case 0:r(i,"undo","redo","on")&&t.all(t.pick(i,"undo","redo","on"),t.isFunction)&&(o[n]=i);break;case 1:o[n]&&t.isObject(i)&&(o[n]=t.extend({},o[n],i));break;case 2:delete o[n]}return this}var f=Array.prototype.slice,p=function(){function e(){i++,n=!0,t.defer(function(){n=!1})}var n=!1,i=-1;return function(){return n||e(),i}}();o.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 g={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)}}}};h.prototype=g;var m=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){a("undo",this.attributes)},redo:function(t){a("redo",this.attributes)}}),v=e.Collection.extend({model:m,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),y=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new v,this.objectRegistry=new o,this.undoTypes=new h,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)?n(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){u(this.stack,t,i(arguments,1),this.undoTypes)},register:function(){s("on",arguments,this._addToStack,this)},unregister:function(){s("off",arguments,this._addToStack,this)},unregisterAll:function(){n(this.unregister,this,this.objectRegistry.get())},undo:function(t){l("undo",this,this.stack,t)},undoAll:function(){l("undo",this,this.stack,!1,!0)},redo:function(t){l("redo",this,this.stack,t)},redoAll:function(){l("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.pointert.maximumStackLength&&(t.shift(),t.pointer--)}}}function h(){}function d(e,n,i,o){if("object"==typeof n)return t.each(n,function(t,n){2===e?d(e,t,i,o):d(e,n,t,i)});switch(e){case 0:r(i,"undo","redo","on")&&t.all(t.pick(i,"undo","redo","on"),t.isFunction)&&(o[n]=i);break;case 1:o[n]&&t.isObject(i)&&(o[n]=t.extend({},o[n],i));break;case 2:delete o[n]}return this}var f=Array.prototype.slice,p=function(){function e(){i++,n=!0,t.defer(function(){n=!1})}var n=!1,i=-1;return function(){return n||e(),i}}();o.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 g={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)}}}};h.prototype=g;var m=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){a("undo",this.attributes)},redo:function(t){a("redo",this.attributes)}}),v=e.Collection.extend({model:m,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),y=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new v,this.objectRegistry=new o,this.undoTypes=new h,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)?n(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){u(this.stack,t,i(arguments,1),this.undoTypes)},register:function(){s("on",arguments,this._addToStack,this)},unregister:function(){s("off",arguments,this._addToStack,this)},unregisterAll:function(){n(this.unregister,this,this.objectRegistry.get())},undo:function(t){l("undo",this,this.stack,t)},undoAll:function(){l("undo",this,this.stack,!1,!0)},redo:function(t){l("redo",this,this.stack,t)},redoAll:function(){l("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer { model.set({ @@ -76,19 +78,14 @@ module.exports = ComponentView.extend({ draggable: 0, copyable: 0, toolbar: '', - }); + }) model.get('components').each(model => clean(model)); } // Avoid re-render on reset with silent option model.set('content', ''); - comps.reset(); comps.add(content); comps.each(model => clean(model)); - - // With rerender it's possible to see changes applied - // after clean method - this.render(); comps.trigger('resetNavigator'); } } diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index e2def9bd6d..a8d9405ec1 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -23,7 +23,7 @@ module.exports = Backbone.View.extend({ const classes = model.get('classes'); this.listenTo(model, 'destroy remove', this.remove); this.listenTo(model, 'change:style', this.updateStyle); - this.listenTo(model, 'change:attributes', this.updateAttributes); + this.listenTo(model, 'change:attributes change:highlightable', this.updateAttributes); this.listenTo(model, 'change:status', this.updateStatus); this.listenTo(model, 'change:state', this.updateState); this.listenTo(model, 'change:script', this.render); @@ -153,7 +153,7 @@ module.exports = Backbone.View.extend({ updateAttributes() { var model = this.model; var attributes = {}, - attr = model.get("attributes"); + attr = model.get('attributes'); for(var key in attr) { if (key && attr.hasOwnProperty(key)) { attributes[key] = attr[key]; @@ -171,7 +171,7 @@ module.exports = Backbone.View.extend({ if(styleStr) attributes.style = styleStr; - + console.log(attributes); this.$el.attr(attributes); }, From a366a278228de796dfc0774c1ec4f3b7c3c03584 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 22:03:30 +0200 Subject: [PATCH 138/143] Refactor few methods in ComponentView --- src/dom_components/view/ComponentView.js | 102 ++++++++++++----------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/src/dom_components/view/ComponentView.js b/src/dom_components/view/ComponentView.js index a8d9405ec1..be33360c4f 100644 --- a/src/dom_components/view/ComponentView.js +++ b/src/dom_components/view/ComponentView.js @@ -23,7 +23,8 @@ module.exports = Backbone.View.extend({ const classes = model.get('classes'); this.listenTo(model, 'destroy remove', this.remove); this.listenTo(model, 'change:style', this.updateStyle); - this.listenTo(model, 'change:attributes change:highlightable', this.updateAttributes); + this.listenTo(model, 'change:attributes', this.updateAttributes); + this.listenTo(model, 'change:highlightable', this.updateHighlight); this.listenTo(model, 'change:status', this.updateStatus); this.listenTo(model, 'change:state', this.updateState); this.listenTo(model, 'change:script', this.render); @@ -130,6 +131,45 @@ module.exports = Backbone.View.extend({ } }, + /** + * Update highlight attribute + * @private + * */ + updateHighlight() { + const hl = this.model.get('highlightable'); + this.setAttribute('data-highlightable', hl ? 1 : ''); + }, + + /** + * Update style attribute + * @private + * */ + updateStyle() { + this.setAttribute('style', this.getStyleString()); + }, + + /** + * Update classe attribute + * @private + * */ + updateClasses() { + const str = this.model.get('classes').pluck('name').join(' '); + this.setAttribute('class', str); + + // Regenerate status class + this.updateStatus(); + }, + + /** + * Update single attribute + * @param {[type]} name [description] + * @param {[type]} value [description] + */ + setAttribute(name, value) { + const el = this.$el; + value ? el.attr(name, value) : el.removeAttr(name); + }, + /** * Get classes from attributes. * This method is called before initialize @@ -151,36 +191,19 @@ module.exports = Backbone.View.extend({ * @private * */ updateAttributes() { - var model = this.model; - var attributes = {}, - attr = model.get('attributes'); - for(var key in attr) { - if (key && attr.hasOwnProperty(key)) { - attributes[key] = attr[key]; - } - } - - // Update src - if(model.get('src')) - attributes.src = model.get('src'); - - if(model.get('highlightable')) - attributes['data-highlightable'] = 1; + const model = this.model; + const attrs = {} + const attr = model.get('attributes'); + const src = model.get('src'); - var styleStr = this.getStyleString(); + for (let key in attr) { + attrs[key] = attr[key]; + } - if(styleStr) - attributes.style = styleStr; - console.log(attributes); - this.$el.attr(attributes); - }, - - /** - * Update style attribute - * @private - * */ - updateStyle() { - this.$el.attr('style', this.getStyleString()); + src && (attrs.src = src); + this.$el.attr(attrs); + this.updateHighlight(); + this.updateStyle(); }, /** @@ -207,27 +230,6 @@ module.exports = Backbone.View.extend({ return style; }, - /** - * Update classe attribute - * @private - * */ - updateClasses() { - var str = ''; - - this.model.get('classes').each(model => { - str += model.get('name') + ' '; - }); - str = str.trim(); - - if(str) - this.$el.attr('class', str); - else - this.$el.removeAttr('class'); - - // Regenerate status class - this.updateStatus(); - }, - /** * Reply to event call * @param object Event that generated the request From 8ac6ca68a94c863f3dcbba12ebf289ab4a704ce0 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 22:05:58 +0200 Subject: [PATCH 139/143] Fix regressions --- test/specs/dom_components/view/ComponentV.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/dom_components/view/ComponentV.js b/test/specs/dom_components/view/ComponentV.js index 26bd5d0b95..c7cd2edece 100644 --- a/test/specs/dom_components/view/ComponentV.js +++ b/test/specs/dom_components/view/ComponentV.js @@ -77,7 +77,7 @@ module.exports = { it('Clean style', () => { model.set('style', { color: 'red'}); model.set('style', {}); - expect(view.el.getAttribute('style')).toEqual(''); + expect(view.el.getAttribute('style')).toEqual(null); }); it('Get style string', () => { From 34175a83490e74112c3a5f79b8038316ac10ac3a Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 22:09:43 +0200 Subject: [PATCH 140/143] Update build --- dist/grapes.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 190a0434ff..57c10a299f 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,5 +1,5 @@ /*! grapesjs - 0.12.5 */ -!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()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=55)}([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(14),e],void 0!==(o=function(t,e,n){a.Backbone=s(a,n,t,e)}.apply(e,r))&&(t.exports=o)}(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){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],l(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],l(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=s(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(43),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(139),l=n(22),c=n(45),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,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),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(114),view:n(31),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(30),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(36),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(34),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(37),view:n(33),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(37),view:n(32),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(121),view:n(122),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(38),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(5),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(5),n(12),n(32),n(33),n(34),n(36),n(16),n(31);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(5).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(50),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(104);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(106);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(111),o=n(112),s=n(9),a=n(124),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(5).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(35);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(117);n(118);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(43),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(44);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(140),o=n(141);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.$el.data("model",i),this.$el.data("collection",r)},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(53));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(52);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l}},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();return this.el.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),this.el.appendChild(e),this.$el.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(57),e=n(58),i=n(212),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.5",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(59),r=n(60),o=n(211);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("RichTextEditor"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(61),n(65),n(73),n(78),n(82),n(86),n(90),n(102),n(108),n(28),n(126),n(132),n(137),n(161),n(167),n(193),n(201)],o=n(0),s=n(208),a=n(49),l=void 0;n(210)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(62),e=n(63),i=n(64);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(66),i=n(67),r=n(68),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(71),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(79),o=n(80),s=n(81);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(85);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(87),o=n(88),s=n(89);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(91),i=n(92),r=n(93),o=n(94),s=n(95),a=n(96),l=n(101),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(6);n(97),n(23),n(100);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(6),n(98),n(99),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(6))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(6))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(6))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(103),o=n(24),s=n(105),a=(n(26),n(107));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";var i=n(109),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(4);t.exports=function(){var t={},e=n(110),i=void 0,s=void 0,a=void 0,l=void 0;return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n;for(var r in e)r in t||(t[r]=e[r]);var a=t.pStylePrefix;return a&&(t.stylePrefix=a+t.stylePrefix),this.pfx=t.stylePrefix,s=t.actions||[],i=document.createElement("div"),i.className=a+"rte-toolbar",l=this.initRte(document.createElement("div")),(0,o.on)(i,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");i.style.pointerEvents="all",e.getToolsEl().appendChild(i)},initRte:function(e){var n=this.pfx,o=i,s=this.actionbar,a=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new r.default({el:e,classes:c,actions:a,actionbar:s,actionbarContainer:o});return l&&l.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,l.addAction(e,{sync:1})},get:function(t){var e=void 0;return l.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return l.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 i},udpatePosition:function(){var e=t.em.get("Canvas"),n=e.getTargetToElementDim(i,a,{event:"rteToolbarPosUpdate"});t.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var r=i.style;r.top=n.top+"px",r.left=n.left+"px"},enable:function(e,n){a=e.el;var r=t.em,o=e.getChildrenContainer(),s=this.customRte;if(i.style.display="",n=s?s.enable(o,n):this.initRte(o).enable(),r){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";r.off(l,this.udpatePosition,this),r.on(l,this.udpatePosition,this),r.trigger("rte:enable",e,n)}return n},disable:function(e,n){var r=t.em,o=this.customRte,s=i.style,a=e.getChildrenContainer();o?o.disable(a,n):n.disable(),s.display="none",s.top=0,s.left=0,r&&r.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=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()+"")}}},c=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var o=n.el;if(o[a])return o[a];o[a]=this,this.setEl(o),this.updateActiveActions=this.updateActiveActions.bind(this);var s=n.actions||[];s.forEach(function(t,e){"string"==typeof t?t=l[t]:l[t.name]&&(t=r({},l[t.name],t)),s[e]=t});var c=s.length?s:Object.keys(l).map(function(t){return l[t]});n.classes=r({actionbar:"actionbar",button:"action",active:"active"},n.classes);var u=n.classes,h=n.actionbar;if(this.actionbar=h,this.settings=n,this.classes=u,this.actions=c,!h){var d=n.actionbarContainer;h=document.createElement("div"),h.className=u.actionbar,d.appendChild(h),this.actionbar=h,c.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return o(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=t.classes.active;n.className=n.className.replace(i,"").trim(),t.doc.queryCommandState(e.name)&&(n.className+=" "+i)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,s.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,s.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),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sync,i=document.createElement("span"),r=t.icon,o=t.attributes||{};i.className=this.classes.button,t.btn=i;for(var s in o)i.setAttribute(s,o[s]);"string"==typeof r?i.innerHTML=r:i.appendChild(r),this.actionbarEl().appendChild(i),n&&(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=void 0,n=this.doc,i=n.getSelection();if(i&&i.rangeCount){var r=n.createElement("div"),o=i.getRangeAt(0);o.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach(function(t){o.insertNode(t),e=t}),i.removeAllRanges(),i.addRange(o),this.el.focus()}}}]),t}();e.default=c},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link"]}},function(t,e,n){"use strict";t.exports={stylePrefix:"sm-",sectors:[],textNoElement:"Select an element before using Style Manager",hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!1,validComputed:["border-collapse","border-spacing","caption-side","color","cursor","direction","empty-cells","font-family","font-size","font-style","font-variant","font-weight","font-size-adjust","font-stretch","font","letter-spacing","line-height","list-style-image","list-style-position","list-style-type","list-style","orphans","quotes","tab-size","text-align","text-align-last","text-decoration-color","text-indent","text-justify","text-shadow","text-transform","visibility","white-space","widows","word-break","word-spacing","word-wrap"]}},function(t,e,n){"use strict";var i=n(113);t.exports=n(0).Collection.extend({model:i})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(9),o=n(123);t.exports=i.Model.extend({defaults:{id:"",name:"",open:!0,buildProps:"",extendBuilded:1,properties:[]},initialize:function(t){var e=t||{},n=[],i=this.buildProperties(e.buildProps);n=i?this.extendProperties(i):this.get("properties");var o=new r(n);o.sector=this,this.set("properties",o)},extendProperties:function(t,n,i){for(var r=t.length,o=n||this.get("properties"),s=this.get("extendBuilded"),a=[],l=0,c=o.length;l'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(120);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(38);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(127),i=n(128),r=n(131),o=n(41),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(129),view:n(39),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(130);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(40),n(39),n(41);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(133),o=n(42),s=n(134),a=n(44),l=n(135);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(164);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(166),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(168),o=n(169),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(174),i["image-comp"]=n(175),i["move-comp"]=n(176),i["text-comp"]=n(177),i["insert-custom"]=n(51),i["export-template"]=n(178),i["sw-visibility"]=n(179),i["open-layers"]=n(180),i["open-sm"]=n(183),i["open-tm"]=n(184),i["open-blocks"]=n(185),i["open-assets"]=n(186),i["show-offset"]=n(187),i["select-parent"]=n(188),i.fullscreen=n(189),i.preview=n(190),i.resize=n(191),i.drag=n(192),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(48)),r=n(171);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(173);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(51));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(4),o=n(19),s=n(50),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(181),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(182),r=n(52),o=n(53);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(28),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(194),s=n(195),a=n(197),l=n(198),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(196);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(54);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(54)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(199),o=n(200);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(202),r=(n(45),n(203));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(48),r=n(7),o=n(204),s=n(205),a=n(206),l=n(207);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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;rthis.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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(43),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(139),l=n(22),c=n(45),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,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),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(114),view:n(31),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(30),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(36),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(34),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(37),view:n(33),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(37),view:n(32),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(121),view:n(122),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(38),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(5),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(5),n(12),n(32),n(33),n(34),n(36),n(16),n(31);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(5).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(50),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(104);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(106);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(111),o=n(112),s=n(9),a=n(124),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(5).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(35);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(117);n(118);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(43),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(44);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(140),o=n(141);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.$el.data("model",i),this.$el.data("collection",r)},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(53));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(52);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l}},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();return this.el.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),this.el.appendChild(e),this.$el.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(57),e=n(58),i=n(212),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.5",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(59),r=n(60),o=n(211);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("RichTextEditor"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(61),n(65),n(73),n(78),n(82),n(86),n(90),n(102),n(108),n(28),n(126),n(132),n(137),n(161),n(167),n(193),n(201)],o=n(0),s=n(208),a=n(49),l=void 0;n(210)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(62),e=n(63),i=n(64);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(66),i=n(67),r=n(68),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(71),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(79),o=n(80),s=n(81);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(85);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(87),o=n(88),s=n(89);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(91),i=n(92),r=n(93),o=n(94),s=n(95),a=n(96),l=n(101),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(6);n(97),n(23),n(100);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(6),n(98),n(99),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(6))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(6))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(6))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(103),o=n(24),s=n(105),a=(n(26),n(107));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";var i=n(109),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(4);t.exports=function(){var t={},e=n(110),i=void 0,s=void 0,a=void 0,l=void 0;return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n;for(var r in e)r in t||(t[r]=e[r]);var a=t.pStylePrefix;return a&&(t.stylePrefix=a+t.stylePrefix),this.pfx=t.stylePrefix,s=t.actions||[],i=document.createElement("div"),i.className=a+"rte-toolbar",l=this.initRte(document.createElement("div")),(0,o.on)(i,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");i.style.pointerEvents="all",e.getToolsEl().appendChild(i)},initRte:function(e){var n=this.pfx,o=i,s=this.actionbar,a=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new r.default({el:e,classes:c,actions:a,actionbar:s,actionbarContainer:o});return l&&l.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,l.addAction(e,{sync:1})},get:function(t){var e=void 0;return l.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return l.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 i},udpatePosition:function(){var e=t.em.get("Canvas"),n=e.getTargetToElementDim(i,a,{event:"rteToolbarPosUpdate"});t.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var r=i.style;r.top=n.top+"px",r.left=n.left+"px"},enable:function(e,n){a=e.el;var r=t.em,o=e.getChildrenContainer(),s=this.customRte;if(i.style.display="",n=s?s.enable(o,n):this.initRte(o).enable(),r){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";r.off(l,this.udpatePosition,this),r.on(l,this.udpatePosition,this),r.trigger("rte:enable",e,n)}return n},disable:function(e,n){var r=t.em,o=this.customRte,s=i.style,a=e.getChildrenContainer();o?o.disable(a,n):n.disable(),s.display="none",s.top=0,s.left=0,r&&r.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=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()+"")}}},c=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var o=n.el;if(o[a])return o[a];o[a]=this,this.setEl(o),this.updateActiveActions=this.updateActiveActions.bind(this);var s=n.actions||[];s.forEach(function(t,e){"string"==typeof t?t=l[t]:l[t.name]&&(t=r({},l[t.name],t)),s[e]=t});var c=s.length?s:Object.keys(l).map(function(t){return l[t]});n.classes=r({actionbar:"actionbar",button:"action",active:"active"},n.classes);var u=n.classes,h=n.actionbar;if(this.actionbar=h,this.settings=n,this.classes=u,this.actions=c,!h){var d=n.actionbarContainer;h=document.createElement("div"),h.className=u.actionbar,d.appendChild(h),this.actionbar=h,c.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return o(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=t.classes.active;n.className=n.className.replace(i,"").trim(),t.doc.queryCommandState(e.name)&&(n.className+=" "+i)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,s.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,s.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),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sync,i=document.createElement("span"),r=t.icon,o=t.attributes||{};i.className=this.classes.button,t.btn=i;for(var s in o)i.setAttribute(s,o[s]);"string"==typeof r?i.innerHTML=r:i.appendChild(r),this.actionbarEl().appendChild(i),n&&(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=void 0,n=this.doc,i=n.getSelection();if(i&&i.rangeCount){var r=n.createElement("div"),o=i.getRangeAt(0);o.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach(function(t){o.insertNode(t),e=t}),i.removeAllRanges(),i.addRange(o),this.el.focus()}}}]),t}();e.default=c},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link"]}},function(t,e,n){"use strict";t.exports={stylePrefix:"sm-",sectors:[],textNoElement:"Select an element before using Style Manager",hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!1,validComputed:["border-collapse","border-spacing","caption-side","color","cursor","direction","empty-cells","font-family","font-size","font-style","font-variant","font-weight","font-size-adjust","font-stretch","font","letter-spacing","line-height","list-style-image","list-style-position","list-style-type","list-style","orphans","quotes","tab-size","text-align","text-align-last","text-decoration-color","text-indent","text-justify","text-shadow","text-transform","visibility","white-space","widows","word-break","word-spacing","word-wrap"]}},function(t,e,n){"use strict";var i=n(113);t.exports=n(0).Collection.extend({model:i})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(9),o=n(123);t.exports=i.Model.extend({defaults:{id:"",name:"",open:!0,buildProps:"",extendBuilded:1,properties:[]},initialize:function(t){var e=t||{},n=[],i=this.buildProperties(e.buildProps);n=i?this.extendProperties(i):this.get("properties");var o=new r(n);o.sector=this,this.set("properties",o)},extendProperties:function(t,n,i){for(var r=t.length,o=n||this.get("properties"),s=this.get("extendBuilded"),a=[],l=0,c=o.length;l'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(120);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(38);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(127),i=n(128),r=n(131),o=n(41),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(129),view:n(39),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(130);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(40),n(39),n(41);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(133),o=n(42),s=n(134),a=n(44),l=n(135);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(164);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(166),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(168),o=n(169),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(174),i["image-comp"]=n(175),i["move-comp"]=n(176),i["text-comp"]=n(177),i["insert-custom"]=n(51),i["export-template"]=n(178),i["sw-visibility"]=n(179),i["open-layers"]=n(180),i["open-sm"]=n(183),i["open-tm"]=n(184),i["open-blocks"]=n(185),i["open-assets"]=n(186),i["show-offset"]=n(187),i["select-parent"]=n(188),i.fullscreen=n(189),i.preview=n(190),i.resize=n(191),i.drag=n(192),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(48)),r=n(171);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(173);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(51));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(4),o=n(19),s=n(50),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(181),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(182),r=n(52),o=n(53);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(28),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(194),s=n(195),a=n(197),l=n(198),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(196);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(54);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(54)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(199),o=n(200);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(202),r=(n(45),n(203));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(48),r=n(7),o=n(204),s=n(205),a=n(206),l=n(207);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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 Date: Thu, 12 Oct 2017 22:33:22 +0200 Subject: [PATCH 141/143] Bump v0.12.7 --- dist/grapes.min.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 57c10a299f..3b0443589e 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,5 +1,5 @@ -/*! grapesjs - 0.12.5 */ -!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()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=55)}([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(14),e],void 0!==(o=function(t,e,n){a.Backbone=s(a,n,t,e)}.apply(e,r))&&(t.exports=o)}(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){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],l(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],l(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=s(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(43),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(139),l=n(22),c=n(45),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,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),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(114),view:n(31),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(30),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(36),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(34),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(37),view:n(33),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(37),view:n(32),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(121),view:n(122),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(38),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(5),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(5),n(12),n(32),n(33),n(34),n(36),n(16),n(31);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(5).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(50),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(104);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(106);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(111),o=n(112),s=n(9),a=n(124),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(5).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(35);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(117);n(118);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(43),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(44);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(140),o=n(141);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.$el.data("model",i),this.$el.data("collection",r)},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(53));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(52);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l}},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();return this.el.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),this.el.appendChild(e),this.$el.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(57),e=n(58),i=n(212),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.5",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(59),r=n(60),o=n(211);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("RichTextEditor"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(61),n(65),n(73),n(78),n(82),n(86),n(90),n(102),n(108),n(28),n(126),n(132),n(137),n(161),n(167),n(193),n(201)],o=n(0),s=n(208),a=n(49),l=void 0;n(210)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(62),e=n(63),i=n(64);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(66),i=n(67),r=n(68),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(71),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(79),o=n(80),s=n(81);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(85);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(87),o=n(88),s=n(89);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(91),i=n(92),r=n(93),o=n(94),s=n(95),a=n(96),l=n(101),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(6);n(97),n(23),n(100);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(6),n(98),n(99),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(6))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(6))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(6))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(103),o=n(24),s=n(105),a=(n(26),n(107));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";var i=n(109),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(4);t.exports=function(){var t={},e=n(110),i=void 0,s=void 0,a=void 0,l=void 0;return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n;for(var r in e)r in t||(t[r]=e[r]);var a=t.pStylePrefix;return a&&(t.stylePrefix=a+t.stylePrefix),this.pfx=t.stylePrefix,s=t.actions||[],i=document.createElement("div"),i.className=a+"rte-toolbar",l=this.initRte(document.createElement("div")),(0,o.on)(i,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");i.style.pointerEvents="all",e.getToolsEl().appendChild(i)},initRte:function(e){var n=this.pfx,o=i,s=this.actionbar,a=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new r.default({el:e,classes:c,actions:a,actionbar:s,actionbarContainer:o});return l&&l.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,l.addAction(e,{sync:1})},get:function(t){var e=void 0;return l.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return l.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 i},udpatePosition:function(){var e=t.em.get("Canvas"),n=e.getTargetToElementDim(i,a,{event:"rteToolbarPosUpdate"});t.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var r=i.style;r.top=n.top+"px",r.left=n.left+"px"},enable:function(e,n){a=e.el;var r=t.em,o=e.getChildrenContainer(),s=this.customRte;if(i.style.display="",n=s?s.enable(o,n):this.initRte(o).enable(),r){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";r.off(l,this.udpatePosition,this),r.on(l,this.udpatePosition,this),r.trigger("rte:enable",e,n)}return n},disable:function(e,n){var r=t.em,o=this.customRte,s=i.style,a=e.getChildrenContainer();o?o.disable(a,n):n.disable(),s.display="none",s.top=0,s.left=0,r&&r.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=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()+"")}}},c=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var o=n.el;if(o[a])return o[a];o[a]=this,this.setEl(o),this.updateActiveActions=this.updateActiveActions.bind(this);var s=n.actions||[];s.forEach(function(t,e){"string"==typeof t?t=l[t]:l[t.name]&&(t=r({},l[t.name],t)),s[e]=t});var c=s.length?s:Object.keys(l).map(function(t){return l[t]});n.classes=r({actionbar:"actionbar",button:"action",active:"active"},n.classes);var u=n.classes,h=n.actionbar;if(this.actionbar=h,this.settings=n,this.classes=u,this.actions=c,!h){var d=n.actionbarContainer;h=document.createElement("div"),h.className=u.actionbar,d.appendChild(h),this.actionbar=h,c.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return o(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=t.classes.active;n.className=n.className.replace(i,"").trim(),t.doc.queryCommandState(e.name)&&(n.className+=" "+i)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,s.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,s.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),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sync,i=document.createElement("span"),r=t.icon,o=t.attributes||{};i.className=this.classes.button,t.btn=i;for(var s in o)i.setAttribute(s,o[s]);"string"==typeof r?i.innerHTML=r:i.appendChild(r),this.actionbarEl().appendChild(i),n&&(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=void 0,n=this.doc,i=n.getSelection();if(i&&i.rangeCount){var r=n.createElement("div"),o=i.getRangeAt(0);o.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach(function(t){o.insertNode(t),e=t}),i.removeAllRanges(),i.addRange(o),this.el.focus()}}}]),t}();e.default=c},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link"]}},function(t,e,n){"use strict";t.exports={stylePrefix:"sm-",sectors:[],textNoElement:"Select an element before using Style Manager",hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!1,validComputed:["border-collapse","border-spacing","caption-side","color","cursor","direction","empty-cells","font-family","font-size","font-style","font-variant","font-weight","font-size-adjust","font-stretch","font","letter-spacing","line-height","list-style-image","list-style-position","list-style-type","list-style","orphans","quotes","tab-size","text-align","text-align-last","text-decoration-color","text-indent","text-justify","text-shadow","text-transform","visibility","white-space","widows","word-break","word-spacing","word-wrap"]}},function(t,e,n){"use strict";var i=n(113);t.exports=n(0).Collection.extend({model:i})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(9),o=n(123);t.exports=i.Model.extend({defaults:{id:"",name:"",open:!0,buildProps:"",extendBuilded:1,properties:[]},initialize:function(t){var e=t||{},n=[],i=this.buildProperties(e.buildProps);n=i?this.extendProperties(i):this.get("properties");var o=new r(n);o.sector=this,this.set("properties",o)},extendProperties:function(t,n,i){for(var r=t.length,o=n||this.get("properties"),s=this.get("extendBuilded"),a=[],l=0,c=o.length;l'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(120);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(38);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(127),i=n(128),r=n(131),o=n(41),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(129),view:n(39),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(130);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(40),n(39),n(41);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(133),o=n(42),s=n(134),a=n(44),l=n(135);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(164);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(166),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(168),o=n(169),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(174),i["image-comp"]=n(175),i["move-comp"]=n(176),i["text-comp"]=n(177),i["insert-custom"]=n(51),i["export-template"]=n(178),i["sw-visibility"]=n(179),i["open-layers"]=n(180),i["open-sm"]=n(183),i["open-tm"]=n(184),i["open-blocks"]=n(185),i["open-assets"]=n(186),i["show-offset"]=n(187),i["select-parent"]=n(188),i.fullscreen=n(189),i.preview=n(190),i.resize=n(191),i.drag=n(192),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(48)),r=n(171);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(173);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(51));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(4),o=n(19),s=n(50),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(181),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(182),r=n(52),o=n(53);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(28),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(194),s=n(195),a=n(197),l=n(198),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(196);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(54);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(54)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(199),o=n(200);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(202),r=(n(45),n(203));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(48),r=n(7),o=n(204),s=n(205),a=n(206),l=n(207);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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;rthis.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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(43),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(139),l=n(22),c=n(45),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,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),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(114),view:n(31),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(30),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(36),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(34),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(37),view:n(33),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(37),view:n(32),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(121),view:n(122),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(38),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(5),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(5),n(12),n(32),n(33),n(34),n(36),n(16),n(31);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(5).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(50),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(104);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(106);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(111),o=n(112),s=n(9),a=n(124),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(5).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(35);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(117);n(118);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(43),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(44);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(140),o=n(141);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.$el.data("model",i),this.$el.data("collection",r)},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(53));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(52);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l}},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();return this.el.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),this.el.appendChild(e),this.$el.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(57),e=n(58),i=n(212),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.7",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(59),r=n(60),o=n(211);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("RichTextEditor"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(61),n(65),n(73),n(78),n(82),n(86),n(90),n(102),n(108),n(28),n(126),n(132),n(137),n(161),n(167),n(193),n(201)],o=n(0),s=n(208),a=n(49),l=void 0;n(210)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(62),e=n(63),i=n(64);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(66),i=n(67),r=n(68),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(71),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(79),o=n(80),s=n(81);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(85);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(87),o=n(88),s=n(89);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(91),i=n(92),r=n(93),o=n(94),s=n(95),a=n(96),l=n(101),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(6);n(97),n(23),n(100);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(6),n(98),n(99),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(6))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(6))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(6))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(103),o=n(24),s=n(105),a=(n(26),n(107));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";var i=n(109),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(4);t.exports=function(){var t={},e=n(110),i=void 0,s=void 0,a=void 0,l=void 0;return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n;for(var r in e)r in t||(t[r]=e[r]);var a=t.pStylePrefix;return a&&(t.stylePrefix=a+t.stylePrefix),this.pfx=t.stylePrefix,s=t.actions||[],i=document.createElement("div"),i.className=a+"rte-toolbar",l=this.initRte(document.createElement("div")),(0,o.on)(i,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");i.style.pointerEvents="all",e.getToolsEl().appendChild(i)},initRte:function(e){var n=this.pfx,o=i,s=this.actionbar,a=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new r.default({el:e,classes:c,actions:a,actionbar:s,actionbarContainer:o});return l&&l.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,l.addAction(e,{sync:1})},get:function(t){var e=void 0;return l.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return l.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 i},udpatePosition:function(){var e=t.em.get("Canvas"),n=e.getTargetToElementDim(i,a,{event:"rteToolbarPosUpdate"});t.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var r=i.style;r.top=n.top+"px",r.left=n.left+"px"},enable:function(e,n){a=e.el;var r=t.em,o=e.getChildrenContainer(),s=this.customRte;if(i.style.display="",n=s?s.enable(o,n):this.initRte(o).enable(),r){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";r.off(l,this.udpatePosition,this),r.on(l,this.udpatePosition,this),r.trigger("rte:enable",e,n)}return n},disable:function(e,n){var r=t.em,o=this.customRte,s=i.style,a=e.getChildrenContainer();o?o.disable(a,n):n.disable(),s.display="none",s.top=0,s.left=0,r&&r.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=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()+"")}}},c=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var o=n.el;if(o[a])return o[a];o[a]=this,this.setEl(o),this.updateActiveActions=this.updateActiveActions.bind(this);var s=n.actions||[];s.forEach(function(t,e){"string"==typeof t?t=l[t]:l[t.name]&&(t=r({},l[t.name],t)),s[e]=t});var c=s.length?s:Object.keys(l).map(function(t){return l[t]});n.classes=r({actionbar:"actionbar",button:"action",active:"active"},n.classes);var u=n.classes,h=n.actionbar;if(this.actionbar=h,this.settings=n,this.classes=u,this.actions=c,!h){var d=n.actionbarContainer;h=document.createElement("div"),h.className=u.actionbar,d.appendChild(h),this.actionbar=h,c.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return o(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=t.classes.active;n.className=n.className.replace(i,"").trim(),t.doc.queryCommandState(e.name)&&(n.className+=" "+i)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,s.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,s.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),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sync,i=document.createElement("span"),r=t.icon,o=t.attributes||{};i.className=this.classes.button,t.btn=i;for(var s in o)i.setAttribute(s,o[s]);"string"==typeof r?i.innerHTML=r:i.appendChild(r),this.actionbarEl().appendChild(i),n&&(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=void 0,n=this.doc,i=n.getSelection();if(i&&i.rangeCount){var r=n.createElement("div"),o=i.getRangeAt(0);o.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach(function(t){o.insertNode(t),e=t}),i.removeAllRanges(),i.addRange(o),this.el.focus()}}}]),t}();e.default=c},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link"]}},function(t,e,n){"use strict";t.exports={stylePrefix:"sm-",sectors:[],textNoElement:"Select an element before using Style Manager",hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!1,validComputed:["border-collapse","border-spacing","caption-side","color","cursor","direction","empty-cells","font-family","font-size","font-style","font-variant","font-weight","font-size-adjust","font-stretch","font","letter-spacing","line-height","list-style-image","list-style-position","list-style-type","list-style","orphans","quotes","tab-size","text-align","text-align-last","text-decoration-color","text-indent","text-justify","text-shadow","text-transform","visibility","white-space","widows","word-break","word-spacing","word-wrap"]}},function(t,e,n){"use strict";var i=n(113);t.exports=n(0).Collection.extend({model:i})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(9),o=n(123);t.exports=i.Model.extend({defaults:{id:"",name:"",open:!0,buildProps:"",extendBuilded:1,properties:[]},initialize:function(t){var e=t||{},n=[],i=this.buildProperties(e.buildProps);n=i?this.extendProperties(i):this.get("properties");var o=new r(n);o.sector=this,this.set("properties",o)},extendProperties:function(t,n,i){for(var r=t.length,o=n||this.get("properties"),s=this.get("extendBuilded"),a=[],l=0,c=o.length;l'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(120);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(38);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(127),i=n(128),r=n(131),o=n(41),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(129),view:n(39),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(130);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(40),n(39),n(41);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(133),o=n(42),s=n(134),a=n(44),l=n(135);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(164);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(166),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(168),o=n(169),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(174),i["image-comp"]=n(175),i["move-comp"]=n(176),i["text-comp"]=n(177),i["insert-custom"]=n(51),i["export-template"]=n(178),i["sw-visibility"]=n(179),i["open-layers"]=n(180),i["open-sm"]=n(183),i["open-tm"]=n(184),i["open-blocks"]=n(185),i["open-assets"]=n(186),i["show-offset"]=n(187),i["select-parent"]=n(188),i.fullscreen=n(189),i.preview=n(190),i.resize=n(191),i.drag=n(192),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(48)),r=n(171);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(173);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(51));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(4),o=n(19),s=n(50),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(181),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(182),r=n(52),o=n(53);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(28),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(194),s=n(195),a=n(197),l=n(198),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(196);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(54);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(54)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(199),o=n(200);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(202),r=(n(45),n(203));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(48),r=n(7),o=n(204),s=n(205),a=n(206),l=n(207);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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 Date: Thu, 12 Oct 2017 23:43:30 +0200 Subject: [PATCH 142/143] Add update on actions in RichTextEditor class --- src/rich_text_editor/index.js | 26 ++++++++++++++------ src/rich_text_editor/model/RichTextEditor.js | 10 ++++++-- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 934fa05696..3b01f368ee 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -1,10 +1,4 @@ /** - * * [add](#add) - * * [get](#get) - * * [getAll](#getall) - * * [remove](#remove) - * * [getToolbarEl](#gettoolbarel) - * * This module allows to customize the toolbar of the Rich Text Editor and use commands from the HTML Editing APIs. * For more info about HTML Editing APIs check here: * https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand @@ -130,12 +124,28 @@ module.exports = () => { * }); * rte.add('link', { * icon: document.getElementById('t'), - * // Bind the 'result' on 'onclick' listener - * event: 'click', * attributes: {title: 'Link',} * // Example on it's easy to wrap a selected content * result: rte => rte.insertHTML(`${rte.selection()}`) * }); + * // An example with fontSize + * rte.add('fontSize', { + * icon: ``, + * // Bind the 'result' on 'change' listener + * event: 'change', + * result: (rte, action) => rte.exec('fontSize', action.btn.firstChild.value), + * // Callback on any input change (mousedown, keydown, etc..) + * update: (rte, action) => { + * const value = rte.doc.queryCommandValue(action.name); + * if (value != 'false') { // value is a string + * action.btn.firstChild.value = value; + * } + * } + * }) */ add(name, action = {}) { action.name = name; diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index 565376b63e..11631fcc50 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -102,12 +102,18 @@ export default class RichTextEditor { updateActiveActions() { this.getActions().forEach(action => { const btn = action.btn; + const update = action.update; const active = this.classes.active; + const name = action.name; + const doc = this.doc; btn.className = btn.className.replace(active, '').trim(); - if (this.doc.queryCommandState(action.name)) { + // doc.queryCommandValue(name) != 'false' + if (doc.queryCommandState(name)) { btn.className += ` ${active}`; } + + update && update(this, action); }) } @@ -141,7 +147,7 @@ export default class RichTextEditor { this.getActions().forEach(action => { const event = action.event || 'click'; action.btn[`on${event}`] = e => { - action.result(this); + action.result(this, action); this.updateActiveActions(); }; }) From 9e8f7ccdb38b549b600b02f7be78d7ea0d691b7b Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 12 Oct 2017 23:53:50 +0200 Subject: [PATCH 143/143] Bump v0.12.8 --- dist/grapes.min.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/grapes.min.js b/dist/grapes.min.js index 3b0443589e..ea036b78b2 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,5 +1,5 @@ -/*! grapesjs - 0.12.7 */ -!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()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=55)}([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(14),e],void 0!==(o=function(t,e,n){a.Backbone=s(a,n,t,e)}.apply(e,r))&&(t.exports=o)}(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){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],l(t,this),r)};case 4:return function(t,r,o){return n[e](this[i],l(t,this),r,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=s(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?c(t):n.isString(t)?function(e){return e.get(t)}:t},c=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},u=e.Events={},h=/\s+/,d=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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(43),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(139),l=n(22),c=n(45),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,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),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(114),view:n(31),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(30),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(36),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(34),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(37),view:n(33),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(37),view:n(32),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(121),view:n(122),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(38),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(5),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(5),n(12),n(32),n(33),n(34),n(36),n(16),n(31);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(5).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(50),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(104);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(106);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(111),o=n(112),s=n(9),a=n(124),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(5).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(35);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(117);n(118);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(43),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(44);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(140),o=n(141);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.$el.data("model",i),this.$el.data("collection",r)},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(53));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(52);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l}},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();return this.el.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),this.el.appendChild(e),this.$el.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(57),e=n(58),i=n(212),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.7",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(59),r=n(60),o=n(211);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("RichTextEditor"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(61),n(65),n(73),n(78),n(82),n(86),n(90),n(102),n(108),n(28),n(126),n(132),n(137),n(161),n(167),n(193),n(201)],o=n(0),s=n(208),a=n(49),l=void 0;n(210)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(62),e=n(63),i=n(64);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(66),i=n(67),r=n(68),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(71),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(79),o=n(80),s=n(81);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(85);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(87),o=n(88),s=n(89);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(91),i=n(92),r=n(93),o=n(94),s=n(95),a=n(96),l=n(101),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(6);n(97),n(23),n(100);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(6),n(98),n(99),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(6))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(6))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(6))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(103),o=n(24),s=n(105),a=(n(26),n(107));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";var i=n(109),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(4);t.exports=function(){var t={},e=n(110),i=void 0,s=void 0,a=void 0,l=void 0;return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n;for(var r in e)r in t||(t[r]=e[r]);var a=t.pStylePrefix;return a&&(t.stylePrefix=a+t.stylePrefix),this.pfx=t.stylePrefix,s=t.actions||[],i=document.createElement("div"),i.className=a+"rte-toolbar",l=this.initRte(document.createElement("div")),(0,o.on)(i,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");i.style.pointerEvents="all",e.getToolsEl().appendChild(i)},initRte:function(e){var n=this.pfx,o=i,s=this.actionbar,a=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new r.default({el:e,classes:c,actions:a,actionbar:s,actionbarContainer:o});return l&&l.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,l.addAction(e,{sync:1})},get:function(t){var e=void 0;return l.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return l.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 i},udpatePosition:function(){var e=t.em.get("Canvas"),n=e.getTargetToElementDim(i,a,{event:"rteToolbarPosUpdate"});t.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var r=i.style;r.top=n.top+"px",r.left=n.left+"px"},enable:function(e,n){a=e.el;var r=t.em,o=e.getChildrenContainer(),s=this.customRte;if(i.style.display="",n=s?s.enable(o,n):this.initRte(o).enable(),r){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";r.off(l,this.udpatePosition,this),r.on(l,this.udpatePosition,this),r.trigger("rte:enable",e,n)}return n},disable:function(e,n){var r=t.em,o=this.customRte,s=i.style,a=e.getChildrenContainer();o?o.disable(a,n):n.disable(),s.display="none",s.top=0,s.left=0,r&&r.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=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()+"")}}},c=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var o=n.el;if(o[a])return o[a];o[a]=this,this.setEl(o),this.updateActiveActions=this.updateActiveActions.bind(this);var s=n.actions||[];s.forEach(function(t,e){"string"==typeof t?t=l[t]:l[t.name]&&(t=r({},l[t.name],t)),s[e]=t});var c=s.length?s:Object.keys(l).map(function(t){return l[t]});n.classes=r({actionbar:"actionbar",button:"action",active:"active"},n.classes);var u=n.classes,h=n.actionbar;if(this.actionbar=h,this.settings=n,this.classes=u,this.actions=c,!h){var d=n.actionbarContainer;h=document.createElement("div"),h.className=u.actionbar,d.appendChild(h),this.actionbar=h,c.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return o(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=t.classes.active;n.className=n.className.replace(i,"").trim(),t.doc.queryCommandState(e.name)&&(n.className+=" "+i)})}},{key:"enable",value:function(){return this.enabled?this:(this.actionbarEl().style.display="",this.el.contentEditable=!0,(0,s.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,s.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),t.updateActiveActions()}})}},{key:"addAction",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sync,i=document.createElement("span"),r=t.icon,o=t.attributes||{};i.className=this.classes.button,t.btn=i;for(var s in o)i.setAttribute(s,o[s]);"string"==typeof r?i.innerHTML=r:i.appendChild(r),this.actionbarEl().appendChild(i),n&&(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=void 0,n=this.doc,i=n.getSelection();if(i&&i.rangeCount){var r=n.createElement("div"),o=i.getRangeAt(0);o.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach(function(t){o.insertNode(t),e=t}),i.removeAllRanges(),i.addRange(o),this.el.focus()}}}]),t}();e.default=c},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link"]}},function(t,e,n){"use strict";t.exports={stylePrefix:"sm-",sectors:[],textNoElement:"Select an element before using Style Manager",hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!1,validComputed:["border-collapse","border-spacing","caption-side","color","cursor","direction","empty-cells","font-family","font-size","font-style","font-variant","font-weight","font-size-adjust","font-stretch","font","letter-spacing","line-height","list-style-image","list-style-position","list-style-type","list-style","orphans","quotes","tab-size","text-align","text-align-last","text-decoration-color","text-indent","text-justify","text-shadow","text-transform","visibility","white-space","widows","word-break","word-spacing","word-wrap"]}},function(t,e,n){"use strict";var i=n(113);t.exports=n(0).Collection.extend({model:i})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(9),o=n(123);t.exports=i.Model.extend({defaults:{id:"",name:"",open:!0,buildProps:"",extendBuilded:1,properties:[]},initialize:function(t){var e=t||{},n=[],i=this.buildProperties(e.buildProps);n=i?this.extendProperties(i):this.get("properties");var o=new r(n);o.sector=this,this.set("properties",o)},extendProperties:function(t,n,i){for(var r=t.length,o=n||this.get("properties"),s=this.get("extendBuilded"),a=[],l=0,c=o.length;l'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(120);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(38);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(127),i=n(128),r=n(131),o=n(41),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(129),view:n(39),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(130);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(40),n(39),n(41);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(133),o=n(42),s=n(134),a=n(44),l=n(135);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(164);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(166),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(168),o=n(169),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(174),i["image-comp"]=n(175),i["move-comp"]=n(176),i["text-comp"]=n(177),i["insert-custom"]=n(51),i["export-template"]=n(178),i["sw-visibility"]=n(179),i["open-layers"]=n(180),i["open-sm"]=n(183),i["open-tm"]=n(184),i["open-blocks"]=n(185),i["open-assets"]=n(186),i["show-offset"]=n(187),i["select-parent"]=n(188),i.fullscreen=n(189),i.preview=n(190),i.resize=n(191),i.drag=n(192),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(48)),r=n(171);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(173);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(51));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(4),o=n(19),s=n(50),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(181),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(182),r=n(52),o=n(53);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(28),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(194),s=n(195),a=n(197),l=n(198),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(196);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(54);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(54)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(199),o=n(200);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(202),r=(n(45),n(203));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(48),r=n(7),o=n(204),s=n(205),a=n(206),l=n(207);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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;rthis.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,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(_,"/"),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),I.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(!I.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($,"")),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 I;var F=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=x.extend=P.extend=S.extend=I.extend=F;var z=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})}).call(e,n(15))},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(r=n[s?s[l]:l],l+=t),e(n,i,r,s,l,a)}}function o(t){return function(e,n,i){n=S(n,i);for(var r=A(e),o=t>0?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 o=n(i,r),i[o]===r?o:-1;if(r!==r)return o=e(p.call(i,s,a),C.isNaN),o>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&o=0&&e<=P};C.each=C.forEach=function(t,e,n){e=k(e,n);var i,r;if(L(t))for(i=0,r=t.length;i=0},C.invoke=function(t,e){var n=p.call(arguments,2),i=C.isFunction(e);return C.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},C.pluck=function(t,e){return C.map(t,C.property(e))},C.where=function(t,e){return C.filter(t,C.matcher(e))},C.findWhere=function(t,e){return C.find(t,C.matcher(e))},C.max=function(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ao&&(o=i)}else e=S(e,n),C.each(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o},C.min=function(t,e,n){var i,r,o=1/0,s=1/0;if(null==e&&null!=t){t=L(t)?t:C.values(t);for(var a=0,l=t.length;ai||void 0===n)return 1;if(ne?(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}},C.debounce=function(t,e,n){var i,r,o,s,a,l=function(){var c=C.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=C.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r),o=r=null),a}},C.wrap=function(t,e){return C.partial(e,t)},C.negate=function(t){return function(){return!t.apply(this,arguments)}},C.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}},C.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},C.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},C.once=C.partial(C.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),_=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];C.keys=function(t){if(!C.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)C.has(t,n)&&e.push(n);return D&&a(t,e),e},C.allKeys=function(t){if(!C.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&a(t,e),e},C.values=function(t){for(var e=C.keys(t),n=e.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},z=C.invert(F),R=function(t){var e=function(e){return t[e]},n="(?:"+C.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}};C.escape=R(F),C.unescape=R(z),C.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),C.isFunction(i)?i.call(t):i};var H=0;C.uniqueId=function(t){var e=++H+"";return t?t+e:e},C.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var V=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+B[t]};C.template=function(t,e,n){!e&&n&&(e=n),e=C.defaults({},e,C.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(j,W),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,C)};return a.source="function("+(e.variable||"obj")+"){\n"+o+"}",a},C.chain=function(t){var e=C(t);return e._chain=!0,e};var U=function(t,e){return t._chain?C(e).chain():e};C.mixin=function(t){C.each(C.functions(t),function(e){var n=C[e]=t[e];C.prototype[e]=function(){var t=[this._wrapped];return f.apply(t,arguments),U(this,n.apply(C,t))}})},C.mixin(C),C.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];C.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),C.each(["concat","join","slice"],function(t){var e=u[t];C.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),C.prototype.value=function(){return this._wrapped},C.prototype.valueOf=C.prototype.toJSON=C.prototype.value,C.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return C}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){"use strict";(function(e){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=n(43),o=function(t){return t&&t.__esModule?t:{default:t}}(r),s=n(0),a=n(139),l=n(22),c=n(45),u=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};t.exports=s.Model.extend(o.default).extend({defaults:{tagName:"div",type:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,void:!1,state:"",status:"",content:"",icon:"",style:{},attributes:"",classes:"",script:"",traits:["id","title"],toolbar:null},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.sm||{};e&&e.config&&e.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),this.opt=e,this.sm=n,this.config=t,this.set("attributes",this.get("attributes")||{}),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:traits",this.traitsUpdated),this.loadTraits(),this.initClasses(),this.initComponents(),this.initToolbar(),["stylable"].forEach(function(t){var e=this.get(t);if("string"==typeof e){var n=e.split(",").map(function(t){return t.trim()});this.set(t,n)}},this),this.set("status",""),this.init()},initClasses:function(){var t=this.normalizeClasses(this.get("classes")||this.config.classes||[]);return this.set("classes",new l(t)),this},initComponents:function(){var t=new a(this.get("components"),this.opt);return t.parent=this,this.set("components",t),this},init:function(){},scriptUpdated:function(){this.set("scriptUpdated",1)},traitsUpdated:function(){var t=0,e=Object.assign({},this.get("attributes")),n=this.get("traits");if(!(n instanceof c))return void this.loadTraits();n.each(function(n){if(t=1,!n.get("changeProp")){var i=n.getInitValue();i&&(e[n.get("name")]=i)}}),t&&this.set("attributes",e)},initToolbar:function(){var t=this;if(!t.get("toolbar")){var e=[];t.collection&&e.push({attributes:{class:"fa fa-arrow-up"},command:"select-parent"}),t.get("draggable")&&e.push({attributes:{class:"fa fa-arrows"},command:"tlb-move"}),t.get("copyable")&&e.push({attributes:{class:"fa fa-clone"},command:"tlb-clone"}),t.get("removable")&&e.push({attributes:{class:"fa fa-trash-o"},command:"tlb-delete"}),t.set("toolbar",e)}},loadTraits:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new c;return n.setTarget(this),t=t||this.get("traits"),t.length&&n.add(t),this.set("traits",n,e),this},normalizeClasses:function(t){var e=[];if(this.sm.get){var n=this.sm.get("SelectorManager");if(n)return t.forEach(function(t){var i="";i="string"==typeof t?t:t.name;var r=n.add(i);e.push(r)}),e}},clone:function(t){var n=e.clone(this.attributes),i=this.get("components"),r=this.get("traits"),o=this.get("classes");return n.components=[],n.classes=[],n.traits=[],i.each(function(t,e){n.components[e]=t.clone(1)}),r.each(function(t,e){n.traits[e]=t.clone()}),o.each(function(t,e){n.classes[e]=t.get("name")}),n.status="",n.view="",t&&(this.opt.collection=null),new this.constructor(n,this.opt)},getName:function(){var t=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(t){var n="",r=this,o=r.get("tagName"),s=0,a=r.get("void"),l="",c="",u=this.getAttrToHTML();for(var h in u){"id"==h&&(s=1);var d=u[h];c+=void 0!==(void 0===d?"undefined":i(d))&&""!==d?" "+h+'="'+d+'"':""}var f="";return r.get("classes").each(function(t){f+=" "+t.get("name")}),f=""!==f?' class="'+f.trim()+'"':"",e.isEmpty(r.get("style"))||s||(l=' id="'+r.getId()+'" '),n+="<"+o+f+l+c+(a?"/":"")+">"+r.get("content"),r.get("components").each(function(t){n+=t.toHTML()}),a||(n+=""),n},getAttrToHTML:function(){var t=this.get("attributes")||{};return delete t.style,t},toJSON:function(){for(var t=arguments.length,e=Array(t),n=0;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:{change:"inputValueChanged"},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.em=this.config.em,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 e=this.model;this.property=e.get("property"),this.input=null;var n=this.pfx;this.inputHolderId="#"+n+"input-holder",this.sector=e.collection&&e.collection.sector,e.get("value")||e.set("value",e.getDefaultValue()),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:value",this.modelValueChanged),this.listenTo(e,"targetUpdated",this.targetUpdated),this.listenTo(e,"change:visible",this.updateVisibility),this.listenTo(e,"change:status",this.updateStatus),this.events["click ."+n+"clear"]="clear",this.delegateEvents();var i=this.init&&this.init.bind(this);i&&i()},updateStatus:function(){var t=this.model.get("status"),e=this.pfx,n=this.ppfx,i=this.config,r=n+"color-hl",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(){this.getTargetModel().removeStyle(this.model.get("property")),this.targetUpdated()},getClearEl:function(){return this.el.querySelector("."+this.pfx+"clear")},getTarget:function(){return this.getTargetModel()},getTargetModel:function(){return this.propTarget&&this.propTarget.model},getHelperModel:function(){return this.propTarget&&this.propTarget.helper},inputValueChanged:function(){this.model.set("value",this.getInputValue()),this.elementUpdated()},elementUpdated:function(){this.model.set("status","updated")},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.set("value",i,{silent:1}),this.setValue(i,{targetUpdate:1}),n.set("status",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")],t=n.parseValue(t),t||e.ignoreDefault||(t=n.getDefaultValue()),"function"==typeof r&&!e.ignoreCustomValue){var o=n.collection.indexOf(n),s=r(this,o);s&&(t=s)}return t},getComputedValue:function(){var t=this.propTarget.computed,e=this.config.validComputed,n=this.model.get("property");return t&&e.indexOf(n)>=0&&t[n]},getInputValue:function(){var t=this.getInputEl();return t?t.value:""},modelValueChanged:function(t,e,n){var i=this.config.em,r=this.model,o=r.getFullValue(),s=this.getTarget(),a=this.onChange;this.setRawValue(o),s&&this.isTargetStylable()&&this.isComponentStylable()&&(a?a(s,this,n):this.updateTargetStyle(o,null,n),i&&(i.trigger("component:update",r),i.trigger("component:styleUpdate",r),i.trigger("component:styleUpdate:"+r.get("property"),r)))},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(){var t=this.getTarget().get("stylable");return t instanceof Array&&(t=n.indexOf(t,this.property)>=0),t},isComponentStylable:function(){var t=this.em,e=t&&t.get("selectedComponent");if(!e)return!0;var i=e.get("stylable");return i instanceof Array&&(i=n.indexOf(i,this.property)>=0),i},setRawValue:function(t){this.setValue(this.model.parseValue(t))},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("value")||e.getDefaultValue(),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})}})}).call(e,n(0),n(1))},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(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}}function d(t,e){for(var n=0;n=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function p(t){for(;Hs.length<=t;)Hs.push(g(Hs)+" ");return Hs[t]}function g(t){return t[t.length-1]}function m(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||Vs.test(t))}function w(t,e){return e?!!(e.source.indexOf("\\w")>-1&&x(t))||e.test(t):x(t)}function C(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Bs.test(t)}function S(t,e,n){for(;(n<0?e>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?_(n,E(t,n).text.length):j(e,E(t,e.line).text.length)}function j(t,e){var n=t.ch;return null==n||n>e?_(t.line,e):n<0?_(t.line,0):t}function W(t,e){for(var n=[],i=0;i=e:o.to>e);(i||(i=[])).push(new K(s,o.from,l?null:o.to))}}return i}function Z(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 w=0;w0)){var u=[l,1],h=$(c.from,a.from),f=$(c.to,a.to);(h<0||!s.inclusiveLeft&&!h)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.to,n)>=0:$(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?$(c.from,i)<=0:$(c.from,i)<0)))return!0}}}function ht(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function dt(t){for(var e;e=ct(t);)t=e.find(1,!0).line;return t}function ft(t){for(var e,n;e=ct(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function pt(t,e){var n=E(t,e),i=ht(n);return n==i?e:N(i)}function gt(t,e){if(e>t.lastLine())return e;var n,i=E(t,e);if(!mt(t,i))return e;for(;n=ct(i);)i=n.find(1,!0).line;return N(i)+1}function mt(t,e){var n=Ws&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function wt(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;oe||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function Ct(t,e,n){var i;Us=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:Us=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:Us=r)}return null!=i?i:Us}function kt(t,e){var n=t.order;return null==n&&(n=t.order=qs(t.text,e)),n}function St(t,e,n){var i=S(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Tt(t,e,n){var i=St(t,e.ch,n);return null==i?null:new _(e.line,i,n<0?"after":"before")}function Mt(t,e,n,i,r){if(t){var o=kt(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){var u=Je(e,n);s=r<0?n.text.length-1:0;var h=Ze(e,u,s).top;s=T(function(t){return Ze(e,u,t).top==h},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=St(n,s,1))}else s=r<0?a.to:a.from;return new _(i,s,c)}}return new _(i,r<0?n.text.length:0,r<0?"before":"after")}function Et(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return Tt(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ct(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 _(n.line,d,f)}}var p=function(t,e,i){for(var o=function(t,e){return e?new _(n.line,l(t,1),"before"):new _(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==m||i>0&&m==e.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function Pt(t,e){return t._handlers&&t._handlers[e]||Ks}function At(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=d(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Lt(t,e){var n=Pt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Dt(t){t.prototype.on=function(t,e){Gs(this,t,e)},t.prototype.off=function(t,e){At(this,t,e)}}function _t(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function $t(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){_t(t),$t(t)}function Rt(t){return t.target||t.srcElement}function Ht(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ks&&t.ctrlKey&&1==e&&(e=3),e}function Vt(t){if(null==Is){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Is=e.offsetWidth<=1&&e.offsetHeight>2&&!(hs&&ds<8))}var r=Is?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Bt(t){if(null!=Ds)return Ds;var i=n(t,document.createTextNode("AخA")),r=Es(i,0,1).getBoundingClientRect(),o=Es(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(Ds=o.right-r.right<3)}function jt(t){if(null!=Qs)return Qs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=Es(e,0,1).getBoundingClientRect();return Qs=Math.abs(r.left-o.left)>1}function Wt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=e}function Ut(t,e){ea[t]=e}function qt(t){if("string"==typeof t&&ea.hasOwnProperty(t))t=ea[t];else if(t&&"string"==typeof t.name&&ea.hasOwnProperty(t.name)){var e=ea[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return qt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return qt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=qt(e);var n=ta[e.name];if(!n)return Kt(t,"text/plain");var i=n(t,e);if(na.hasOwnProperty(e.name)){var r=na[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}function Gt(t,e){u(e,na.hasOwnProperty(t)?na[t]:na[t]={})}function Yt(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 Xt(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 Jt(t,e,n){return!t.startState||t.startState(e,n)}function Zt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=n.state,a=0;at&&r.splice(a,1,t,r[a+1],i),a+=2,l=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength&&Yt(t.doc.mode,i.state),o=Zt(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 te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new oa(i,!0,e);var o=ae(t,e,n),s=o>i.first&&E(i,o-1).stateAfter,a=s?oa.fromSaved(i,s,o):new oa(i,Jt(i.mode),o);return i.iter(o,e,function(n){ee(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.")}function re(t,e,n,i){var r,o=t.doc,s=o.mode;e=B(o,e);var a,l=E(o,e.line),c=te(t,e.line,n),u=new ia(l.text,t.options.tabSize,c);for(i&&(a=[]);(i||u.post.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,h.pos),h.pos=e.length,l=null):l=oe(ie(n,h,i.state,d),o),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=E(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ra?c.lookAhead:0)<=o.modeFrontier))return a;var u=h(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=E(t,i).stateAfter;if(r&&(!(r instanceof ra)||i+r.lookAhead1&&!/ /.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 ve(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 ye(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,m="",v=0;;){if(v==p){l=c=u=h=a="",d=null,v=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&&v>w.to&&(v=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==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&!h&&(h=C.title),C.collapsed&&(!d||st(d.marker,C)<0)&&(d=w)):w.from>p&&v>w.from&&(v=w.from)}if(b)for(var k=0;k=f)break;for(var T=Math.min(f,v);;){if(m){var M=p+m.length;if(!d){var E=M>T?m.slice(0,T-p):m;e.addToken(e,E,s?s+l:l,u,p+E.length==v?c:"",h,a)}if(M>=T){m=m.slice(T-p),p=T;break}p=M,u=""}m=r.slice(o,o=n[g++]),s=he(n[g++],e.cm.options)}}else for(var P=1;P2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ke(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Ge(t,e){e=ht(e);var i=N(e),r=t.display.externalMeasured=new be(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ye(t,e,n,i){return Ze(t,Je(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(o=l-a,r=o-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 en(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var h;r=t.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==i?h.length-1:0]:s.getBoundingClientRect()}if(hs&&ds<9&&!a&&(!r||!r.left&&!r.right)){var d=s.parentNode.getClientRects()[0];r=d?{left:d.left,right:d.left+xn(t.display),top:d.top,bottom:d.bottom}:fa}for(var f=r.top-e.rect.top,p=r.bottom-e.rect.top,g=(f+p)/2,m=e.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var h=Ct(l,c,u),d=Us,f=a(c,h,"before"==u);return null!=d&&(f.other=a(c,d,"before"!=u)),f}function fn(t,e){var n=0;e=B(t.doc,e),t.options.lineWrapping||(n=xn(t.display)*e.ch);var i=E(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=_(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 pn(i.first,0,null,!0,-1);var r=O(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,E(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=E(i,r);;){var a=yn(t,s,r,e,n),l=ct(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=N(s=c.to.line)}}function mn(t,e,n,i){var r=function(i){return cn(t,e,Ze(t,n,i),"line")},o=e.text.length,s=T(function(t){return r(t-1).bottom<=i},o,0);return o=T(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function vn(t,e,n,i){return mn(t,e,n,cn(t,e,Ze(t,n,i),"line").top)}function yn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=Je(t,e);if(kt(e,t.doc.direction)){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end}o=new _(n,Math.floor(s+(a-s)/2));var u,h,d=dn(t,o,"line",e,l).left,f=d1){var y=Math.abs(p-u)/g;g=Math.min(g,Math.ceil(Math.abs(p)/y)),f=p<0?1:-1}}while(0!=p&&(g>1||f<0!=p<0&&Math.abs(p)<=Math.abs(u)));if(Math.abs(p)>Math.abs(u)){if(p<0==u<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var b=T(function(n){var o=cn(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.rightx.right?1:0,o}function bn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==la){la=i("pre");for(var r=0;r<49;++r)la.appendChild(document.createTextNode("x")),la.appendChild(i("br"));la.appendChild(document.createTextNode("x"))}n(t.measure,la);var o=la.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function xn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(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:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function kn(t){var e=bn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/xn(t.display)-3);return function(r){if(mt(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().line3&&(r(f,g.top,null,g.bottom),f=u,g.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),f0?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 On(t){t.state.focused||(t.display.input.focus(),Dn(t))}function In(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,_n(t))},100)}function Dn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),fs&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),Nn(t))}function _n(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Ls(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function $n(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(L(r.line,o),Fn(r.line),r.rest))for(var c=0;c=s&&(o=O(e,yt(E(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Rn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!bs){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+je(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function Bn(t,e,n,i){null==i&&(i=0);var r;t.options.lineWrapping||e!=n||(e=e.ch?_(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e,n="before"==e.sticky?_(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=Wn(t,r),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(Qn(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(s=!0)),!s)break}return r}function jn(t,e){var n=Wn(t,e);null!=n.scrollTop&&Jn(t,n.scrollTop),null!=n.scrollLeft&&Qn(t,n.scrollLeft)}function Wn(t,e){var n=t.display,i=bn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ue(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+Ve(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=We(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 Un(t,e){null!=e&&(Yn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function qn(t){Yn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Kn(t,e,n){null==e&&null==n||Yn(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function Gn(t,e){Yn(t),t.curOp.scrollToPos=e}function Yn(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;Xn(t,fn(t,e.from),fn(t,e.to),e.margin)}}function Xn(t,e,n,i){var r=Wn(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});Kn(t,r.scrollLeft,r.scrollTop)}function Jn(t,e){Math.abs(t.doc.scrollTop-e)<2||(as||Ai(t,{top:e}),Zn(t,e,!0),as&&Ai(t),Ci(t,100))}function Zn(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 Qn(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,Rn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function ti(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Ve(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+je(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function ei(t,e){e||(e=ti(t));var n=t.display.barWidth,i=t.display.barHeight;ni(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$n(t),ni(t,ti(t)),n=t.display.barWidth,i=t.display.barHeight}function ni(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=""}function ii(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ls(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ma[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Gs(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?Qn(t,e):Jn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function ri(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:++va},we(t.curOp)}function oi(t){ke(t.curOp,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ya(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function li(t){t.updatedDisplay=t.mustUpdate&&Ei(t.cm,t.update)}function ci(t){var e=t.cm,n=e.display;t.updatedDisplay&&$n(e),t.barMeasure=ti(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ye(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+je(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-We(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function ui(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ws&&pt(t.doc,e)r.viewFrom?yi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)yi(t);else if(e<=r.viewFrom){var o=bi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):yi(t)}else if(n>=r.viewTo){var s=bi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):yi(t)}else{var a=bi(t,e,e,-1),l=bi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(xe(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):yi(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Mn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==d(s,n)&&s.push(n)}}}function yi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function bi(t,e,n,i){var r,o=Mn(t,e),s=t.display.view;if(!Ws||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(;pt(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 xi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=xe(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=xe(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Mn(t,n)))),i.viewTo=n}function wi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo)){var n=+new Date+t.options.workTime,i=te(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?Yt(e.mode,i.state):null,l=Zt(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 Ci(t,t.options.workDelay),!0}),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&di(t,function(){for(var e=0;e=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==wi(t))return!1;Hn(t)&&(yi(t),n.dims=wn(t));var o=r.first+r.size,s=Math.max(n.visible.from-t.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Ws&&(s=pt(t.doc,s),a=gt(t.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;xi(t,s,a),i.viewOffset=yt(E(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=wi(t);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=Ti(t);return c>4&&(i.lineDiv.style.display="none"),Li(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Mi(u),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ci(t,400)),i.updateLineNumbers=null,!0}function Pi(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=We(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Ve(t.display)-Ue(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Ei(t,e);i=!1){$n(t);var r=ti(t);En(t),ei(t,r),Oi(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 Ai(t,e){var n=new ya(t,e);if(Ei(t,n)){$n(t),Pi(t,n);var i=ti(t);En(t),ei(t,i),Oi(t,i),n.finish()}}function Li(t,n,i){function r(e){var n=e.nextSibling;return fs&&ks&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,h=0;h-1&&(p=!1),Me(t,f,u,i)),p&&(e(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(D(t.options,u)))),l=f.node.nextSibling}else{var g=De(t,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Ni(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Oi(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+je(t)+"px"}function Ii(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function _i(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function $i(t){var e=_i(t);return e.x*=xa,e.y*=xa,e}function Fi(t,e){var n=_i(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ks&&fs)t:for(var c=e.target,u=o.view;c!=s;c=c.parentNode)for(var h=0;h=0){var s=H(o.from(),r.from()),a=R(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new Ca(l?a:s,l?s:a))}}return new wa(t,e)}function Ri(t,e){return new wa([new Ca(t,e||t)],0)}function Hi(t){return t.text?_(t.from.line+t.text.length-1,g(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Vi(t,e){if($(t,e.from)<0)return t;if($(t,e.to)<=0)return Hi(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+=Hi(e).ch-e.to.ch),_(n,i)}function Bi(t,e){for(var n=[],i=0;i1&&t.remove(a.line+1,p-1),t.insert(a.line+1,y)}Se(t,"change",t,e)}function Yi(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),g(t.done)):void 0}function ir(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=nr(r,r.lastOp==i)))s=g(o.changes),0==$(e.from,e.to)&&0==$(e.from,s.to)?s.to=Hi(e):o.changes.push(tr(t,e));else{var l=g(r.done);for(l&&l.ranges||sr(t.sel,r.done),o={changes:[tr(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||Lt(t,"historyAdded")}function rr(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)}function or(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||rr(t,o,g(r.done),e))?r.done[r.done.length-1]=e:sr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&er(r.undone)}function sr(t,e){var n=g(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ar(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 lr(t){if(!t)return null;for(var e,n=0;n-1&&(g(a)[h]=c[h],delete c[h])}}}return i}function dr(t,e,n,i){if(i){var r=t.anchor;if(n){var o=$(e,r)<0;o!=$(n,r)<0?(r=e,e=n):o!=$(e,n)<0&&(e=n)}return new Ca(r,e)}return new Ca(n||e,e)}function fr(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),br(t,new wa([dr(t.sel.primary(),e,n,r)],0),i)}function pr(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&&(Lt(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=Mr(t,c,-i,c&&c.line==e.line?o:null)),c&&c.line==e.line&&(u=$(c,n))&&(i<0?u<0:u>0))return Sr(t,c,e,i,r)}var h=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(h=Mr(t,h,i,h.line==e.line?o:null)),h?Sr(t,h,e,i,r):null}}return e}function Tr(t,e,n,i,r){var o=i||1,s=Sr(t,e,n,o,r)||!r&&Sr(t,e,n,o,!0)||Sr(t,e,n,-o,r)||!r&&Sr(t,e,n,-o,!0);return s||(t.cantEdit=!0,_(t.first,0))}function Mr(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?B(t,_(e.line-1)):null:n>0&&e.ch==(i||E(t,e.line)).text.length?e.line=0;--r)Lr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else Lr(t,e)}}function Lr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=$(e.from,e.to)){var n=Bi(t,e);ir(t,e,n,t.cm?t.cm.curOp.id:NaN),Ir(t,e,n,Q(t,e));var i=[];Yi(t,function(t,n){n||-1!=d(i,t.history)||(zr(t.history,e),i.push(t.history)),Ir(t,e,null,Q(t,e))})}}function Nr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--h){var f=function(n){var r=i.changes[n];if(r.origin=e,u&&!Pr(t,r,!1))return s.length=0,{};c.push(tr(t,r));var o=n?Bi(t,r):g(s);Ir(t,r,o,ur(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Hi(r)});var a=[];Yi(t,function(t,e){e||-1!=d(a,t.history)||(zr(t.history,r),a.push(t.history)),Ir(t,r,null,ur(t,r))})}(h);if(f)return f.v}}}}function Or(t,e){if(0!=e&&(t.first+=e,t.sel=new wa(m(t.sel.ranges,function(t){return new Ca(_(t.anchor.line+e,t.anchor.ch),_(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){mi(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:_(o,E(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=P(t,e.from,e.to),n||(n=Bi(t,e)),t.cm?Dr(t.cm,e,i):Gi(t,e,i),xr(t,n,Fs)}}function Dr(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=N(ht(E(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&&Ot(t),Gi(i,e,n,kn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),le(i,o.line),Ci(t,400);var c=e.text.length-(s.line-o.line)-1;e.full?mi(t):o.line!=s.line||1!=e.text.length||Ki(t.doc,e)?mi(t,o.line,s.line+1,c):vi(t,o.line,"text");var u=It(t,"changes"),h=It(t,"change");if(h||u){var d={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};h&&Se(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function _r(t,e,n,i,r){if(i||(i=n),$(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),Ar(t,{from:n,to:i,text:e,origin:r})}function $r(t,e,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ut(t,e.line,e,n,s)||e.line!=n.line&&ut(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");q()}s.addToHistory&&ir(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,h=t.cm;if(t.iter(c,n.line+1,function(t){h&&s.collapsed&&!h.options.lineWrapping&&ht(t)==h.display.maxLine&&(l=!0),s.collapsed&&c!=e.line&&L(t,0),X(t,new K(s,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&t.iter(e.line,n.line+1,function(e){mt(t,e)&&L(e,0)}),s.clearOnEnter&&Gs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(U(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++Sa,s.atomic=!0),h){if(l&&(h.curOp.updateMaxLine=!0),s.collapsed)mi(h,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var d=e.line;d<=n.line;d++)vi(h,d,"text");s.atomic&&Cr(h.doc),Se(h,"markerAdded",h,s)}return s}function Ur(t,e,n,i,r){i=u(i),i.shared=!1;var o=[Wr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Yi(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Wr(t,B(t,e),B(t,n),i,r));for(var l=0;l-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var l=t.dataTransfer.getData("Text");if(l){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),xr(e.doc,Ri(n,n)),c)for(var u=0;u=0;e--)_r(t.doc,"",i[e].from,i[e].to,"+delete");qn(t)})}function ho(t,e){var n=E(t.doc,e),i=ht(n);return i!=n&&(e=N(i)),Mt(!0,t,i,e,1)}function fo(t,e){var n=E(t.doc,e),i=dt(n);return i!=n&&(e=N(i)),Mt(!0,t,n,e,-1)}function po(t,e){var n=ho(t,e.line),i=E(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return _(n.line,s?0:o,n.sticky)}return n}function go(t,e,n){if("string"==typeof e&&!(e=$a[e]))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=$s}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function mo(t,e,n){for(var i=0;i-1&&($((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&($(r.to(),e)>0||e.xRel<0)?Ao(t,i,e,o):No(t,i,e,o)}function Ao(t,e,n,i){var r=t.display,o=!1,s=fi(t,function(e){fs&&(r.scroller.draggable=!1),t.state.draggingText=!1,At(document,"mouseup",s),At(document,"mousemove",a),At(r.scroller,"dragstart",l),At(r.scroller,"drop",s),o||(_t(e),i.addNew||fr(t.doc,n,null,null,i.extend),fs||hs&&9==ds?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};fs&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),Gs(document,"mouseup",s),Gs(document,"mousemove",a),Gs(r.scroller,"dragstart",l),Gs(r.scroller,"drop",s),In(t),setTimeout(function(){return r.input.focus()},20)}function Lo(t,e,n){if("char"==n)return new Ca(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new Ca(_(e.line,0),B(t.doc,_(e.line+1,0)));var i=n(t,e);return new Ca(i.from,i.to)}function No(t,e,n,i){function r(e){if(0!=$(v,e))if(v=e,"rectangle"==i.unit){for(var r=[],o=t.options.tabSize,s=h(E(c,n.line).text,n.ch,o),a=h(E(c,e.line).text,e.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,e.line),y=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=y;m++){var b=E(c,m).text,x=f(b,l,o);l==g?r.push(new Ca(_(m,x),_(m,x))):b.length>x&&r.push(new Ca(_(m,x),_(m,f(b,g,o))))}r.length||r.push(new Ca(n,n)),br(c,zi(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var w,C=u,k=Lo(t,e,i.unit),S=C.anchor;$(k.anchor,S)>0?(w=k.head,S=H(C.from(),k.anchor)):(w=k.anchor,S=R(C.to(),k.head));var T=p.ranges.slice(0);T[d]=new Ca(B(c,S),w),br(c,zi(T,d),zs)}}function o(e){var n=++b,a=Tn(t,e,!0,"rectangle"==i.unit);if(a)if(0!=$(a,v)){t.curOp.focus=s(),r(a);var u=zn(l,c);(a.line>=u.to||a.liney.bottom?20:0;h&&setTimeout(fi(t,function(){b==n&&(l.scroller.scrollTop+=h,o(e))}),50)}}function a(e){t.state.selectingText=!1,b=1/0,_t(e),l.input.focus(),At(document,"mousemove",x),At(document,"mouseup",w),c.history.lastSelOrigin=null}var l=t.display,c=t.doc;_t(e);var u,d,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(d=c.sel.contains(n),u=d>-1?g[d]:new Ca(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Ca(n,n)),n=Tn(t,e,!0,!0),d=-1;else{var m=Lo(t,n,i.unit);u=i.extend?dr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==d?(d=g.length,br(c,zi(g.concat([u]),d),{scroll:!1,origin:"*mouse"})):g.length>1&&g[d].empty()&&"char"==i.unit&&!i.extend?(br(c,zi(g.slice(0,d).concat(g.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):gr(c,d,u,zs):(d=0,br(c,new wa([u],0),zs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,x=fi(t,function(t){Ht(t)?o(t):a(t)}),w=fi(t,a);t.state.selectingText=w,Gs(document,"mousemove",x),Gs(document,"mouseup",w)}function Oo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(e){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&_t(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!It(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l=r){return Lt(t,n,t,O(t.doc,o),t.options.gutters[l],e),Ft(e)}}}function Io(t,e){return Oo(t,e,"gutterClick",!0)}function Do(t,e){Re(t.display,e)||_o(t,e)||Nt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!It(t,"gutterContextMenu")&&Oo(t,e,"gutterContextMenu",!1)}function $o(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sn(t)}function Fo(t){Ii(t),mi(t),Rn(t)}function zo(t,e,n){if(!e!=!(n&&n!=Ba)){var i=t.display.dragFunctions,r=e?Gs:At;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Ro(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Ls(t.display.wrapper,"CodeMirror-wrap"),xt(t)),Sn(t),mi(t),sn(t),setTimeout(function(){return ei(t)},100)}function Ho(t,e){var n=this;if(!(this instanceof Ho))return new Ho(t,e);this.options=e=e?u(e):{},u(ja,e,!1),Di(e);var i=e.value;"string"==typeof i&&(i=new Pa(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Ho.inputStyles[e.inputStyle](this),o=this.display=new M(t,i,r);o.wrapper.CodeMirror=this,Ii(this),$o(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ii(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 Os,keySeq:null,specialChars:null},e.autofocus&&!Cs&&o.input.focus(),hs&&ds<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vo(this),to(),ri(this),this.curOp.forceUpdate=!0,Xi(this,i),e.autofocus&&!Cs||this.hasFocus()?setTimeout(c(Dn,this),20):_n(this);for(var s in Wa)Wa.hasOwnProperty(s)&&Wa[s](n,e[s],Ba);Hn(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;Gs(r.scroller,"mousedown",fi(t,To)),hs&&ds<11?Gs(r.scroller,"dblclick",fi(t,function(e){if(!Nt(t,e)){var n=Tn(t,e);if(n&&!Io(t,e)&&!Re(t.display,e)){_t(e);var i=t.findWordAt(n);fr(t.doc,i.anchor,i.head)}}})):Gs(r.scroller,"dblclick",function(e){return Nt(t,e)||_t(e)}),As||Gs(r.scroller,"contextmenu",function(e){return Do(t,e)});var o,s={end:0};Gs(r.scroller,"touchstart",function(e){if(!Nt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Gs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Gs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Re(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Ca(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new Ca(_(a.line,0),B(t.doc,_(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),_t(n)}e()}),Gs(r.scroller,"touchcancel",e),Gs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Jn(t,r.scroller.scrollTop),Qn(t,r.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Gs(r.scroller,"mousewheel",function(e){return Fi(t,e)}),Gs(r.scroller,"DOMMouseScroll",function(e){return Fi(t,e)}),Gs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Nt(t,e)||zt(e)},over:function(e){Nt(t,e)||(Jr(t,e),zt(e))},start:function(e){return Xr(t,e)},drop:fi(t,Yr),leave:function(e){Nt(t,e)||Zr(t)}};var a=r.input.getField();Gs(a,"keyup",function(e){return Co.call(t,e)}),Gs(a,"keydown",fi(t,xo)),Gs(a,"keypress",fi(t,ko)),Gs(a,"focus",function(e){return Dn(t,e)}),Gs(a,"blur",function(e){return _n(t,e)})}function Bo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e).state:n="prev");var s=t.options.tabSize,a=E(o,e),l=h(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==$s||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?h(E(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 d="",f=0;if(t.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,d+="\t";if(f1)if(qa&&qa.text.join("\n")==e){if(i.ranges.length%qa.text.length==0){l=[];for(var c=0;c=0;h--){var d=i.ranges[h],f=d.from(),p=d.to();d.empty()&&(n&&n>0?f=_(f.line,f.ch-n):t.state.overwrite&&!s?p=_(p.line,Math.min(E(o,p.line).text.length,p.ch+g(a).length)):qa&&qa.lineWise&&qa.text.join("\n")==e&&(f=p=_(f.line,0))),u=t.curOp.updateInput;var v={from:f,to:p,text:l?l[h%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};Ar(t.doc,v),Se(t,"inputRead",t,v)}e&&!s&&qo(t,e),qn(t),t.curOp.updateInput=u,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Uo(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||di(e,function(){return Wo(e,n,0,null,"paste")}),!0}function qo(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=Bo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(E(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Bo(t,r.head.line,"smart"));s&&Se(t,"electricInput",t,r.head.line)}}}function Ko(t){for(var e=[],n=[],i=0;i=t.first+t.size)&&(e=new _(i,e.ch,e.sticky),c=E(t,i))}function s(i){var s;if(null==(s=r?Et(t.cm,c,e,n):Tt(c,e,n))){if(i||!o())return!1;e=Mt(r,t.cm,c,e.line,n)}else e=s;return!0}var a=e,l=n,c=E(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,h="group"==i,d=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(e.ch)||"\n",g=w(p,d)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),e.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=Tr(t,e,a,l,!0);return F(a,m)&&(m.hitSide=!0),m}function Jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=gn(t,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function Zo(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=E(t.doc,e.line),r=Ke(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){s=Ct(o,e.ch)%2?"right":"left"}var a=Qe(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function Qo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ts(t,e){return e&&(t.bad=!0),t}function es(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){u&&(c+=h,u=!1)}function a(t){t&&(s(),c+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var c,d=e.getAttribute("cm-marker");if(d){var f=t.findMarks(_(i,0),_(r+1,0),o(+d));return void(f.length&&(c=f[0].find(0))&&a(P(t.doc,c.from,c.to).join(h)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(e.nodeName);p&&s();for(var g=0;g=15&&(ms=!1,fs=!0);var Es,Ps=ks&&(ps||ms&&(null==Ms||Ms<12.11)),As=as||hs&&ds>=9,Ls=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Es=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var Ns=function(t){t.select()};xs?Ns=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:hs&&(Ns=function(t){try{t.select()}catch(t){}});var Os=function(){this.id=null};Os.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var Is,Ds,_s=30,$s={toString:function(){return"CodeMirror.Pass"}},Fs={scroll:!1},zs={origin:"*mouse"},Rs={origin:"+move"},Hs=[""],Vs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bs=/[\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]/,js=!1,Ws=!1,Us=null,qs=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,h=[],d=0;d=this.string.length},ia.prototype.sol=function(){return this.pos==this.lineStart},ia.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ia.prototype.next=function(){if(this.pose},ia.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},ia.prototype.skipToEnd=function(){this.pos=this.string.length},ia.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},ia.prototype.backUp=function(t){this.pos-=t},ia.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};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},ia.prototype.current=function(){return this.string.slice(this.start,this.pos)},ia.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},ia.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)};var ra=function(t,e){this.state=t,this.lookAhead=e},oa=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0};oa.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},oa.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},oa.fromSaved=function(t,e,n){return e instanceof ra?new oa(t,Yt(t.mode,e.state),n,e.lookAhead):new oa(t,Yt(t.mode,e),n)},oa.prototype.save=function(t){var e=!1!==t?Yt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ra(e,this.maxLookAhead):e};var sa=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n},aa=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};aa.prototype.lineNo=function(){return N(this)},Dt(aa);var la,ca={},ua={},ha=null,da=null,fa={left:0,right:0,top:0,bottom:0},pa=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Gs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Gs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,hs&&ds<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pa.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}},pa.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pa.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pa.prototype.zeroWidthHack=function(){var t=ks&&!ys?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Os,this.disableVert=new Os},pa.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},pa.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var ga=function(){};ga.prototype.update=function(){return{bottom:0,right:0}},ga.prototype.setScrollLeft=function(){},ga.prototype.setScrollTop=function(){},ga.prototype.clear=function(){};var ma={native:pa,null:ga},va=0,ya=function(t,e,n){var i=t.display;this.viewport=e,this.visible=zn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=We(t),this.force=n,this.dims=wn(t),this.events=[]};ya.prototype.signal=function(t,e){It(t,e)&&this.events.push(arguments)},ya.prototype.finish=function(){for(var t=this,e=0;e=0&&$(t,r.to())<=0)return i}return-1};var Ca=function(t,e){this.anchor=t,this.head=e};Ca.prototype.from=function(){return H(this.anchor,this.head)},Ca.prototype.to=function(){return R(this.anchor,this.head)},Ca.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,i=t,r=t+e;i1||!(this.children[0]instanceof Hr))){var l=[];this.collapse(l),this.children=[new Hr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=this,r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&mi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Cr(e.doc)),e&&Se(e,"markerCleared",e,this,r,o),n&&oi(e),this.parent&&this.parent.clear()}},Ta.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o=0;c--)Ar(i,r[c]);l?yr(this,l):this.cm&&qn(this.cm)}),undo:gi(function(){Nr(this,"undo")}),redo:gi(function(){Nr(this,"redo")}),undoSelection:gi(function(){Nr(this,"undo",!0)}),redoSelection:gi(function(){Nr(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=B(this,t),e=B(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}),B(this,_(n,e))},indexFromPos:function(t){t=B(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new _(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),_(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=E(t.doc,r.line-1).text;s&&(r=new _(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),_(r.line-1,s.length-1),r,"+transpose"))}n.push(new Ca(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return di(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;it&&0==$(e,this.pos)&&n==this.button};var Ha,Va,Ba={toString:function(){return"CodeMirror.Init"}},ja={},Wa={};Ho.defaults=ja,Ho.optionHandlers=Wa;var Ua=[];Ho.defineInitHook=function(t){return Ua.push(t)};var qa=null,Ka=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Os,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ka.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Fs),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=qa.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Yo(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=qa.text.join("\n");var l=document.activeElement;Ns(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Go(o,r.options.spellcheck),Gs(o,"paste",function(t){Nt(r,t)||Uo(t,r)||ds<=11&&setTimeout(fi(r,function(){return n.updateFromDOM()}),20)}),Gs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Gs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Gs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Gs(o,"touchstart",function(){return i.forceCompositionEnd()}),Gs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Gs(o,"copy",e),Gs(o,"cut",e)},Ka.prototype.prepareSelection=function(){var t=Pn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ka.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ka.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line=e.display.viewFrom&&Zo(e,i)||{node:a[0].measure.map[2],offset:0},c=r.linet.firstLine()&&(i=_(i.line-1,E(t.doc,i.line-1).length)),r.ch==E(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Mn(t,i.line))?(s=N(e.view[0].line),a=e.view[0].node):(s=N(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,c,u=Mn(t,r.line);if(u==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=N(e.view[u+1].line)-1,c=e.view[u+1].node.previousSibling),!a)return!1;for(var h=t.doc.splitLines(es(t,a,c,s,l)),d=P(t.doc,_(s,0),_(l,E(t.doc,l).text.length));h.length>1&&d.length>1;)if(g(h)==g(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),s++}for(var f=0,p=0,m=h[0],v=d[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==x.charCodeAt(x.length-p-1);)f--,p++;h[h.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(f).replace(/\u200b+$/,"");var C=_(s,f),k=_(l,d.length?g(d).length-p:0);return h.length>1||h[0]||$(C,k)?(_r(t.doc,h,C,k,"+input"),!0):void 0},Ka.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ka.prototype.reset=function(){this.forceCompositionEnd()},Ka.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ka.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))},Ka.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||di(this.cm,function(){return mi(t.cm)})},Ka.prototype.setUneditable=function(t){t.contentEditable="false"},Ka.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Wo)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ka.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ka.prototype.onContextMenu=function(){},Ka.prototype.resetPosition=function(){},Ka.prototype.needsContentAttribute=!0;var Ga=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Os,this.hasSelection=!1,this.composing=null};Ga.prototype.init=function(t){function e(t){if(!Nt(r,t)){if(r.somethingSelected())jo({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Ko(r);jo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Fs):(i.prevInput="",s.value=e.text.join("\n"),Ns(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Yo(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),xs&&(s.style.width="0px"),Gs(s,"input",function(){hs&&ds>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Gs(s,"paste",function(t){Nt(r,t)||Uo(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Gs(s,"cut",e),Gs(s,"copy",e),Gs(t.scroller,"paste",function(e){Re(t,e)||Nt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Gs(t.lineSpace,"selectstart",function(e){Re(t,e)||_t(e)}),Gs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Gs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},Ga.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Pn(t);if(t.options.moveInputWithCursor){var r=dn(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},Ga.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},Ga.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&&Ns(this.textarea),hs&&ds>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",hs&&ds>=9&&(this.hasSelection=null))}},Ga.prototype.getField=function(){return this.textarea},Ga.prototype.supportsTouch=function(){return!1},Ga.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},Ga.prototype.blur=function(){this.textarea.blur()},Ga.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ga.prototype.receivedFocus=function(){this.slowPoll()},Ga.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},Ga.prototype.fastPoll=function(){function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},Ga.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Js(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(hs&&ds>=9&&this.hasSelection===r||ks&&/[\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 s=0,a=Math.min(i.length,r.length);s1e3||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},Ga.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ga.prototype.onKeyPress=function(){hs&&ds>=9&&(this.hasSelection=null),this.fastPoll()},Ga.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,hs&&ds<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!hs||hs&&ds<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?fi(r,Er)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Tn(r,t),l=o.scroller.scrollTop;if(a&&!ms){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&fi(r,br)(r.doc,Ri(a),Fs);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(hs?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(fs&&(d=window.scrollY),o.input.focus(),fs&&window.scrollTo(null,d),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),hs&&ds>=9&&e(),As){zt(t);var f=function(){At(window,"mouseup",f),setTimeout(n,20)};Gs(window,"mouseup",f)}else setTimeout(n,50)}},Ga.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t},Ga.prototype.setUneditable=function(){},Ga.prototype.needsContentAttribute=!1,function(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Ba&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ba,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Ui(t)},!0),e("indentUnit",2,Ui,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){qi(t),sn(t),mi(t)},!0),e("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(_(i,o))}i++});for(var r=n.length-1;r>=0;r--)_r(t.doc,e,n[r],_(n[r].line,n[r].ch+e.length))}}),e("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!=Ba&&t.refresh()}),e("specialCharPlaceholder",fe,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ts),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){$o(t),Fo(t)},!0),e("keyMap","default",function(t,e,n){var i=co(e),r=n!=Ba&&co(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("configureMouse",null),e("lineWrapping",!1,Ro,!0),e("gutters",[],function(t){Di(t.options),Fo(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return ei(t)},!0),e("scrollbarStyle","native",function(t){ii(t),ei(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Di(t.options),Fo(t)},!0),e("firstLineNumber",1,Fo,!0),e("lineNumberFormatter",function(t){return t},Fo,!0),e("showCursorWhenSelecting",!1,En,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("pasteLinesPerSelection",!0),e("readOnly",!1,function(t,e){"nocursor"==e&&(_n(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,zo),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,En,!0),e("singleCursorHeightPerLine",!0,En,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,qi,!0),e("addModeClass",!1,qi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,qi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}(Ho),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)&&fi(this,e[t])(this,n,r),Lt(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"](co(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;ni&&(Bo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&qn(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&gr(e.doc,r,new Ca(s,u[r].to()),Fs)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,_(t),e,!0)},getTokenTypeAt:function(t){t=B(this.doc,t);var e,n=Qt(this,E(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=E(this.doc,t)}else i=t;return cn(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return xn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,B(this.doc,t));var s=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&&jn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:pi(xo),triggerOnKeyPress:pi(ko),triggerOnKeyUp:Co,triggerOnMouseDown:pi(To),execCommand:function(t){if($a.hasOwnProperty(t))return $a[t].call(null,this)},triggerElectric:pi(function(t){qo(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=B(this.doc,t),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),Lt(this,"refresh",this)}),swapDoc:pi(function(t){var e=this.doc;return e.cm=null,Xi(this,t),sn(this),this.display.input.reset(),Kn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Se(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}},Dt(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})}}(Ho);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Xa in Pa.prototype)Pa.prototype.hasOwnProperty(Xa)&&d(Ya,Xa)<0&&(Ho.prototype[Xa]=function(t){return function(){return t.apply(this.doc,arguments)}}(Pa.prototype[Xa]));return Dt(Pa),Ho.inputStyles={textarea:Ga,contenteditable:Ka},Ho.defineMode=function(t){Ho.defaults.mode||"null"==t||(Ho.defaults.mode=t),Wt.apply(this,arguments)},Ho.defineMIME=Ut,Ho.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Ho.defineMIME("text/plain","null"),Ho.defineExtension=function(t,e){Ho.prototype[t]=e},Ho.defineDocExtension=function(t,e){Pa.prototype[t]=e},Ho.fromTextArea=rs,function(t){t.off=At,t.on=Gs,t.wheelEventPixels=$i,t.Doc=Pa,t.splitLines=Xs,t.countColumn=h,t.findColumn=f,t.isWordChar=x,t.Pass=$s,t.signal=Lt,t.Line=aa,t.changeEnd=Hi,t.scrollbarModel=ma,t.Pos=_,t.cmpPos=$,t.modes=ta,t.mimeModes=ea,t.resolveMode=qt,t.getMode=Kt,t.modeExtensions=na,t.extendMode=Gt,t.copyState=Yt,t.startState=Jt,t.innerMode=Xt,t.commands=$a,t.keyMap=_a,t.keyName=lo,t.isModifierKey=so,t.lookupKey=oo,t.normalizeKeyMap=ro,t.StringStream=ia,t.SharedTextMarker=Ma,t.TextMarker=Ta,t.LineWidget=ka,t.e_preventDefault=_t,t.e_stopPropagation=$t,t.e_stop=zt,t.addClass=a,t.contains=o,t.rmClass=Ls,t.keyNames=Na}(Ho),Ho.version="5.29.0",Ho})},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{change:"onChange"},initialize:function(t){var e=this.model;this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=e.target,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),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},getValueForTarget:function(){return this.model.get("value")},onValueChange:function(){var t=this.model,e=this.target,i=t.get("name"),r=this.getValueForTarget();if(t.get("changeProp"))e.set(i,r);else{var o=n.clone(e.get("attributes"));o[i]=r,e.set("attributes",o)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},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=this.target,n=t.get("name"),r=t.get("placeholder")||t.get("default")||"",o=t.get("type")||"text",s=e.get("attributes"),a=t.get("min"),l=t.get("max"),c=t.get("changeProp")?e.get(n):t.get("value")||s[n],u=i('');c&&u.prop("value",c),a&&u.prop("min",a),l&&u.prop("max",l),this.$input=u}return this.$input.get(0)},getModelValue:function(){var t,e=this.model,n=this.target,i=e.get("name");if(e.get("changeProp"))t=n.get(i);else{var r=n.get("attributes");t=e.get("value")||r[i]}return 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}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=i.Model.extend({idAttribute:"name",defaults:{name:"",label:"",type:"class",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",r.escapeName(this.get("name")))},getFullName:function(){var t="";switch(this.get("type")){case"class":t=".";break;case"id":t="#"}return t+this.get("name")}},{escapeName:function(t){return(""+t).trim().replace(/([^a-z0-9\w-]+)/gi,"-")}});t.exports=r},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(10);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"stack",model:n(114),view:n(31),isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:n(30),view:n(16),isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:o,view:n(36),isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:o,view:n(34),isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:n(37),view:n(33),isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:n(37),view:n(32),isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:n(121),view:n(122),isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:n(38),view:n(12),isType:function(t){if(t&&"integer"==t.type)return t}},{id:"base",model:o,view:n(5),isType:function(t){return t.type="base",t}}],deepClone:function(){var t=this.clone();return t.reset(t.map(function(t){var e=t.clone();return e.typeView=t.typeView,e})),t},parseValue:function(t){var e=this,n=[];return t.split(" ").forEach(function(t,i){var r=e.at(i);n.push(Object.assign({},r.attributes,{value:t}))}),n},getFullValue:function(){var t="";return this.each(function(e){return t+=e.getFullValue()+" "}),t.trim()}})},function(t,e,n){"use strict";t.exports=n(0).Model.extend({defaults:{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"]},initialize:function(t){var e=this.get("name"),n=this.get("property");e||this.set("name",n.charAt(0).toUpperCase()+n.slice(1).replace(/-/g," "));var i=this.init&&this.init.bind(this);i&&i()},parseValue:function(t){if(!this.get("functionName"))return t;var e=[],n=t+"",i=n.indexOf("(")+1,r=n.lastIndexOf(")");return e.push(i),r>=0&&e.push(r),String.prototype.substring.apply(n,e)},getDefaultValue:function(){return this.get("defaults")},getFullValue:function(t){var e=this.get("functionName"),n=t||this.get("value");return e&&(n=e+"("+n+")"),n}})},function(t,e,n){"use strict";(function(e){n(5),n(12),n(32),n(33),n(34),n(36),n(16),n(31);t.exports=e.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.target=t.target||{},this.propTarget=t.propTarget||{},this.onChange=t.onChange,this.onInputRender=t.onInputRender||{},this.customValue=t.customValue||{}},render:function(){var t=this,e=document.createDocumentFragment();return this.collection.each(function(n){var i=new n.typeView({model:n,name:n.get("name"),id:t.pfx+n.get("property"),target:t.target,propTarget:t.propTarget,onChange:t.onChange,onInputRender:t.onInputRender,config:t.config});"composite"!=n.get("type")&&(i.customValue=t.customValue),i.render(),e.appendChild(i.el)}),this.$el.append(e),this.$el.attr("class",this.pfx+"properties"),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(17),r=e.$;t.exports=n(5).extend({templateInput:function(){return""},init:function(){var t=this.model;this.listenTo(t,"change:unit",this.modelValueChanged),this.listenTo(t,"el:change",this.elementUpdated)},setValue:function(t){this.inputInst.setValue(t,{silent:1})},onRender:function(){var t=this.ppfx;if(!this.input){var e=new i({model:this.model,ppfx:this.ppfx}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.unit=n.unitEl,this.$unit=r(this.unit),this.input=this.$input.get(0),this.inputInst=n}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(3));t.exports=i.extend({tagName:"img",events:{dblclick:"openModal",click:"initResize"},initialize:function(t){i.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.listenTo(this.model,"dblclick active",this.openModal),this.classEmpty=this.ppfx+"plh-image",this.config.modal&&(this.modal=this.config.modal),this.config.am&&(this.am=this.config.am)},updateSrc:function(){var t=this.model.get("src");this.$el.attr("src",t),t?this.$el.removeClass(this.classEmpty):this.$el.addClass(this.classEmpty)},openModal:function(t){var e=this.opts.config.em,n=e?e.get("Editor"):"";n&&n.runCommand("open-assets",{target:this.model,onSelect:function(){n.Modal.close(),n.AssetManager.setTarget(null)}})},render:function(){this.updateAttributes(),this.updateClasses();var t=this.$el.attr("class")||"";return this.model.get("src")||this.$el.attr("class",(t+" "+this.classEmpty).trim()),this.$el.attr("onmousedown","return false"),this}})},function(t,e,n){"use strict";var i,r;!function(o,s){i=s,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}(0,function(){function t(t,e){return e=e||E,F.test(t)?e.getElementsByClassName(t.slice(1)):R.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function e(t){if(!M){M=E.implementation.createHTMLDocument();var e=M.createElement("base");e.href=E.location.href,M.head.appendChild(e)}return M.body.innerHTML=t,M.body.childNodes}function n(t){"loading"!==E.readyState?t():E.addEventListener("DOMContentLoaded",t)}function i(i,r){if(!i)return this;if(i.cash&&i!==P)return i;var o,s=i,a=0;if(_(i))s=$.test(i)?E.getElementById(i.slice(1)):z.test(i)?e(i):t(i,r);else if(D(i))return n(i),this;if(!s)return this;if(s.nodeType||s===P)this[0]=s,this.length=1;else for(o=this.length=s.length;a=0&&s.splice(i,1)):(o(s,function(n){t.removeEventListener(e,n)}),s=[]))}function x(t,e){return"&"+encodeURIComponent(t)+"="+encodeURIComponent(e).replace(/%20/g,"+")}function w(t){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value)}),e.length?e:null}function C(t){var e=t.selectedIndex;return e>=0?t.options[e].value:null}function k(t){var e=t.type;if(!e)return null;switch(e.toLowerCase()){case"select-one":return C(t);case"select-multiple":return w(t);case"radio":case"checkbox":return t.checked?t.value:null;default:return t.value?t.value:null}}function S(t,e,n){if(n){var i=t.childNodes[0];t.insertBefore(e,i)}else t.appendChild(e)}function T(t,e,n){var i=_(e);if(!i&&e.length)return void o(e,function(e){return T(t,e,n)});o(t,i?function(t){return t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,i){return S(t,0===i?e:e.cloneNode(!0),n)})}var M,E=document,P=window,A=Array.prototype,L=A.slice,N=A.filter,O=A.push,I=function(){},D=function(t){return typeof t==typeof I&&t.call},_=function(t){return"string"==typeof t},$=/^#[\w-]*$/,F=/^\.[\w-]*$/,z=/<.+>/,R=/^\w+$/,H=r.fn=r.prototype=i.prototype={cash:!0,length:0,push:O,splice:A.splice,map:A.map,init:i};Object.defineProperty(H,"constructor",{value:r}),r.parseHTML=e,r.noop=I,r.isFunction=D,r.isString=_,r.extend=H.extend=function(t){t=t||{};var e=L.call(arguments),n=e.length,i=1;for(1===e.length&&(t=this,i=0);i1?this.each(function(n){return n.style[t]=e}):P.getComputedStyle(this[0])[t];for(var n in t)this.css(n,t[n]);return this}}),o(["Width","Height"],function(t){var e=t.toLowerCase();H[e]=function(){return this[0].getBoundingClientRect()[e]},H["inner"+t]=function(){return this[0]["client"+t]},H["outer"+t]=function(e){return this[0]["offset"+t]+(e?v(this,"margin"+("Width"===t?"Left":"Top"))+v(this,"margin"+("Width"===t?"Right":"Bottom")):0)}}),H.extend({off:function(t,e){return this.each(function(n){return b(n,t,e)})},on:function(t,e,i,r){var o;if(!_(t)){for(var a in t)this.on(a,e,t[a]);return this}return D(e)&&(i=e,e=null),"ready"===t?(n(i),this):(e&&(o=i,i=function(t){for(var n=t.target;!s(n,e);){if(n===this)return n=!1;n=n.parentNode}n&&o.call(n,t)}),this.each(function(e){var n=i;r&&(n=function(){i.apply(this,arguments),b(e,t,n)}),y(e,t,n)}))},one:function(t,e,n){return this.on(t,e,n,!0)},ready:n,trigger:function(t,e){var n=E.createEvent("HTMLEvents");return n.data=e,n.initEvent(t,!0,!1),this.each(function(t){return t.dispatchEvent(n)})}}),H.extend({serialize:function(){var t="";return o(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=k(e);null!==i&&o(i,function(e){t+=x(n,e)});break;default:var r=k(e);null!==r&&(t+=x(n,r))}}}),t.substr(1)},val:function(t){return void 0===t?k(this[0]):this.each(function(e){return e.value=t})}}),H.extend({after:function(t){return r(t).insertAfter(this),this},append:function(t){return T(this,t),this},appendTo:function(t){return T(r(t),this),this},before:function(t){return r(t).insertBefore(this),this},clone:function(){return r(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 r(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 r(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 T(this,t,!0),this},prependTo:function(t){return T(r(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 U=E.documentElement;return H.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+P.pageYOffset-U.clientTop,left:t.left+P.pageXOffset-U.clientLeft}},offsetParent:function(){return r(this[0].offsetParent)}}),H.extend({children:function(t){var e=[];return this.each(function(t){O.apply(e,t.children)}),e=l(e),t?e.filter(function(e){return s(e,t)}):e},closest:function(t){return!t||this.length<1?r():this.is(t)?this.filter(t):this.parent().closest(t)},is:function(t){if(!t)return!1;var e=!1,n=a(t);return this.each(function(i){return!(e=n(i,t))}),e},find:function(e){if(!e||e.nodeType)return r(e&&this.has(e).length?e:null);var n=[];return this.each(function(i){O.apply(n,t(e,i))}),l(n)},has:function(e){var n=_(e)?function(n){return 0!==t(e,n).length}:function(t){return t.contains(e)};return this.filter(n)},next:function(){return r(this[0].nextElementSibling)},not:function(t){if(!t)return this;var e=a(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)}),l(t)},parents:function(t){var e,n=[];return this.each(function(i){for(e=i;e&&e.parentNode&&e!==E.body.parentNode;)e=e.parentNode,(!t||t&&s(e,t))&&n.push(e)}),l(n)},prev:function(){return r(this[0].previousElementSibling)},siblings:function(){var t=this.parent().children(),e=this[0];return t.filter(function(t){return t!==e})}}),r})},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";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;return'\n
\n \n
\n '},inputValueChanged:function(){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=n(11),o=new i(this.getPropsConfig());this.$props=o.render().$el,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});if(i){n=i.split(" ")[t]}else n=e&&e.getTargetValue({ignoreCustomValue:1,ignoreDefault:1});return e&&(n=e.model.parseValue(n)),n}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(4),r=n(0),o=r.$;t.exports=r.View.extend({template:e.template('\n input-holder\'>\n field-units\'>\n
\n
\n
\n
'),initialize:function(t){e.bindAll(this,"moveIncrement","upIncrement");var n=t||{},i=n.ppfx||"",r=n.contClass||i+"field "+i+"field-integer";this.ppfx=i,this.doc=document,this.inputCls=i+"field-number",this.unitCls=i+"input-unit",this.contClass=r,this.events={},this.events["click ."+i+"field-arrow-u"]="upArrowClick",this.events["click ."+i+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+i+"field-arrows"]="downIncrement",this.events["change ."+this.inputCls]="handleChange",this.events["change ."+this.unitCls]="handleUnitChange",this.listenTo(this.model,"change:unit change:value",this.handleModelChange),this.delegateEvents()},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"))},getInputEl:function(){if(!this.inputEl){var t=this.inputCls,e=this.model.get("defaults");this.inputEl=o('')}return this.inputEl.get(0)},getUnitEl:function(){if(!this.unitEl){var t=this.model,n=t.get("units")||[];if(n.length){var i='";var r=document.createElement("div");r.innerHTML=i,this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var t=this.model,e=t.get("step"),n=t.get("value");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=t.get("value");n=this.normalizeValue(n-e);var i=this.validateInputValue(n);t.set("value",i.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,i.on)(this.doc,"mousemove",this.moveIncrement),(0,i.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,i.off)(this.doc,"mouseup",this.upIncrement),(0,i.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,i=n.get("step"),r=0;return isNaN(t)?e:(t=parseFloat(t),Math.floor(t)!==t&&(r=i.toString().split(".")[1].length||0),r?parseFloat(t.toFixed(r)):t)},validateInputValue:function(t,n){var i=0,r=n||{},o=this.model,s=t||o.get("defaults"),a=o.get("units")||[],l=o.get("unit")||a.length&&a[0]||"",c=o.get("max"),u=o.get("min");if(r.deepCheck){var h=o.get("fixedValues")||[];if(s){var d=new RegExp("^"+h.join("|"),"g");if(h.length&&d.test(s))s=s.match(d)[0],l="",i=1;else{var f=s+"";s+="",s=parseFloat(s.replace(",",".")),s=isNaN(s)?o.get("defaults"):s;var p=f.replace(s,"");e.indexOf(a,p)>=0&&(l=p)}}}return void 0!==c&&""!==c&&(s=s>c?c:s),void 0!==u&&""!==u&&(s=s2&&void 0!==arguments[2]?arguments[2]:{};if(e){var o=r.store,s=r.selectedHandler,a=["tc","bc"].indexOf(s)>=0,l=["cl","cr"].indexOf(s)>=0,c=e.getStyle();a||(c.width=i.w+"px"),l||(c.height=i.h+"px"),e.setStyle(c,{avoidStore:1}),n.trigger("targetStyleUpdated"),o&&e.trigger("change:style",e,c,{})}}},"object"==(void 0===u?"undefined":i(u))&&(h=Object.assign(h,u)),r.runCommand("resize",{el:t,options:h}))},updateToolbar:function(t){var e=this.config.em,n=t==e?e.get("selectedComponent"):t,i=this.canvas.getToolbarEl(),r=i.style;if(!n)return void(r.opacity=0);var a=n.get("toolbar");this.ppfx;if(e.get("Config").showToolbar&&a&&a.length){if(r.opacity="",r.display="",!this.toolbar){i.innerHTML="",this.toolbar=new s(a);var l=new o({collection:this.toolbar,editor:this.editor});i.appendChild(l.render().el)}this.toolbar.reset(a);var c=n.view;c&&this.updateToolbarPos(c.el)}else r.display="none"},updateToolbarPos:function(t,e){var n=this.canvas.getToolbarEl(),i=n.style,r=this.canvas.getTargetToElementDim(n,t,{elPos:e,event:"toolbarPosUpdate"}),o=r.left+r.elementWidth-r.targetWidth;i.top=r.top+"px",i.left=o+"px"},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.get("selectedComponent");i&&this.updateToolbarPos(i.view.el)}},updateAttached:function(){var t=this.em.get("selectedComponent");if(t){var e=t.view;this.updateToolbarPos(e.el),this.showFixedElementOffset(e.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()},stop:function(){this.stopSelectComponent(),this.cleanPrevious(this.em.get("selectedComponent")),this.clean(),this.em.set("selectedComponent",null),this.toggleClipboard(),this.hideBadge(),this.hideFixedElementOffset(),this.canvas.getToolbarEl().style.display="none",this.em.off("component:update",this.updateAttached,this),this.em.off("change:canvasOffset",this.updateAttached,this),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(50),o=e.$;t.exports=i.extend({},r,{init:function(t){i.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;n*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(!1===i?0:m),t.context),n}function c(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function u(t,e,n){return N[n.context.type](t,e,n)}function h(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return u(t,e,n)}function d(t){var e=t.current().toLowerCase();g=E.hasOwnProperty(e)?"atom":M.hasOwnProperty(e)?"keyword":"variable"}var f=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var p,g,m=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},x=n.mediaFeatures||{},w=n.mediaValueKeywords||{},C=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},S=n.fontProperties||{},T=n.counterDescriptors||{},M=n.colorKeywords||{},E=n.valueKeywords||{},P=n.allowNested,A=n.lineComment,L=!0===n.supportsAtComponent,N={};return N.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return c(n);if(L&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)g="builtin";else if("word"==t)g="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(P&&"("==t)return l(n,e,"parens")}return n.context.type},N.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return C.hasOwnProperty(i)?(g="property","maybeprop"):k.hasOwnProperty(i)?(g="string-2","maybeprop"):P?(g=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==t?"block":P||"hash"!=t&&"qualifier"!=t?N.top(t,e,n):(g="error","block")},N.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):u(t,e,n)},N.prop=function(t,e,n){if(";"==t)return c(n);if("{"==t&&P)return l(n,e,"propBlock");if("}"==t||"{"==t)return h(t,e,n);if("("==t)return l(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)d(e);else if("interpolation"==t)return l(n,e,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(t,e,n){return"}"==t?c(n):"word"==t?(g="property","maybeprop"):n.context.type},N.parens=function(t,e,n){return"{"==t||"}"==t?h(t,e,n):")"==t?c(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&d(e),"parens")},N.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(g="variable-3",n.context.type):u(t,e,n)},N.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(g="tag",n.context.type):N.atBlock(t,e,n)},N.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return h(t,e,n);if("{"==t)return c(n)&&l(n,e,P?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();g="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":x.hasOwnProperty(i)?"property":w.hasOwnProperty(i)?"keyword":C.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":E.hasOwnProperty(i)?"atom":M.hasOwnProperty(i)?"keyword":"error"}return n.context.type},N.atComponentBlock=function(t,e,n){return"}"==t?h(t,e,n):"{"==t?c(n)&&l(n,e,P?"block":"top",!1):("word"==t&&(g="error"),n.context.type)},N.atBlock_parens=function(t,e,n){return")"==t?c(n):"{"==t||"}"==t?h(t,e,n,2):N.atBlock(t,e,n)},N.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(g="variable","restricted_atBlock_before"):u(t,e,n)},N.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,c(n)):"word"==t?(g="@font-face"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!T.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(t,e,n){return"word"==t?(g="variable","keyframes"):"{"==t?l(n,e,"top"):u(t,e,n)},N.at=function(t,e,n){return";"==t?c(n):"{"==t||"}"==t?h(t,e,n):("word"==t?g="tag":"hash"==t&&(g="builtin"),"at")},N.interpolation=function(t,e,n){return"}"==t?c(n):"{"==t||";"==t?h(t,e,n):("word"==t?g="variable":"variable"!=t&&"("!=t&&")"!=t&&(g="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:f?"block":"top",stateArg:null,context:new a(f?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(p=n[1],n=n[0]),g=n,"comment"!=p&&(e.state=N[e.state](p,t,e)),g},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-m)):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:A,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["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"],l=e(a),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=e(c),h=["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"],d=e(h),f=["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"],p=e(f),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=e(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["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"],x=e(b),w=["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"],C=e(w),k=i.concat(o).concat(a).concat(c).concat(h).concat(f).concat(b).concat(w);t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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:s,mediaFeatures:l,mediaValueKeywords:u,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:x,valueKeywords:C,fontProperties:m,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(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/,!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:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:x,valueKeywords:C,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){"use strict";var i=n(0),r=n(25);t.exports=i.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(t){this.btn=this.get("buttons")||[],this.buttons=new r(this.btn),this.set("buttons",this.buttons)}})},function(t,e,n){"use strict";var i=n(0),r=n(104);t.exports=i.Collection.extend({model:r,deactivateAllExceptOne:function(t,e){this.forEach(function(n,i){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},deactivateAll:function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&(t.set("active",!1),t.get("buttons").length&&t.get("buttons").deactivateAll(e))})}})},function(t,e,n){"use strict";var i=n(0),r=n(27);t.exports=i.View.extend({initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.buttons=this.model.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+this.model.get("id"),this.listenTo(this.model,"change:appendContent",this.appendContent),this.listenTo(this.model,"change:content",this.updateContent)},appendContent:function(){this.$el.append(this.model.get("appendContent"))},updateContent:function(){this.$el.html(this.model.get("content"))},initResize:function(){var t=this.config.em,e=t?t.get("Editor"):"",n=this.model.get("resizable");if(e&&n){var i,r,o,s=!0===n?[1,1,1,1]:n,a=s.length,l=0;2==a?(i=s[0],o=s[0],r=s[1],l=s[1]):4==a&&(i=s[0],r=s[1],o=s[2],l=s[3]);var c=e.Utils.Resizer.init({tc:i,cr:r,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,prefix:e.getConfig().stylePrefix,posFetcher:function(t){var e=t.getBoundingClientRect();return{left:0,top:0,width:e.width,height:e.height}}});c.blur=function(){},c.focus(this.el)}},render:function(){if(this.$el.attr("class",this.className),this.id&&this.$el.attr("id",this.id),this.buttons.length){var t=new r({collection:this.buttons,config:this.config});this.$el.append(t.render().el)}return this.$el.append(this.model.get("content")),this}})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(106);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"buttons"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=r,o=new i({model:t,config:this.config,parentM:this.parentM}),s=o.render().el;return n?n.appendChild(s):this.$el.append(s),s},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",e.result(this,"className")),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(111),o=n(112),s=n(9),a=n(124),l=void 0;return{name:"StyleManager",getConfig:function(){return i},init:function(n){i=n||{};for(var c in r)c in i||(i[c]=r[c]);var u=i.pStylePrefix;return u&&(i.stylePrefix=u+i.stylePrefix),l=new s,t=new o(i.sectors),e=new a({collection:t,target:i.em,config:i}),this},addSector:function(e,n){var i=this.getSector(e);return i||(n.id=e,i=t.add(n)),i},getSector:function(e){var n=t.where({id:e});return n.length?n[0]:null},getSectors:function(){return t},addProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").add(e)),n},getProperty:function(t,e){var n=null,i=this.getSector(t);return i&&(n=i.get("properties").where({property:e}),n=1==n.length?n[0]:n),n},getProperties:function(t){var e=null,n=this.getSector(t);return n&&(e=n.get("properties")),e},getModelToStyle:function(t){var e=t.get("classes");if(i.em&&e&&e.length){var n=i.em.get("Config").devicePreviewMode,r=i.em.getDeviceModel(),o=n?"":t.get("state"),s=r&&!n?r.get("width"):"",a=i.em.get("CssComposer"),l=e.getStyleable(),c=a.get(l,o,s);if(c&&l.length)return c}return t},addType:function(t,e){l.addType(t,e)},getType:function(t){return l.getType(t)},getTypes:function(){return l.getTypes()},render:function(){return e.render().el}}}},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();o=n.getType(t.type),i=o?o.model:s.model,r=o?o.view:s.view}else{var a=n.recognizeType(t);o=a.type,i=o.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;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()},targetUpdated:function(){if(this.model.get("detached"))this.checkVisibility();else{for(var t=arguments.length,e=Array(t),n=0;n\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("#"+t+"input-holder");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";(function(e){e.$;t.exports=n(5).extend({templateInput:function(){var t=this.pfx,e=this.ppfx;return'\n
\n \n
\n
\n
\n
\n '},onRender:function(){var t=this.pfx,e=this.model,n=e.get("list")||e.get("options")||[];if(!this.input){var i="";n.forEach(function(t){var e=t.name||t.value,n=t.style?t.style.replace(/"/g,"""):"",r=n?'style="'+n+'"':"",o=t.value.replace(/"/g,""");i+='"});var r=this.el.querySelector("#"+t+"input-holder");r.innerHTML="",this.input=r.firstChild}}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(35);t.exports=n(12).extend({setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},e,{silent:1}),this.inputInst.setValue(t,e)},onRender:function(){if(!this.input){var t=this.ppfx,e=new i({target:this.target,model:this.model,ppfx:t}),n=e.render();this.el.querySelector("."+t+"fields").appendChild(n.el),this.$input=n.inputEl,this.$color=n.colorEl,this.input=this.$input.get(0),this.inputInst=n}}})},function(t,e,n){"use strict";(function(e){var i=n(117);n(118);var r=e.$;t.exports=i.extend({template:function(){var t=this.ppfx;return'\n
\n
\n
\n
\n
\n
\n '},initialize:function(t){i.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.colorCls=e+"field-color-picker",this.inputClass=e+"field "+e+"field-color",this.colorHolderClass=e+"field-colorp-c"},setValue:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,i=t||n.get("defaults"),r=this.getInputEl(),o=this.getColorEl(),s="none"!=i?i:"";r.value=i,o.get(0).style.backgroundColor=s,e.targetUpdate&&(o.spectrum("set",s),this.noneColor="none"==i)},handleModelChange:function(t,e,n){this.setValue(e,n)},getColorEl:function(){if(!this.colorEl){var t=this,e=this.model,n=r('
'),i=n.get(0).style,o=this.target&&this.target.config?this.target.config.el:"",s=function(t){return(1==t.getAlpha()?t.toHexString():t.toRgbString()).replace(/ /g,"")},a=0,l=void 0;this.$el.find("."+this.colorHolderClass).append(n),n.spectrum({appendTo:o||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(t){var n=s(t);i.backgroundColor=n,e.set("value",n,{avoidStore:1})},change:function(n){a=1;var r=s(n);i.backgroundColor=r,e.set("value","",{avoidStore:1}),e.set("value",r),t.noneColor=0},show:function(t){a=0,l=s(t)},hide:function(r){!a&&l&&(t.noneColor&&(l=""),i.backgroundColor=l,n.spectrum("set",l),e.set("value",l,{avoidStore:1}))}}),this.colorEl=n}return this.colorEl},render:function(){return i.prototype.render.call(this),this.getColorEl(),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var i=n(5),r=e.$;t.exports=i.extend({templateInput:function(){var t=this.pfx;this.ppfx;return'\n
\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=r('')}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){i.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 '},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||e.getFilename(),'\n
'+n+'
\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.stopPropagation(),this.model.collection.remove(this.model)}})},function(t,e,n){"use strict";(function(e,n){t.exports=e.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",n.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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(21),o=function(t){return t&&t.__esModule?t:{default:t}}(r);t.exports=e.View.extend({template:i.template('\n
\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){var e=this.config.em,n=this.config,i=this.target,r="string"==typeof t?JSON.parse(t):t;e&&e.trigger("asset:upload:response",r),n.autoAdd&&i&&i.add(r.data,{at:0}),this.onUploadEnd(t)},uploadFile:function(t){for(var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i=new FormData,r=this.config,s=r.params,a=0;a'+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){var e=this,n=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(!FileReader)return void this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));var r=[],o=/^(.+)\/(.+)$/,s=!0,a=!1,l=void 0;try{for(var c,u=n[Symbol.iterator]();!(s=(c=u.next()).done);s=!0)!function(){var t=c.value,e=new Promise(function(e,n){var i=new FileReader;i.addEventListener("load",function(r){var s=void 0,a=t.name,l=o.exec(t.type);if("image"===(s=l?l[1]:t.type)){var c={src:i.result,name:a,type:s,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(s?{src:i.result,name:a,type:s}:i.result)}),i.addEventListener("error",function(t){n(t)}),i.addEventListener("abort",function(t){n("Aborted")}),i.readAsDataURL(t)});r.push(e)}()}catch(t){a=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(a)throw l}}Promise.all(r).then(function(t){i.data=t,e.onUploadResponse(i)},function(t){e.onUploadError(t)})}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(43),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(0),s=n(44);t.exports=o.Model.extend(r.default).extend({defaults:{selectors:{},selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0},initialize:function(t,e){this.config=t||{};var n=e&&e.sm,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 s(i))},compare:function(t,n,i,r){var o=r||{},s=n||"",a=i||"",l=o.selectorsAdd||"";t instanceof Array||t.models||(t=[t]);var c=e.map(t.models||t,function(t){return t.get("name")}),u=e.map(this.get("selectors").models,function(t){return t.get("name")});if(c.length!==u.length)return!1;for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set("style",Object.assign({},t),e)},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)}}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({initialize:function(t,e){this.model=function(t,e){return this.ClassTag||(this.ClassTag=n(8)),new this.ClassTag(t,e)}}})},function(t,e,n){"use strict";var i=n(0),r=n(140),o=n(141);t.exports=i.Collection.extend({model:r,setTarget:function(t){this.target=t},add:function(t,e){if("string"==typeof t||t instanceof Array){"string"==typeof t&&(t=[t]);for(var n=0,r=t.length;n0;for(o in C)(!C[o]&&n(i.mods,+o)>-1||C[o]&&-1==n(i.mods,+o))&&(a=!1);(0!=i.mods.length||C[16]||C[18]||C[17]||C[91])&&!a||!1===i.method(t,i)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function s(t){var e,i=t.keyCode,r=n(E,i);if(r>=0&&E.splice(r,1),93!=i&&224!=i||(i=91),i in C){C[i]=!1;for(e in S)S[e]==i&&(l[e]=!1)}}function a(){for(x in C)C[x]=!1;for(x in S)l[x]=!1}function l(t,e,n){var i,r;i=m(t),void 0===n&&(n=e,e="all");for(var o=0;o1&&(r=v(t),t=[t[t.length-1]]),t=t[0],t=M(t),t in w||(w[t]=[]),w[t].push({shortcut:i[o],scope:e,method:n,key:i[o],mods:r})}function c(t,e){var n,r,o,s,a,l=[];for(n=m(t),s=0;s1&&(l=v(r),t=r[r.length-1]),t=M(t),void 0===e&&(e=p()),!w[t])return;for(o=0;o\n \n <% } %>\n\n
\n
\n
\n \n \n <%= icon %>\n \n
\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\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,"destroy remove",this.remove),this.listenTo(i,"change:status",this.updateStatus),this.listenTo(i,"change:open",this.updateOpening),this.className=e+"item no-select",this.editBtnCls=e+"nav-item-edit",this.inputNameCls=n+"nav-comp-name",this.caretCls=n+"nav-item-caret",this.titleCls=e+"title",this.$el.data("model",i),this.$el.data("collection",r)},handleEdit:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!1,e.focus()},handleEditEnd:function(t){t.stopPropagation();var e=this.getInputName();e.readOnly=!0,this.model.set("custom-name",e.value)},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(),this.em&&this.em.setSelected(this.model,{fromLayers:1})},startSort:function(t){t.stopPropagation(),0===t.button&&this.sorter&&this.sorter.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){o.prototype.updateStatus.apply(this,arguments)},toggleVisibility:function(t){t.stopPropagation();var n=this.pfx;this.$eye||(this.$eye=this.$el.children("#"+n+"btn-eye"));var i=e.clone(this.model.get("style")),r=this.pfx+"hide";this.isVisible()?(this.$el.addClass(r),this.$eye.addClass("fa-eye-slash"),i.display="none"):(this.$el.removeClass(r),this.$eye.removeClass("fa-eye-slash"),delete i.display),this.model.set("style",i)},isVisible:function(){var t=this.model.get("style"),e=t.display;if(!e||"none"!=e)return 1},checkChildren:function(){var t=this.model,e=this.countChildren(t),n=this.pfx,i=n+"no-chld",r=this.$el.children("."+n+"title-c").children("."+n+"title");this.$counter||(this.$counter=this.$el.children("#"+n+"counter")),e?(r.removeClass(i),this.$counter.html(e)):(r.addClass(i),this.$counter.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){var t=this.pfx;this.caret=this.$el.children("."+t+"title-c").find("#"+t+"caret")}return this.caret},render:function(){var t=this.model,r=this.pfx,o=this.isVisible(),s=this.countChildren(t),a=this.$el,l=this.level+1;a.html(this.template({title:t.getName(),icon:t.getIcon(),addClass:s?"":r+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:s,visible:o,hidable:this.config.hidable,prefix:r,ppfx:this.ppfx,level:l})),void 0===i&&(i=n(53));var c=new i({collection:t.get("components"),config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:t,level:l}).render().$el;return a.find("."+r+"children").append(c),t.get("draggable")&&this.config.sortable||a.children("#"+r+"move").remove(),o||(this.className+=" "+r+"hide"),a.attr("class",e.result(this,"className")),this.updateOpening(),this.updateStatus(),this}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(52);t.exports=i.View.extend({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opt=t;var e=t.config||{};if(this.level=t.level,this.config=e,this.preview=t.preview,this.ppfx=e.pStylePrefix||"",this.pfx=e.stylePrefix||"",this.parent=t.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",e.sortable&&!this.opt.sorter){var n=this.pfx,i=e.em.get("Utils");this.opt.sorter=new i.Sorter({container:e.sortContainer||this.el,containerSel:"."+n+"items",itemSel:"."+n+"item",ppfx:this.ppfx,ignoreViewChildren:1,avoidSelectOnEnd:1,pfx:n,nested:1})}this.sorter=this.opt.sorter||"",this.$el.data("collection",this.collection),this.parent&&this.$el.data("model",this.parent)},addTo:function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},addToCollection:function(t,e,n){var i=this.level,o=e||null,s=r;if(this.isCountable(t,this.config.hideTextnode)){var a=new s({level:i,model:t,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=a.render().el;if(o)o.appendChild(l);else if(void 0!==n){var c="before";this.$el.children().length==n&&(n--,c="after"),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return l}},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();return this.el.innerHTML="",this.collection.each(function(n){return t.addToCollection(n,e)}),this.el.appendChild(e),this.$el.attr("class",this.className),this}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",label:"",open:!0,attributes:{}}})},function(t,e,n){"use strict";t.exports=n(56)},function(t,e,n){"use strict";var i=n(14),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(1);t.exports=function(){var t=n(57),e=n(58),i=n(212),s=new i,a=[];return{$:r.default,editors:a,plugins:s,version:"0.12.8",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.container;if(!i)throw new Error("'container' is required");(0,o.defaults)(n,t),n.el=i instanceof window.HTMLElement?i:document.querySelector(i);var r=new e(n).init();return n.plugins.forEach(function(t){var e=s.get(t);e?e(r,n.pluginsOpts[t]||{}):console.warn("Plugin "+t+" not found")}),r.getModel().loadOnStart(),n.autorender&&r.render(),a.push(r),r}}}()},function(t,e,n){"use strict";t.exports={autorender:1,container:"",components:"",style:"",fromElement:0,copyPaste:!0,undoManager:!0,storageManager:{},plugins:[],pluginsOpts:{}}},function(t,e,n){"use strict";t.exports=function(t){var e=t||{},i=n(59),r=n(60),o=n(211);for(var s in i)s in e||(e[s]=i[s]);e.pStylePrefix=e.stylePrefix;var a=new r(e),l=new o({model:a,config:e});return{editor:a,DomComponents:a.get("DomComponents"),CssComposer:a.get("CssComposer"),StorageManager:a.get("StorageManager"),AssetManager:a.get("AssetManager"),BlockManager:a.get("BlockManager"),TraitManager:a.get("TraitManager"),SelectorManager:a.get("SelectorManager"),CodeManager:a.get("CodeManager"),Commands:a.get("Commands"),Modal:a.get("Modal"),Panels:a.get("Panels"),StyleManager:a.get("StyleManager"),Canvas:a.get("Canvas"),UndoManager:a.get("UndoManager"),DeviceManager:a.get("DeviceManager"),RichTextEditor:a.get("RichTextEditor"),Utils:a.get("Utils"),Config:a.get("Config"),init:function(){return a.init(this),this},getConfig:function(){return e},getHtml:function(){return a.getHtml()},getCss:function(){return a.getCss()},getJs:function(){return a.getJs()},getComponents:function(){return a.get("DomComponents").getComponents()},setComponents:function(t){return a.setComponents(t),this},addComponents:function(t,e){return this.getComponents().add(t,e)},getStyle:function(){return a.get("CssComposer").getAll()},setStyle:function(t){return a.setStyle(t),this},getSelected:function(){return a.getSelected()},getSelectedToStyle:function(){var t=a.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},select:function(t){return a.setSelected(t),this},setDevice:function(t){return a.set("device",t),this},getDevice:function(){return a.get("device")},runCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.run(this,this,e),this.trigger("run:"+t)),n},stopCommand:function(t,e){var n,i=a.get("Commands").get(t);return i&&(n=i.stop(this,this,e),this.trigger("stop:"+t)),n},store:function(t){return a.store(t)},load:function(t){return a.load(t)},getContainer:function(){return e.el},refresh:function(){a.refreshCanvas()},setCustomRte:function(t){this.RichTextEditor.customRte=t},on:function(t,e){return a.on(t,e)},off:function(t,e){return a.off(t,e)},trigger:function(t){return a.trigger(t)},getEl:function(){return l.el},getModel:function(){return a},render:function(){return a.on("loaded",function(){a.get("modules").forEach(function(t){t.postRender&&t.postRender(l)})}),l.render(),l.el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"gjs-",components:"",copyPaste:!0,noticeOnUnload:!0,undoManager:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",protectedCss:"*{box-sizing: border-box;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:1,allowScripts:0,showDevices:1,devicePreviewMode:0,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,exportWrapper:0,wrappesIsBody:1,el:"",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:{}}},function(t,e,n){"use strict";var i=n(1),r=[n(61),n(65),n(73),n(78),n(82),n(86),n(90),n(102),n(108),n(28),n(126),n(132),n(137),n(161),n(167),n(193),n(201)],o=n(0),s=n(208),a=n(49),l=void 0;n(210)({Backbone:o,$:o.$});var c=o.$;t.exports=o.Model.extend({defaults:{clipboard:null,designerMode:!1,selectedComponent:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""},initialize:function(t){this.config=t,this.set("Config",t),this.set("modules",[]),t.el&&t.fromElement&&(this.config.components=t.el.innerHTML),r.forEach(function(t){this.loadModule(t)},this),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this),this.on("change:changesCount",this.updateBeforeUnload,this)},loadOnStart:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.get("StorageManager");this.get("toLoad").forEach(function(t){t.onLoad()});var i=function(){t.um.clear(),t.initUndoManager(),t.get("modules").forEach(function(e){return e.postLoad&&e.postLoad(t)}),e&&e()};n&&n.getConfig().autoload?this.load(i):i()},updateBeforeUnload:function(){var t=this.get("changesCount");this.config.noticeOnUnload&&t?window.onbeforeunload=function(t){return 1}:window.onbeforeunload=null},loadModule:function(t){var e=this.config,n=new t,i=n.name.charAt(0).toLowerCase()+n.name.slice(1),r=e[i]||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(Object.create(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)},listenRules:function(t){this.stopListening(t,"add remove",this.listenRule),this.listenTo(t,"add remove",this.listenRule),t.each(function(t){this.listenRule(t)},this)},listenRule:function(t){this.stopListening(t,"change:style",this.handleUpdates),this.listenTo(t,"change:style",this.handleUpdates)},handleUpdates:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i.temporary||(l&&clearInterval(l),l=setTimeout(function(){var t=n.get("changesCount")+1,e=n.get("StorageManager");n.set("changesCount",t),!e.isAutosave()||t1&&void 0!==arguments[1]?arguments[1]:{},n=t;t instanceof HTMLElement&&(n=c(t).data("model")),this.set("selectedComponent",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=this.config,e=t.wrappesIsBody,n=this.get("CssComposer"),i=this.get("DomComponents").getComponent();return t.protectedCss+this.get("CodeManager").getCode(i,"css",{cssc:n,wrappesIsBody:e})},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(){t&&t(),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,(e instanceof Array?e:[e]).forEach(function(t){o.push(t)})}),r.load(o,function(t){n.cacheLoad=t,e&&e(t),n.trigger("storage:load",t)})},getDeviceModel:function(){var t=this.get("device");return this.get("DeviceManager").get(t)},runDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this),t.run(this,this),this.defaultRunning=1)},stopDefault:function(){var t=this.get("Commands").get(this.config.defaultCommand);t&&(t.stop(this,this),this.defaultRunning=0)},refreshCanvas:function(){this.set("canvasOffset",this.get("Canvas").getOffset())},clearSelection:function(t){(t||window).getSelection().removeAllRanges()},data:function(t,e,n){if(t["_gjs-data"]||(t["_gjs-data"]={}),(0,i.isUndefined)(n))return t["_gjs-data"][e];t["_gjs-data"][e]=n}})},function(t,e,n){"use strict";t.exports=function(){var t=n(62),e=n(63),i=n(64);return{name:"Utils",init:function(){return this},Sorter:t,Resizer:e,Dragger:i}}},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({initialize:function(t){this.opt=t||{},n.bindAll(this,"startSort","onMove","endMove","rollback","udpateOffset","moveDragHelper");var e=t||{};this.elT=0,this.elL=0,this.borderOffset=e.borderOffset||10;var r=e.container;this.el="string"==typeof r?document.querySelector(r):r,this.$el=i(this.el),this.containerSel=e.containerSel||"div",this.itemSel=e.itemSel||"div",this.draggable=e.draggable||!0,this.nested=e.nested||0,this.pfx=e.pfx||"",this.ppfx=e.ppfx||"",this.freezeClass=e.freezeClass||this.pfx+"freezed",this.onStart=e.onStart||"",this.onEndMove=e.onEndMove||"",this.direction=e.direction||"v",this.onMoveClb=e.onMove||"",this.relative=e.relative||0,this.ignoreViewChildren=e.ignoreViewChildren||0,this.ignoreModels=e.ignoreModels||0,this.plh=e.placer||"",this.wmargin=e.wmargin||0,this.offTop=e.offsetTop||0,this.offLeft=e.offsetLeft||0,this.document=e.document||document,this.$document=i(this.document),this.dropContent=null,this.em=e.em||"",this.dragHelper=null,this.canvasRelative=e.canvasRelative||0,this.selectOnEnd=!e.avoidSelectOnEnd,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.udpateOffset),this.udpateOffset())},getContainerEl:function(){if(!this.el){var t=this.opt.container;this.el="string"==typeof t?document.querySelector(t):t,this.$el=i(this.el)}return this.el},udpateOffset:function(){var t=this.em.get("canvasOffset");this.offTop=t.top,this.offLeft=t.left},setDropContent:function(t){this.dropContent=t},toggleSortCursor:function(t){var e=this.em,n=document.body,i=this.ppfx||this.pfx,r=i+"grabbing",o=e?e.get("Canvas").getBody():"";t?(e&&e.get("Canvas").startAutoscroll(),n.className+=" "+r,e&&(o.className+=" "+r)):(e&&e.get("Canvas").stopAutoscroll(),n.className=n.className.replace(r,"").trim(),e&&(o.className=o.className.replace(r,"").trim()))},setDragHelper:function(t,e){for(var n=e||"",r=t.cloneNode(1),o="",s=getComputedStyle(t),a=0;as||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]:{};return n(this,t),this.setOptions(e),this}return i(t,[{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in o)e in t||(t[e]=o[e]);this.opts=t,this.setup()}},{key:"setup",value:function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,i=void 0;for(this.container||(i=document.createElement("div"),i.className=e+"resizer-c",n.appendChild(i),this.container=i),i=this.container;i.firstChild;)i.removeChild(i.firstChild);var r={tl:t.tl?s("tl",t):"",tc:t.tc?s("tc",t):"",tr:t.tr?s("tr",t):"",cl:t.cl?s("cl",t):"",cr:t.cr?s("cr",t):"",bl:t.bl?s("bl",t):"",bc:t.bc?s("bc",t):"",br:t.br?s("br",t):""};for(var o in r){var a=r[o];a&&i.appendChild(a)}this.handlers=r,this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),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:"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.$doc||(this.$doc=r([this.el.ownerDocument,document])),this.$doc}},{key:"getElementPos",value:function(t){var e=this.posFetcher||"";return e?e(t):a(t)}},{key:"focus",value:function(t){if(!t||t!==this.el){this.el=t;var e=this.getElementPos(t),n=this.container,i=n.style;i.left=e.left+"px",i.top=e.top+"px",i.width=e.width+"px",i.height=e.height+"px",this.container.style.display="block",this.getDocumentEl().on("mousedown",this.handleMouseDown)}}},{key:"blur",value:function(){if(this.container.style.display="none",this.el){r([this.el.ownerDocument,document]);this.getDocumentEl().off("mousedown",this.handleMouseDown),this.el=null}}},{key:"start",value:function(t){if(0===t.button){t.preventDefault(),t.stopPropagation();var e=this.opts||{},n="data-"+e.prefix+"handler",i=this.getElementPos(this.el);this.handlerAttr=t.target.getAttribute(n),this.clickedHandler=t.target,this.startDim={t:i.top,l:i.left,w:i.width,h:i.height},this.rectDim={t:i.top,l:i.left,w:i.width,h:i.height},this.startPos={x:t.clientX,y:t.clientY};var r=this.getDocumentEl();r.on("mousemove",this.move),r.on("keydown",this.handleKeyDown),r.on("mouseup",this.stop),this.move(t),"function"==typeof this.onStart&&this.onStart(t,{docs:r})}}},{key:"move",value:function(t){var e=this.mousePosFetcher,n=e?e(t):{x:t.clientX,y:t.clientY};this.currentPos=n,this.delta={x:n.x-this.startPos.x,y:n.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(0),"function"==typeof this.onMove&&this.onMove(t),0===t.which&&this.stop(t)}},{key:"stop",value:function(t){var e=this.getDocumentEl();e.off("mousemove",this.move),e.off("keydown",this.handleKeyDown),e.off("mouseup",this.stop),this.updateRect(1),"function"==typeof this.onEnd&&this.onEnd(t,{docs:e})}},{key:"updateRect",value:function(t){var e=this.el.style,n=this.container.style,i=this.rectDim,r=this.getSelectedHandler();"function"==typeof this.updateTarget?this.updateTarget(this.el,i,{store:t,selectedHandler:r}):(e.width=i.w+"px",e.height=i.h+"px");var o=this.getElementPos(this.el);n.left=o.left+"px",n.top=o.top+"px",n.width=o.width+"px",n.height=o.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=this.opts||{},n=this.startDim,i={t:0,l:0,w:n.w,h:n.h};if(t){var r=t.handlerAttr;~r.indexOf("r")&&(i.w=Math.max(32,n.w+t.delta.x)),~r.indexOf("b")&&(i.h=Math.max(32,n.h+t.delta.y)),~r.indexOf("l")&&(i.w=Math.max(32,n.w-t.delta.x)),~r.indexOf("t")&&(i.h=Math.max(32,n.h-t.delta.y));var o=e.ratioDefault?!t.keys.shift:t.keys.shift;if(r.indexOf("c")<0&&o){var s=n.w/n.h;i.w/i.h>s?i.h=Math.round(i.w/s):i.w=Math.round(i.h*s)}return~r.indexOf("l")&&(i.l=n.w-i.w),~r.indexOf("t")&&(i.t=n.h-i.h),i}}}]),t}();t.exports={init:function(t){return new l(t)}}}).call(e,n(0))},function(t,e,n){"use strict";(function(e){var n=e.$,i=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.exports={setKey:function(t,e){},getElementRect:function(t){var e=this.opts.posFetcher||"";return e?e(t,{avoidFrameOffset:1}):i(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){var t=t||this.el;if(!this.$doc){var e=[document];t&&e.push(t.ownerDocument),this.$doc=n(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"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(66),i=n(67),r=n(68),o={},s={};return{name:"StorageManager",init:function(n){t=n||{};for(var o in e)o in t||(t[o]=e[o]);return s.remote=new r(t),s.local=new i(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(t,e){return o[t]=e,this},get:function(t){return o[t]||null},getStorages:function(){return o},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var i=this.get(this.getCurrent()),r={};for(var o in e)r[t.id+o]=e[o];return i?i.store(r,n):null},load:function(e,n){var i=this.get(this.getCurrent()),r=[],o={};"string"==typeof e&&(e=[e]);for(var s=0,a=e.length;s1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.get("contentTypeJson"),s=this.get("headers")||{},a=this.get("params"),l=n.body||{},c=void 0;for(var u in a)l[u]=a[u];if((0,o.isUndefined)(s["X-Requested-With"])&&(s["X-Requested-With"]="XMLHttpRequest"),(0,o.isUndefined)(s["Content-Type"])&&r&&(s["Content-Type"]="application/json; charset=utf-8"),r)c=JSON.stringify(l);else{c=new FormData;for(var h in l)c.append(h,l[h])}this.onStart(),this.fetch(t,{method:n.method||"post",credentials:"include",headers:s,body:c}).then(function(t){return 1==(t.status/200|0)?t.text():t.text().then(function(t){return Promise.reject(t)})}).then(function(t){return e.onResponse(t,i)}).catch(function(t){return e.onError(t)})}})},function(t,e,n){(function(e){!function(n){function i(){}function r(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)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=[],h(t,this)}function s(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,o._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?a:l)(e.promise,t._value);var i;try{i=n(t._value)}catch(t){return void l(e.promise,t)}a(e.promise,i)})}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void h(r(n,e),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(71),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function i(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n<%= 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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(79),o=n(80),s=n(81);return{compTypes:"",name:"Parser",init:function(n){i=n||{};for(var a in r)a in i||(i[a]=r[a]);return t=new s(i),e=new o(i),this},parseHtml:function(n){return t.compTypes=this.compTypes,t.parse(n,e)},parseCss:function(t){return e.parse(t)}}}},function(t,e,n){"use strict";t.exports={textTags:["br","b","i","u"]}},function(t,e,n){"use strict";t.exports=function(t){return{parseSelector:function(t){for(var e=[],n=[],i=t.split(","),r=0,o=i.length;r1&&void 0!==arguments[1]?arguments[1]:{};"object"==(void 0===t?"undefined":i(t))?n=t:n.name=t,n.label&&!n.name&&(n.name=a.escapeName(n.label));var r=n.name,o=r?this.get(r):e.where(n)[0];return o||e.add(n)},get:function(t){return e.where({name:t})[0]},getAll:function(){return e},render:function(t){if(t){return new c({collection:new l(t),config:o}).render().el}return r.render().el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"clm-",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";(function(e){var i=n(0),r=n(85);t.exports=i.View.extend({template:e.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(t){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.listenTo(this.target,"change:selectedComponent",this.componentChanged),this.listenTo(this.target,"targetClassUpdated",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.get("selectedComponent");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(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){var t=this.target.get("selectedComponent");if(this.compTarget=t,t&&t.get){var e="";this.collection.each(function(t){t.get("active")&&(e+="."+t.get("name"))});var n=t.get("state");e=n?e+":"+n:e,e=e||t.getName();var i=this.el.querySelector("#"+this.pfx+"sel");i&&(i.innerHTML=e)}},stateChanged:function(t){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(t){var e=this.target,n=this.compTarget;if(t.trim()){if(e){var i=e.get("SelectorManager"),r=i.add({label:t});if(n){var o=n.get("classes"),s=o.length;o.add(r);var a=o.length;this.collection.add(r),a>s&&e.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(t,e){var n=e||null,i=new r({model:t,config:this.config,coll:this.collection}),o=i.render().el;return n?n.appendChild(o):this.getClasses().append(o),o},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.config;return this.$el.html(this.template({selectedLabel:t.selectedLabel,statesLabel:t.statesLabel,label:t.label,pfx:this.pfx,ppfx:this.ppfx})),this.$input=this.$el.find("input#"+this.newInputId),this.$addBtn=this.$el.find("#"+this.addBtnId),this.$classes=this.$el.find("#"+this.pfx+"tags-c"),this.$states=this.$el.find("#"+this.stateInputId),this.$statesC=this.$el.find("#"+this.stateInputC),this.$states.append(this.getStateOptions()),this.renderClasses(),this.$el.attr("class",this.className),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(8);t.exports=i.View.extend({template:e.template('\n \n \n />\n \n '),initialize:function(t){this.config=t.config||{},this.coll=t.coll||null,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.inputProp="readonly",this.target=this.config.em,this.className=this.pfx+"tag",this.closeId=this.pfx+"close",this.chkId=this.pfx+"checkbox",this.labelId=this.pfx+"tag-label",this.events={},this.events["click #"+this.closeId]="removeTag",this.events["click #"+this.chkId]="changeStatus",this.events["dblclick #"+this.labelId]="startEditTag",this.events["keypress #"+this.labelId+" input"]="updateInputLabel",this.events["blur #"+this.labelId+" input"]="endEditTag",this.listenTo(this.model,"change:active",this.updateStatus),this.delegateEvents()},startEditTag:function(){this.$labelInput.prop(this.inputProp,!1)},endEditTag:function(){var t=this.$labelInput.val(),e=r.escapeName(t);if(this.target){var n=this.target.get("SelectorManager");n&&(n.get(e)?this.$labelInput.val(this.model.get("label")):this.model.set({name:e,label:t}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(t){var e=this,n=this.target,i=this.model,r=this.coll,o=(this.el,n&&n.get("selectedComponent"));o&&(o.get,o.get("classes").remove(i)),r&&r.remove(i),setTimeout(function(){return e.remove()},0),n&&n.trigger("targetClassRemoved")},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"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input")),this.$labelInput.prop(this.inputProp,!0);var t=this.$labelInput.val().length-1;t=t<1?1:t,this.$labelInput.attr("size",t)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.$el.attr("class",this.className),this.updateStatus(),this.updateInputLabel(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(87),o=n(88),s=n(89);return{name:"Modal",init:function(n){i=n||{};for(var a in 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){this.render().appendTo(t.el)},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";t.exports={stylePrefix:"mdl-",title:"",content:"",backdrop:!0}},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";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n
\n
<%= title %>
\n
\n
\n
\n
<%= content %>
\n
\n
\n
\n
\n '),events:{},initialize:function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.model,"change:open",this.updateOpen),this.listenTo(this.model,"change:title",this.updateTitle),this.listenTo(this.model,"change:content",this.updateContent),this.events["click ."+this.pfx+"btn-close"]="hide",this.config.backdrop&&(this.events["click ."+this.pfx+"backlayer"]="hide"),this.delegateEvents()},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.model.toJSON();return t.pfx=this.pfx,this.$el.html(this.template(t)),this.$el.attr("class",this.pfx+"container"),this.updateOpen(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(91),i=n(92),r=n(93),o=n(94),s=n(95),a=n(96),l=n(101),c={},u={},h={},d={};return{getConfig:function(){return t},config:t,EditorView:l,name:"CodeManager",init:function(n){t=n||{};for(var l in 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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getGenerator(e);return i?i.build(t,n):""},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={stylePrefix:"cm-",inlineCss:!1}},function(t,e,n){"use strict";var i=n(0);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({initialize:function(){this.compCls=[]},buildFromModel:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="",i=t.get("style"),r=t.get("classes"),o=e.wrappesIsBody;if(r&&r.each(function(t){this.compCls.push(t.get("name"))},this),i&&0!==Object.keys(i).length){var s="#"+t.getId();s=o&&t.get("wrapper")?"body":s,n+=s+"{";for(var a in i)i.hasOwnProperty(a)&&(n+=a+":"+i[a]+";");n+="}"}return n},buildFromComp:function(t){var e=t.get("components")||t,n="";return e.each(function(t){var e=t.get("components");n+=this.buildFromModel(t),e.length&&(n+=this.buildFromComp(e))},this),n},build:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.cssc;this.compCls=[];var i=this.buildFromModel(t,e);i+=this.buildFromComp(t);this.compCls;if(n){var r=n.getAll(),o={};r.each(function(t){var e=t.get("mediaText");if(e){var n=o[e];return void(n?n.push(t):o[e]=[t])}i+=this.buildFromRule(t)},this);for(var s in o){for(var a=o[s],l="",c=0,u=a.length;c-1&&(a=1)}),s&&a||n){s+=o?":"+o:"",s+=n?(s?", ":"")+n:"";var c="";if(r&&0!==Object.keys(r).length)for(var u in r)r.hasOwnProperty(u)&&(c+=u+":"+r[u]+";");c&&(e+=s+"{"+c+"}")}return e}})},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({build:function(t){var n=t.toJSON();return this.beforeEach(n),e.each(n,function(t,e){var r=n[e];if(r instanceof i.Model)n[e]=this.build(r);else if(r instanceof i.Collection){var o=r;n[e]=[],o.length&&o.each(function(t,i){n[e][i]=this.build(t)},this)}},this),n},beforeEach:function(t){delete t.status}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.Model.extend({mapModel:function(t){var n="",i=t.get("script"),r=t.get("type"),o=t.get("components"),s=t.getId();if(i){var a=t.get("attributes");a=e.extend({},a,{id:s}),t.set("attributes",a);var l=t.getScriptString();if(t.get("scriptUpdated"))this.mapJs[r+"-"+s]={ids:[s],code:l};else{var c=this.mapJs[r];c?c.ids.push(s):this.mapJs[r]={ids:[s],code:l}}}return o.each(function(t){n+=this.mapModel(t)},this),n},build:function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var i=this.mapJs[n];e+="\n var items = document.querySelectorAll('"+("#"+i.ids.join(", #"))+"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){"+i.code+"}.bind(items[i]))();\n }"}return e}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0),r=n(6);n(97),n(23),n(100);t.exports=i.Model.extend({defaults:{input:"",label:"",codeName:"",theme:"",readOnly:!0,lineNumbers:!0},init:function(t){return this.editor=r.fromTextArea(t,{dragDrop:!1,lineWrapping:!0,lineNumbers:this.get("lineNumbers"),readOnly:this.get("readOnly"),mode:this.get("codeName"),theme:this.get("theme")}),this},setContent:function(t){this.editor&&(this.editor.setValue(t),this.editor.autoFormatRange&&(r.commands.selectAll(this.editor),this.editor.autoFormatRange(this.editor.getCursor(!0),this.editor.getCursor(!1)),r.commands.goDocStart(this.editor)))}})},function(t,e,n){!function(t){t(n(6),n(98),n(99),n(23))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e||(l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var i=t.match(n(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])}function s(t,e){for(var n=0;n\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&d&&/>$/.test(i.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==i.current()&&s(u[f[1]],f[2]),g=t.getMode(n,p),m=r(f[1],!0),v=r(f[1],!1);o.token=function(t,n){return t.match(m,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=g,o.localState=t.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return h}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),u={},h=i&&i.tags,d=i&&i.scriptTypes;if(o(a,u),h&&o(h,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:l,inTag:null,localMode:null,localState:null,htmlState:t.startState(c)}},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(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,i){return!e.localMode||/^\s*<\//.test(n)?c.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||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(6))}(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,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(M=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,M=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return M="equals",null;if("<"==n){e.tokenize=o,e.state=f,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function c(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function u(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function d(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;h(t)}}function f(t,e,n){return"openTag"==t?(n.tagStart=e.column(),p):"closeTag"==t?g:f}function p(t,e,n){return"word"==t?(n.tagName=e.current(),E="tag",y):(E="error",p)}function g(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&h(n),n.context&&n.context.tagName==i||!1===k.matchClosing?(E="tag",m):(E="tag error",v)}return E="error",v}function m(t,e,n){return"endTag"!=t?(E="error",m):(h(n),f)}function v(t,e,n){return E="error",m(t,e,n)}function y(t,e,n){if("word"==t)return E="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?d(n,i):(d(n,i),n.context=new u(n,i,r==n.indented)),f}return E="error",y}function b(t,e,n){return"equals"==t?x:(k.allowMissing||(E="error"),y(t,e,n))}function x(t,e,n){return"string"==t?w:"word"==t&&k.allowUnquoted?(E="string",y):(E="error",y(t,e,n))}function w(t,e,n){return"string"==t?w:y(t,e,n)}var C=i.indentUnit,k={},S=r.htmlMode?e:n;for(var T in S)k[T]=S[T];for(var T in r)k[T]=r[T];var M,E;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:f,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;M=null;var n=e.tokenize(t,e);return(n||M)&&"comment"!=n&&(E=null,e.state=e.state(M||n,t,e),E&&(n="error"==E?n+" error":E)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+C;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==k.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+C*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==x&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){!function(t){t(n(6))}(function(t){"use strict";t.defineMode("javascript",function(e,n){function i(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}}function r(t,e,n){return Mt=t,Et=n,e}function o(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=s(n),e.tokenize(t,e);if("."==n&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return r("number","number");if("."==n&&t.match(".."))return r("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return r(n);if("="==n&&t.eat(">"))return r("=>","operator");if("0"==n&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),r("number","number");if("0"==n&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),r("number","number");if("0"==n&&t.eat(/b/i))return t.eatWhile(/[01]/i),r("number","number");if(/\d/.test(n))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),r("number","number");if("/"==n)return t.eat("*")?(e.tokenize=a,a(t,e)):t.eat("/")?(t.skipToEnd(),r("comment","comment")):Tt(t,e,1)?(i(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),r("regexp","string-2")):(t.eatWhile(_t),r("operator","operator",t.current()));if("`"==n)return e.tokenize=l,l(t,e);if("#"==n)return t.skipToEnd(),r("error","error");if(_t.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||t.eatWhile(_t),r("operator","operator",t.current());if(It.test(n)){t.eatWhile(It);var o=t.current();if("."!=e.lastType){if(Dt.propertyIsEnumerable(o)){var c=Dt[o];return r(c.type,c.style,o)}if("async"==o&&t.match(/^\s*[\(\w]/,!1))return r("async","keyword",o)}return r("variable","variable",o)}}function s(t){return function(e,n){var i,s=!1;if(Lt&&"@"==e.peek()&&e.match($t))return n.tokenize=o,r("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||s);)s=!s&&"\\"==i;return s||(n.tokenize=o),r("string","string")}}function a(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=o;break}i="*"==n}return r("comment","comment")}function l(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=o;break}i=!i&&"\\"==n}return r("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Ot){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=Ft.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(It.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function u(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 h(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}function d(t,e,n,i,r){var o=t.cc;for(Rt.state=t,Rt.stream=r,Rt.marked=null,Rt.cc=o,Rt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){if((o.length?o.pop():Nt?C:w)(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Rt.marked?Rt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)Rt.cc.push(arguments[t])}function p(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var i=Rt.state;if(Rt.marked="def",i.context){if(e(i.localVars))return;i.localVars={name:t,next:i.localVars}}else{if(e(i.globalVars))return;n.globalVars&&(i.globalVars={name:t,next:i.globalVars})}}function m(){Rt.state.context={prev:Rt.state.context,vars:Rt.state.localVars},Rt.state.localVars=Ht}function v(){Rt.state.localVars=Rt.state.context.vars,Rt.state.context=Rt.state.context.prev}function y(t,e){var n=function(){var n=Rt.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 u(i,Rt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function b(){var t=Rt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function x(t){function e(n){return n==t?p():";"==t?f():p(e)}return e}function w(t,e){return"var"==t?p(y("vardef",e.length),Z,x(";"),b):"keyword a"==t?p(y("form"),S,w,b):"keyword b"==t?p(y("form"),w,b):"{"==t?p(y("}"),W,b):";"==t?p():"if"==t?("else"==Rt.state.lexical.info&&Rt.state.cc[Rt.state.cc.length-1]==b&&Rt.state.cc.pop()(),p(y("form"),S,w,b,it)):"function"==t?p(ct):"for"==t?p(y("form"),rt,w,b):"variable"==t?Ot&&"type"==e?(Rt.marked="keyword",p(q,x("operator"),q,x(";"))):Ot&&"declare"==e?(Rt.marked="keyword",p(w)):p(y("stat"),F):"switch"==t?p(y("form"),S,x("{"),y("}","switch"),W,b,b):"case"==t?p(C,x(":")):"default"==t?p(x(":")):"catch"==t?p(y("form"),m,x("("),ut,x(")"),w,b,v):"class"==t?p(y("form"),dt,b):"export"==t?p(y("stat"),mt,b):"import"==t?p(y("stat"),yt,b):"module"==t?p(y("form"),Q,x("{"),y("}"),W,b,b):"async"==t?p(w):"@"==e?p(C,w):f(y("stat"),C,x(";"),b)}function C(t){return T(t,!1)}function k(t){return T(t,!0)}function S(t){return"("!=t?f():p(y(")"),C,x(")"),b)}function T(t,e){if(Rt.state.fatArrowAt==Rt.stream.start){var n=e?I:O;if("("==t)return p(m,y(")"),B(Q,")"),b,x("=>"),n,v);if("variable"==t)return f(m,Q,x("=>"),n,v)}var i=e?A:P;return zt.hasOwnProperty(t)?p(i):"function"==t?p(ct,i):"class"==t?p(y("form"),ht,b):"keyword c"==t||"async"==t?p(e?E:M):"("==t?p(y(")"),M,x(")"),b,i):"operator"==t||"spread"==t?p(e?k:C):"["==t?p(y("]"),kt,b,i):"{"==t?j(R,"}",null,i):"quasi"==t?f(L,i):"new"==t?p(D(e)):p()}function M(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t){return t.match(/[;\}\)\],]/)?f():f(k)}function P(t,e){return","==t?p(C):A(t,e,!1)}function A(t,e,n){var i=0==n?P:A,r=0==n?C:k;return"=>"==t?p(m,n?I:O,v):"operator"==t?/\+\+|--/.test(e)||Ot&&"!"==e?p(i):"?"==e?p(C,x(":"),r):p(r):"quasi"==t?f(L,i):";"!=t?"("==t?j(k,")","call",i):"."==t?p(z,i):"["==t?p(y("]"),M,x("]"),b,i):Ot&&"as"==e?(Rt.marked="keyword",p(q,i)):void 0:void 0}function L(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?p(L):p(C,N)}function N(t){if("}"==t)return Rt.marked="string-2",Rt.state.tokenize=l,p(L)}function O(t){return c(Rt.stream,Rt.state),f("{"==t?w:C)}function I(t){return c(Rt.stream,Rt.state),f("{"==t?w:k)}function D(t){return function(e){return"."==e?p(t?$:_):"variable"==e&&Ot?p(J,t?A:P):f(t?k:C)}}function _(t,e){if("target"==e)return Rt.marked="keyword",p(P)}function $(t,e){if("target"==e)return Rt.marked="keyword",p(A)}function F(t){return":"==t?p(b,w):f(P,x(";"),b)}function z(t){if("variable"==t)return Rt.marked="property",p()}function R(t,e){return"async"==t?(Rt.marked="property",p(R)):"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p("get"==e||"set"==e?H:V)):"number"==t||"string"==t?(Rt.marked=Lt?"property":Rt.style+" property",p(V)):"jsonld-keyword"==t?p(V):"modifier"==t?p(R):"["==t?p(C,x("]"),V):"spread"==t?p(C,V):":"==t?f(V):void 0}function H(t){return"variable"!=t?f(V):(Rt.marked="property",p(ct))}function V(t){return":"==t?p(k):"("==t?f(ct):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=Rt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),p(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?p():p(x(e))}return function(n,r){return n==e||r==e?p():f(t,i)}}function j(t,e,n){for(var i=3;i"==t)return p(q)}function G(t,e){return"variable"==t||"keyword"==Rt.style?(Rt.marked="property",p(G)):"?"==e?p(G):":"==t?p(q):"["==t?p(C,U,x("]"),G):void 0}function Y(t){return"variable"==t?p(Y):":"==t?p(q):void 0}function X(t,e){return"<"==e?p(y(">"),B(q,">"),b,X):"|"==e||"."==t?p(q):"["==t?p(x("]"),X):"extends"==e?p(q):void 0}function J(t,e){if("<"==e)return p(y(">"),B(q,">"),b,X)}function Z(){return f(Q,U,et,nt)}function Q(t,e){return"modifier"==t?p(Q):"variable"==t?(g(e),p()):"spread"==t?p(Q):"["==t?j(Q,"]"):"{"==t?j(tt,"}"):void 0}function tt(t,e){return"variable"!=t||Rt.stream.match(/^\s*:/,!1)?("variable"==t&&(Rt.marked="property"),"spread"==t?p(Q):"}"==t?f():p(x(":"),Q,et)):(g(e),p(et))}function et(t,e){if("="==e)return p(k)}function nt(t){if(","==t)return p(Z)}function it(t,e){if("keyword b"==t&&"else"==e)return p(y("form","else"),w,b)}function rt(t){if("("==t)return p(y(")"),ot,x(")"),b)}function ot(t){return"var"==t?p(Z,x(";"),at):";"==t?p(at):"variable"==t?p(st):f(C,x(";"),at)}function st(t,e){return"in"==e||"of"==e?(Rt.marked="keyword",p(C)):p(P,at)}function at(t,e){return";"==t?p(lt):"in"==e||"of"==e?(Rt.marked="keyword",p(C)):f(C,x(";"),lt)}function lt(t){")"!=t&&p(C)}function ct(t,e){return"*"==e?(Rt.marked="keyword",p(ct)):"variable"==t?(g(e),p(ct)):"("==t?p(m,y(")"),B(ut,")"),b,U,w,v):Ot&&"<"==e?p(y(">"),B(q,">"),b,ct):void 0}function ut(t){return"spread"==t||"modifier"==t?p(ut):f(Q,U,et)}function ht(t,e){return"variable"==t?dt(t,e):ft(t,e)}function dt(t,e){if("variable"==t)return g(e),p(ft)}function ft(t,e){return"<"==e?p(y(">"),B(q,">"),b,ft):"extends"==e||"implements"==e||Ot&&","==t?p(Ot?q:C,ft):"{"==t?p(y("}"),pt,b):void 0}function pt(t,e){return"modifier"==t||"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e)&&Rt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Rt.marked="keyword",p(pt)):"variable"==t?(Rt.marked="property",p(Ot?gt:ct,pt)):"["==t?p(C,x("]"),Ot?gt:ct,pt):"*"==e?(Rt.marked="keyword",p(pt)):";"==t?p(pt):"}"==t?p():"@"==e?p(C,pt):void 0}function gt(t,e){return"?"==e?p(gt):":"==t?p(q,et):"="==e?p(k):f(ct)}function mt(t,e){return"*"==e?(Rt.marked="keyword",p(Ct,x(";"))):"default"==e?(Rt.marked="keyword",p(C,x(";"))):"{"==t?p(B(vt,"}"),Ct,x(";")):f(w)}function vt(t,e){return"as"==e?(Rt.marked="keyword",p(x("variable"))):"variable"==t?f(k,vt):void 0}function yt(t){return"string"==t?p():f(bt,xt,Ct)}function bt(t,e){return"{"==t?j(bt,"}"):("variable"==t&&g(e),"*"==e&&(Rt.marked="keyword"),p(wt))}function xt(t){if(","==t)return p(bt,xt)}function wt(t,e){if("as"==e)return Rt.marked="keyword",p(bt)}function Ct(t,e){if("from"==e)return Rt.marked="keyword",p(C)}function kt(t){return"]"==t?p():f(B(k,"]"))}function St(t,e){return"operator"==t.lastType||","==t.lastType||_t.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function Tt(t,e,n){return e.tokenize==o&&/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}var Mt,Et,Pt=e.indentUnit,At=n.statementIndent,Lt=n.jsonld,Nt=n.json||Lt,Ot=n.typescript,It=n.wordCharacters||/[\w$\xa1-\uffff]/,Dt=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i};if(Ot){var a={type:"variable",style:"type"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),readonly:t("modifier"),string:a,number:a,boolean:a,any:a};for(var c in l)s[c]=l[c]}return s}(),_t=/[+\-*&%=<>!?|~^@]/,$t=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ft="([{}])",zt={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Rt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(t){var e={tokenize:o,lastType:"sof",cc:[],lexical:new u((t||0)-Pt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},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(),c(t,e)),e.tokenize!=a&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==Mt?n:(e.lastType="operator"!=Mt||"++"!=Et&&"--"!=Et?Mt:"incdec",d(e,n,Mt,Et,t))},indent:function(e,i){if(e.tokenize==a)return t.Pass;if(e.tokenize!=o)return 0;var r,s=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==b)l=l.prev;else if(u!=it)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==P||r==A)&&!/^[,\.=+\-*:?[\(]/.test(i));)l=l.prev;At&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var h=l.type,d=s==h;return"vardef"==h?l.indented+("operator"==e.lastType||","==e.lastType?l.info+1:0):"form"==h&&"{"==s?l.indented:"form"==h?l.indented+Pt:"stat"==h?l.indented+(St(e,i)?At||Pt:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:Pt):l.indented+(/^(?:case|default)\b/.test(i)?Pt:2*Pt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Nt?null:"/*",blockCommentEnd:Nt?null:"*/",lineComment:Nt?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Nt?"json":"javascript",jsonldMode:Lt,jsonMode:Nt,expressionAllowed:Tt,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=C&&e!=k||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})})},function(t,e,n){!function(t){t(n(6))}(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){function i(){c+="\n",h=!0,++u}for(var r=this,o=r.getMode(),s=r.getRange(e,n).split("\n"),a=t.copyState(o,r.getTokenAt(e).state),l=r.getOption("tabSize"),c="",u=0,h=0===e.ch,d=0;d\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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(103),o=n(24),s=n(105),a=(n(26),n(107));return{name:"Panels",init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var l=i.pStylePrefix;return l&&(i.stylePrefix=l+i.stylePrefix),t=new s(i.defaults),e=new a({collection:t,config:i}),this},getPanels:function(){return t},getPanelsEl:function(){return e.el},addPanel:function(e){return t.add(e)},getPanel:function(e){var n=t.where({id:e});return n.length?n[0]:null},addButton:function(t,e){var n=this.getPanel(t);return n?n.get("buttons").add(e):null},getButton:function(t,e){var n=this.getPanel(t);if(n){var i=n.get("buttons").where({id:e});return i.length?i[0]:null}return null},render:function(){return e.render().el},active:function(){this.getPanels().each(function(t){t.get("buttons").each(function(t){t.get("active")&&t.trigger("updateActive")})})},Panel:o}}},function(t,e,n){"use strict";var i="sw-visibility",r="export-template",o="open-layers",s="open-blocks",a="fullscreen",l="preview";t.exports={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:i,className:"fa fa-square-o",command:i,context:i,attributes:{title:"View components"}},{id:l,className:"fa fa-eye",command:l,context:l,attributes:{title:"Preview"}},{id:a,className:"fa fa-arrows-alt",command:a,context:a,attributes:{title:"Fullscreen"}},{id:r,className:"fa fa-code",command:r,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:"open-sm",className:"fa fa-paint-brush",command:"open-sm",active:!0,attributes:{title:"Open Style Manager"}},{id:"open-tm",className:"fa fa-cog",command:"open-tm",attributes:{title:"Settings"}},{id:o,className:"fa fa-bars",command:o,attributes:{title:"Open Layer Manager"}},{id:s,className:"fa fa-th-large",command:s,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(t){if(this.get("buttons").length){var e=n(25);this.set("buttons",new e(this.get("buttons")))}}})},function(t,e,n){"use strict";var i=n(0),r=n(24);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";(function(e,i){var r="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},o=e.$;t.exports=e.View.extend({tagName:"span",initialize:function(t){i.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var e=this.model.get("className");this.config=t.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.id=this.pfx+this.model.get("id"),this.activeCls=this.pfx+"active",this.btnsVisCls=this.pfx+"visible",this.parentM=t.parentM||null,this.className=this.pfx+"btn"+(e?" "+e:""),this.listenTo(this.model,"change:active updateActive",this.updateActive),this.listenTo(this.model,"checkActive",this.checkActive),this.listenTo(this.model,"change:bntsVis",this.updateBtnsVis),this.listenTo(this.model,"change:attributes",this.updateAttributes),this.listenTo(this.model,"change:className",this.updateClassName),this.model.get("buttons").length&&(this.$el.on("mousedown",this.startTimer),this.$el.append(o("
",{class:this.pfx+"arrow-rd"}))),this.em&&this.em.get&&(this.commands=this.em.get("Commands")),this.events={},this.model.get("dragDrop")?(this.events.mousedown="initDrag",this.em.on("loaded",this.initSorter)):this.events.click="clicked",this.delegateEvents()},initSorter:function(){if(this.em.Canvas){var t=this.em.Canvas;this.canvasEl=t.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:t.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:t.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var e=t.getOffset();this.sorter.offTop=e.top,this.sorter.offLeft=e.left}},initDrag:function(){this.model.collection.deactivateAll(this.model.get("context")),this.sorter.startSort(this.el),this.sorter.setDropContent(this.model.get("options").content),this.canvasEl.style.cursor="grabbing",o(document).on("mouseup",this.stopDrag)},stopDrag:function(){o(document).off("mouseup",this.stopDrag),this.sorter.endMove()},onDrag:function(t){},onDrop:function(t){this.canvasEl.style.cursor="default"},updateClassName:function(){var t=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(t?" "+t:""))},updateAttributes:function(){this.$el.attr(this.model.get("attributes"))},updateBtnsVis:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},startTimer:function(){this.timeout=setTimeout(this.showButtons,this.config.delayBtnsShow),o(document).on("mouseup",this.stopTimer)},stopTimer:function(){o(document).off("mouseup",this.stopTimer),this.timeout&&clearTimeout(this.timeout)},showButtons:function(){clearTimeout(this.timeout),this.model.set("bntsVis",!0),o(document).on("mousedown",this.hideButtons),o(document).on("keypress",this.closeOnKeyPress)},hideButtons:function(t){t&&o(t.target).trigger("click"),this.model.set("bntsVis",!1),o(document).off("mousedown",this.hideButtons),o(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(t){27==(t.which||t.keyCode)&&this.hideButtons()},updateActive:function(){var t=null,e=this.em&&this.em.get?this.em.get("Editor"):null,n=this.model.get("command");this.commands&&"string"==typeof n?t=this.commands.get(n):null!==n&&"object"===(void 0===n?"undefined":r(n))?t=n:"function"==typeof n&&(t={run:n}),this.model.get("active")?(this.model.collection.deactivateAll(this.model.get("context")),this.model.set("active",!0,{silent:!0}).trigger("checkActive"),this.parentM&&this.parentM.set("active",!0,{silent:!0}).trigger("checkActive"),t&&t.run&&(t.run(e,this.model,this.model.get("options")),e.trigger("run:"+n))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),t&&t.stop&&(t.stop(e,this.model,this.model.get("options")),e.trigger("stop:"+n)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(t){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var e=this.model.get("active");this.model.set("active",!e);this.em.get("Commands").get("select-comp");e?this.model.get("runDefaultCommand")&&this.em.runDefault():this.model.get("stopDefaultCommand")&&this.em.stopDefault()}},swapParent:function(){this.parentM.collection.deactivateAll(this.model.get("context")),this.parentM.set("attributes",this.model.get("attributes")),this.parentM.set("options",this.model.get("options")),this.parentM.set("command",this.model.get("command")),this.parentM.set("className",this.model.get("className")),this.parentM.set("active",!0,{silent:!0}).trigger("checkActive")},render:function(){if(this.updateAttributes(),this.$el.attr("class",this.className),this.model.get("buttons").length){var t=n(27),e=new t({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=e.render().$el,this.$buttons.append(o("
",{class:this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(0),r=n(26);t.exports=i.View.extend({initialize:function(t){this.opt=t||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.className=this.pfx+"panels"},addTo:function(t){this.addToCollection(t)},addToCollection:function(t,e){var n=e||null,i=new r({model:t,config:this.config}),o=i.render().el,s=t.get("appendTo");if(s){document.querySelector(s).appendChild(o)}else n?n.appendChild(o):this.$el.append(o);return i.initResize(),o},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}})},function(t,e,n){"use strict";var i=n(109),r=function(t){return t&&t.__esModule?t:{default:t}}(i),o=n(4);t.exports=function(){var t={},e=n(110),i=void 0,s=void 0,a=void 0,l=void 0;return{customRte:null,name:"RichTextEditor",init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=n;for(var r in e)r in t||(t[r]=e[r]);var a=t.pStylePrefix;return a&&(t.stylePrefix=a+t.stylePrefix),this.pfx=t.stylePrefix,s=t.actions||[],i=document.createElement("div"),i.className=a+"rte-toolbar",l=this.initRte(document.createElement("div")),(0,o.on)(i,"mousedown",function(t){return t.stopPropagation()}),this},postRender:function(t){var e=t.model.get("Canvas");i.style.pointerEvents="all",e.getToolsEl().appendChild(i)},initRte:function(e){var n=this.pfx,o=i,s=this.actionbar,a=this.actions||t.actions,c={actionbar:n+"actionbar",button:n+"action",active:n+"active"},u=new r.default({el:e,classes:c,actions:a,actionbar:s,actionbarContainer:o});return l&&l.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,l.addAction(e,{sync:1})},get:function(t){var e=void 0;return l.getActions().forEach(function(n){n.name==t&&(e=n)}),e},getAll:function(){return l.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 i},udpatePosition:function(){var e=t.em.get("Canvas"),n=e.getTargetToElementDim(i,a,{event:"rteToolbarPosUpdate"});t.adjustToolbar&&n.top<=n.canvasTop&&(n.top=n.elementTop+n.elementHeight);var r=i.style;r.top=n.top+"px",r.left=n.left+"px"},enable:function(e,n){a=e.el;var r=t.em,o=e.getChildrenContainer(),s=this.customRte;if(i.style.display="",n=s?s.enable(o,n):this.initRte(o).enable(),r){setTimeout(this.udpatePosition.bind(this),0);var l="change:canvasOffset canvasScroll";r.off(l,this.udpatePosition,this),r.on(l,this.udpatePosition,this),r.trigger("rte:enable",e,n)}return n},disable:function(e,n){var r=t.em,o=this.customRte,s=i.style,a=e.getChildrenContainer();o?o.disable(a,n):n.disable(),s.display="none",s.top=0,s.left=0,r&&r.trigger("rte:disable",e,n)}}}},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=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()+"")}}},c=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var o=n.el;if(o[a])return o[a];o[a]=this,this.setEl(o),this.updateActiveActions=this.updateActiveActions.bind(this);var s=n.actions||[];s.forEach(function(t,e){"string"==typeof t?t=l[t]:l[t.name]&&(t=r({},l[t.name],t)),s[e]=t});var c=s.length?s:Object.keys(l).map(function(t){return l[t]});n.classes=r({actionbar:"actionbar",button:"action",active:"active"},n.classes);var u=n.classes,h=n.actionbar;if(this.actionbar=h,this.settings=n,this.classes=u,this.actions=c,!h){var d=n.actionbarContainer;h=document.createElement("div"),h.className=u.actionbar,d.appendChild(h),this.actionbar=h,c.forEach(function(t){return e.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this.syncActions(),this}return o(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.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,s.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,s.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]:{},n=e.sync,i=document.createElement("span"),r=t.icon,o=t.attributes||{};i.className=this.classes.button,t.btn=i;for(var s in o)i.setAttribute(s,o[s]);"string"==typeof r?i.innerHTML=r:i.appendChild(r),this.actionbarEl().appendChild(i),n&&(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=void 0,n=this.doc,i=n.getSelection();if(i&&i.rangeCount){var r=n.createElement("div"),o=i.getRangeAt(0);o.deleteContents(),r.innerHTML=t,Array.prototype.slice.call(r.childNodes).forEach(function(t){o.insertNode(t),e=t}),i.removeAllRanges(),i.addRange(o),this.el.focus()}}}]),t}();e.default=c},function(t,e,n){"use strict";t.exports={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link"]}},function(t,e,n){"use strict";t.exports={stylePrefix:"sm-",sectors:[],textNoElement:"Select an element before using Style Manager",hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!1,validComputed:["border-collapse","border-spacing","caption-side","color","cursor","direction","empty-cells","font-family","font-size","font-style","font-variant","font-weight","font-size-adjust","font-stretch","font","letter-spacing","line-height","list-style-image","list-style-position","list-style-type","list-style","orphans","quotes","tab-size","text-align","text-align-last","text-decoration-color","text-indent","text-justify","text-shadow","text-transform","visibility","white-space","widows","word-break","word-spacing","word-wrap"]}},function(t,e,n){"use strict";var i=n(113);t.exports=n(0).Collection.extend({model:i})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(9),o=n(123);t.exports=i.Model.extend({defaults:{id:"",name:"",open:!0,buildProps:"",extendBuilded:1,properties:[]},initialize:function(t){var e=t||{},n=[],i=this.buildProperties(e.buildProps);n=i?this.extendProperties(i):this.get("properties");var o=new r(n);o.sector=this,this.set("properties",o)},extendProperties:function(t,n,i){for(var r=t.length,o=n||this.get("properties"),s=this.get("extendBuilded"),a=[],l=0,c=o.length;l'},initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ppfx||"";this.target=t.target||{},this.inputClass=e+"field",this.inputHolderClass=e+"input-holder",this.holderClass=e+"input-holder",this.ppfx=e,this.listenTo(this.model,"change:value",this.handleModelChange)},elementUpdated:function(){this.model.trigger("el:change")},handleChange:function(t){t.stopPropagation(),this.model.set("value",this.getInputEl().value),this.elementUpdated()},setValue:function(t){var e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.model),n=t||e.get("defaults"),i=this.getInputEl();i&&(i.value=n)},handleModelChange:function(t,e,n){this.setValue(e,n)},getInputEl:function(){if(!this.inputEl){var t=this.model.get("defaults"),e=this.inputCls;this.inputEl=n('')}return this.inputEl.get(0)},render:function(){var t=this.$el,e=(this.ppfx,this.holderClass);return t.addClass(this.inputClass),t.html(this.template()),t.find("."+e).append(this.getInputEl()),this}})}).call(e,n(0))},function(t,e,n){"use strict";(function(t){var e="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};!function(n){!function(t,n){function i(e,n,i,r){for(var o=[],s=0;s')}else{o.push(t("
").append(t('').attr("title",r.noColorSelectedText)).html())}}return"
"+o.join("")+"
"}function r(){for(var t=0;t1&&(delete window.localStorage[j],t.each(e,function(t,e){p(e)}))}catch(t){}try{mt=window.localStorage[j].split(";")}catch(t){}}}function p(e){if(B){var n=st(e).toRgbString();if(!gt[n]&&-1===t.inArray(n,mt))for(mt.push(n);mt.length>vt;)mt.shift();if(j&&window.localStorage)try{window.localStorage[j]=mt.join(";")}catch(t){}}}function g(){var t=[];if(H.showPalette)for(var e=0;eMath.abs(e-r);bt=o?"x":"y"}}else bt=null;var s=!bt||"x"===bt,a=!bt||"y"===bt;s&&(ut=parseFloat(t/tt)),a&&(ht=parseFloat((et-e)/et)),Yt=!1,H.showAlpha||(dt=1),L()},y,b),Ut?(E(Ut),N(),Kt=H.preferredFormat||st(Ut).format,p(Ut)):N(),V&&C();var i=G?"mousedown.spectrum":"click.spectrum touchstart.spectrum";It.delegate(".sp-thumb-el",i,e),Dt.delegate(".sp-thumb-el:nth-child(1)",i,{ignore:!0},e)}();var Jt={show:C,hide:T,toggle:w,reflow:D,option:$,enable:F,disable:z,offset:R,set:function(t){E(t),I()},get:P,destroy:_,container:kt};return Jt.id=K.push(Jt)-1,Jt}function a(e,n){var i=e.outerWidth(),r=e.outerHeight(),o=n.outerHeight(),s=e[0].ownerDocument,a=s.documentElement,l=a.clientWidth,c=a.clientHeight,u=t(s).scrollLeft(),h=t(s).scrollTop(),d=l+u,f=c+h,p=n.offset();return p.top+=o,p.left-=Math.min(p.left,p.left+i>d&&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}function l(){}function c(t){t.stopPropagation()}function u(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function h(e,n,i,r){function o(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function s(t){if(u){if(G&&c.documentMode<9&&!t.button)return l();var i=t.originalEvent&&t.originalEvent.touches&&t.originalEvent.touches[0],r=i&&i.pageX||t.pageX,s=i&&i.pageY||t.pageY,a=Math.max(0,Math.min(r-h.left,f)),g=Math.max(0,Math.min(s-h.top,d));p&&o(t),n.apply(e,[a,g,t])}}function a(n){(n.which?3==n.which:2==n.button)||u||!1!==i.apply(e,arguments)&&(u=!0,d=t(e).height(),f=t(e).width(),h=t(e).offset(),t(c).bind(g),t(c.body).addClass("sp-dragging"),s(n),o(n))}function l(){u&&(t(c).unbind(g),t(c.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),u=!1}n=n||function(){},i=i||function(){},r=r||function(){};var c=document,u=!1,h={},d=0,f=0,p="ontouchstart"in window,g={};g.selectstart=o,g.dragstart=o,g["touchmove mousemove"]=s,g["touchend mouseup"]=l,t(e).bind("touchstart mousedown",a)}function d(t,e,n){var i;return function(){var r=this,o=arguments,s=function(){i=null,t.apply(r,o)};n&&clearTimeout(i),!n&&i||(i=setTimeout(s,e))}}function f(){return t.fn.spectrum.inputTypeColorSupport()}function p(t){var n={r:0,g:0,b:0},i=1,r=!1,o=!1;return"string"==typeof t&&(t=U(t)),"object"==(void 0===t?"undefined":e(t))&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(n=g(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=B(t.s),t.v=B(t.v),n=b(t.h,t.s,t.v),r=!0,o="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=B(t.s),t.l=B(t.l),n=v(t.h,t.s,t.l),r=!0,o="hsl"),t.hasOwnProperty("a")&&(i=t.a)),i=_(i),{ok:r,format:t.format||o,r:it(255,rt(n.r,0)),g:it(255,rt(n.g,0)),b:it(255,rt(n.b,0)),a:i}}function g(t,e,n){return{r:255*$(t,255),g:255*$(e,255),b:255*$(n,255)}}function m(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(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+(e1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var r,o,s;if(t=$(t,360),e=$(e,100),n=$(n,100),0===e)r=o=s=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=i(l,a,t+1/3),o=i(l,a,t),s=i(l,a,t-1/3)}return{r:255*r,g:255*o,b:255*s}}function y(t,e,n){t=$(t,255),e=$(e,255),n=$(n,255);var i,r,o=rt(t,e,n),s=it(t,e,n),a=o,l=o-s;if(r=0===o?0:l/o,o==s)i=0;else{switch(o){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(st(i));return o}function D(t,e){e=e||6;for(var n=st(t).toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(st({h:i,s:r,v:o})),o=(o+a)%1;return s}function _(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){R(t)&&(t="100%");var n=H(t);return t=it(e,rt(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),et.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function F(t){return it(1,rt(0,t))}function z(t){return parseInt(t,16)}function R(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)}function H(t){return"string"==typeof t&&-1!=t.indexOf("%")}function V(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function j(t){return Math.round(255*parseFloat(t)).toString(16)}function W(t){return z(t)/255}function U(t){t=t.replace(Z,"").replace(Q,"").toLowerCase();var e=!1;if(at[t])t=at[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=ct.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=ct.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ct.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=ct.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ct.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=ct.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ct.hex8.exec(t))?{a:W(n[1]),r:z(n[2]),g:z(n[3]),b:z(n[4]),format:e?"name":"hex8"}:(n=ct.hex6.exec(t))?{r:z(n[1]),g:z(n[2]),b:z(n[3]),format:e?"name":"hex"}:!!(n=ct.hex3.exec(t))&&{r:z(n[1]+""+n[1]),g:z(n[2]+""+n[2]),b:z(n[3]+""+n[3]),format:e?"name":"hex"}}var q={beforeShow:l,move:l,change:l,show:l,hide:l,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},K=[],G=!!/msie/i.exec(window.navigator.userAgent),Y=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),X=["
","
","
","
"].join(""),J=function(){var t="";if(G)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",t,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();t.fn.spectrum=function(e,n){if("string"==typeof e){var i=this,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=K[t(this).data("spectrum.id")];if(n){var o=n[e];if(!o)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,r):"destroy"==e?(n.destroy(),t(this).removeData("spectrum.id")):o.apply(n,r)}}),i}return this.spectrum("destroy").each(function(){var n=t.extend({},e,t(this).data()),i=s(this,n);t(this).data("spectrum.id",i.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=h,t.fn.spectrum.defaults=q,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&&!f()&&e.spectrum({preferredFormat:"hex6"})};var Z=/^[\s,#]+/,Q=/\s+$/,tt=0,et=Math,nt=et.round,it=et.min,rt=et.max,ot=et.random,st=function t(e,n){if(e=e||"",n=n||{},e instanceof t)return e;if(!(this instanceof t))return new t(e,n);var i=p(e);this._originalInput=e,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=nt(100*this._a)/100,this._format=n.format||i.format,this._gradientType=n.gradientType,this._r<1&&(this._r=nt(this._r)),this._g<1&&(this._g=nt(this._g)),this._b<1&&(this._b=nt(this._b)),this._ok=i.ok,this._tc_id=tt++};st.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=_(t),this._roundA=nt(100*this._a)/100,this},toHsv:function(){var t=y(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=y(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=m(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=m(this._r,this._g,this._b),e=nt(360*t.h),n=nt(100*t.s),i=nt(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return x(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return w(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:nt(this._r),g:nt(this._g),b:nt(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+")":"rgba("+nt(this._r)+", "+nt(this._g)+", "+nt(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:nt(100*$(this._r,255))+"%",g:nt(100*$(this._g,255))+"%",b:nt(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%)":"rgba("+nt(100*$(this._r,255))+"%, "+nt(100*$(this._g,255))+"%, "+nt(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(lt[x(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+w(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){n=st(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(T,arguments)},brighten:function(){return this._applyModification(M,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(C,arguments)},saturate:function(){return this._applyModification(k,arguments)},greyscale:function(){return this._applyModification(S,arguments)},spin:function(){return this._applyModification(P,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(N,arguments)}},st.fromRatio=function(t,n){if("object"==(void 0===t?"undefined":e(t))){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]="a"===r?t[r]:B(t[r]));t=i}return st(t,n)},st.equals=function(t,e){return!(!t||!e)&&st(t).toRgbString()==st(e).toRgbString()},st.random=function(){return st.fromRatio({r:ot(),g:ot(),b:ot()})},st.mix=function(t,e,n){n=0===n?0:n||50;var i,r=st(t).toRgb(),o=st(e).toRgb(),s=n/100,a=2*s-1,l=o.a-r.a;i=a*l==-1?a:(a+l)/(1+a*l),i=(i+1)/2;var c=1-i,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 st(u)},st.readability=function(t,e){var n=st(t),i=st(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}},st.isReadable=function(t,e){var n=st.readability(t,e);return n.brightness>125&&n.color>500},st.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=st(e[o]))}return n};var at=st.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"},lt=st.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(at),ct=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=st,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}(t.$)}()}).call(e,n(0))},function(t,e,n){"use strict";var i=n(0),r=n(120);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}),u=c.render().el;if(i)i.appendChild(u);else if(void 0!==n){var h="before";this.$el.children().length==n&&(n--,h="after"),n<0?this.$el.append(u):this.$el.children().eq(n)[h](u)}else this.$el.append(u);return u},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";(function(e){t.exports=e.View.extend({events:{click:"active","click [data-close-layer]":"remove","mousedown [data-move-layer]":"initSorter"},template:function(t){var e=this.pfx;return'\n
\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 n=this.model,i=n.collection,r=this.stackModel;e.View.prototype.remove.apply(this,arguments),i.contains(n)&&i.remove(n),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,"");o=isNaN(o)?0:o,o=o>3?3:o,o=o<-3?-3:o,r=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(11),e=this.propsConfig,i=this.pfx+"layer",r=this.model,o=this.el,s=new t({collection:r.get("properties"),config:this.config,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}})}).call(e,n(0))},function(t,e,n){"use strict";var i=n(38);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{showInput:1})})},function(t,e,n){"use strict";var i=(n(17),n(12));t.exports=i.extend({events:{change:"inputValueChanged",input:"inputValueChangedSoft"},templateInput:function(t){var e=this.ppfx;return'\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(){i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}})},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 <%= 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)},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 r({collection:t,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(e.render().el)}}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e=n(127),i=n(128),r=n(131),o=n(41),s=void 0,a=void 0,l=void 0;return{name:"AssetManager",storageKey:"assets",getConfig:function(){return t},init:function(n){var c=this;t=n||{};for(var u in e)u in t||(t[u]=e[u]);var h=t.pStylePrefix,d=t.em;h&&(t.stylePrefix=h+t.stylePrefix),s=new i([]);var f={collection:new i([]),globalCollection:s,config:t};return l=new o(f),f.fu=l,a=new r(f),s.listenTo(s,"add",function(t){c.getAllVisible().add(t),d&&d.trigger("asset:add",t)}),s.listenTo(s,"remove",function(t){c.getAllVisible().remove(t),d&&d.trigger("asset:remove",t)}),this},add:function(t){var e=arguments.length>1&&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";t.exports={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},autoAdd:1,uploadText:"Drop files here or click to upload",addBtnText:"Add image",uploadFile:"",handleAdd:"",dropzone:1,openAssetsOnDrop:1,dropzoneContent:"",modalTitle:"Select Image"}},function(t,e,n){"use strict";var i=n(29),r=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=n(0).Collection.extend(r.default).extend({types:[{id:"image",model:n(129),view:n(39),isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}]})},function(t,e,n){"use strict";var i=n(130);t.exports=i.extend({defaults:Object.assign({},i.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})},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";(function(e){n(40),n(39),n(41);t.exports=e.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
\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(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=e,i=this.collection,r=this.config,o=new t.typeView({model:t,collection:i,config:r}).render().el;if(n)n.appendChild(o);else{var s=this.getAssetsEl();s&&s.insertBefore(o,s.firstChild)}return o},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}})}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t,e,i={},r=n(133),o=n(42),s=n(134),a=n(44),l=n(135);return{Selectors:a,name:"CssComposer",storageKey:function(){var t=[],e=i.stm&&i.stm.getConfig()||{};return e.storeCss&&t.push("css"),e.storeStyles&&t.push("styles"),t},init:function(n){i=n||{};for(var o in r)o in i||(i[o]=r[o]);var a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix);var c=i.em&&i.em.config.style||"";return i.rules=c||i.rules,i.sm=i.em,t=new s([],i),e=new l({collection:t,config:i}),this},onLoad:function(){t.add(i.rules)},postLoad:function(t){t.listenRules(this.getAll())},load:function(e){var n=e||"";!n&&i.stm&&(n=i.em.getCacheLoad());var r=n.styles||"";if(n.styles)try{r=JSON.parse(n.styles)}catch(t){}else n.css&&(r=i.em.get("Parser").parseCss(n.css));return r&&t.reset(r),r},store:function(e){if(i.stm){var n={},r=this.storageKey();return r.indexOf("css")>=0&&(n.css=i.em.getCss()),r.indexOf("styles")>=0&&(n.styles=JSON.stringify(t)),e||i.stm.store(n),n}},add:function(e,n,i,r){var s=n||"",a=i||"",l=r||{},c=this.get(e,s,a,l);return c||(l.state=s,l.mediaText=a,l.selectors="",c=new o(l),c.get("selectors").add(e),t.add(c),c)},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},addCollection:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=t instanceof Array?t:[t],o=0,s=r.length;o0&&void 0!==arguments[0]?arguments[0]:"",e="";if(!t&&i.stm&&(t=i.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(i.stm){var e={},n=this.storageKey();if(n.indexOf("html")>=0&&(e.html=i.em.getHtml()),n.indexOf("components")>=0){var r=i.storeWrapper?this.getWrapper():this.getComponents();e.components=JSON.stringify(r)}return t||i.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(){for(var t=this.getComponents(),e=0,n=t.length;e1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t){var n=this.editor.get("Parser").parseHtml(t);t=n.html;var r=this.editor.get("CssComposer");if(n.css&&r){var o=e.avoidUpdateStyle;r.addCollection(n.css,{extend:1,avoidUpdateStyle:o})}}return i.Collection.prototype.add.apply(this,[t,e])},onAdd:function(t,n,i){var r=t.get("style"),o=this.editor;if(!e.isEmpty(r)&&o&&o.get("Config").forceClass){var s=this.editor.get("CssComposer"),a=this.editor.get("SelectorManager").add(t.cid);t.set({style:{}}),t.get("classes").add(a);s.add(a).set("style",r)}}})}).call(e,n(1))},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{type:"text",label:"",name:"",min:"",max:"",value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]},initialize:function(){this.get("target")&&(this.target=this.get("target"),this.unset("target"))},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";n(0);t.exports=function(){return{build:function(t){var e=[];"string"==typeof t&&(t=[t]);for(var n=0;ns.top+s.height?s.top+s.height:g;var m={top:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:o.top,canvasLeft:o.left};return h&&r.em&&r.em.trigger(h,m),m},getMouseRelativePos:function(t,e){var n=e||{},i=0,r=0,o=n.subWinOffset,s=t.target.ownerDocument,a=s.defaultView||s.parentWindow,l=a.frameElement,c=o?a.pageYOffset:0,u=o?a.pageXOffset:0;if(l){var h=l.getBoundingClientRect();i=h.top||0,r=h.left||0}return{y:t.clientY+i-c,x:t.clientX+r-u}},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}},isInputFocused:function(){return"BODY"!==this.getFrameEl().contentDocument.activeElement.tagName},startAutoscroll:function(){this.dragging=1;var t=this.getScrollListeners();e=a.getFrameOffset(1),(0,i.on)(t,"mousemove",this.autoscroll),(0,i.on)(t,"mouseup",this.stopAutoscroll)},autoscroll:function(t){if(t.preventDefault(),this.dragging){var n=this.getFrameEl().contentWindow,i=n.document.body.scrollTop,r=i,o=t.clientY,s=e.height-50;o<50&&(r-=50-o),o>s&&(r+=o-s),n.scrollTo(0,r)}},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()]},getFrameWrapperEl:function(){return a.frame.getWrapper()}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"cv-",rulers:!1,scripts:[],styles:[],customBadgeLabel:""}},function(t,e,n){"use strict";var i=n(0),r=n(164);t.exports=i.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";var i=n(0);t.exports=i.Model.extend({defaults:{wrapper:"",width:"",height:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(166),o=e.$;t.exports=e.View.extend({initialize:function(t){i.bindAll(this,"renderBody","onFrameScroll","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 r({model:this.model.get("frame"),config:this.config})},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()}var i=e.config.scripts.slice(0);n(i)}},renderBody:function(){var t=this.model.get("frame").get("wrapper"),e=this.config.em;if(t){var n=this.ppfx,i=o(this.frame.el.contentWindow.document.body),r=e.get("CssComposer"),s=e.get("Config"),a=this.config,l=s.protectedCss,c="";a.styles.forEach(function(t){c+=''});var u="\n \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 }\n \n\n ."+n+"dashed :not([contenteditable]) > *[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 }\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 * ::-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 "+(s.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,f=function(t){var e=new KeyboardEvent(t.type,t);return e.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.keyCodeVal}})}),e};d.addEventListener("keydown",function(t){h.dispatchEvent(f(t))}),d.addEventListener("keyup",function(t){h.dispatchEvent(f(t))})}},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,width:t.offsetWidth}},getPosition:function(){var t=this.frame.el.contentDocument.body,e=this.getFrameOffset(),n=this.getCanvasOffset();return{top:e.top+t.scrollTop-n.top,left:e.left+t.scrollLeft-n.left}},updateScript:function(t){t.scriptContainer||(t.scriptContainer=o("
"),this.getJsContainer().append(t.scriptContainer.get(0)));var e=t.model,n=e.getId();t.el.id=n,t.scriptContainer.html("");var i=document.createElement("script");i.innerText="\n setTimeout(function() {\n var item = document.getElementById('"+n+"');\n if (!item) return;\n (function(){"+e.getScriptString()+"}.bind(item))()\n }, 1);",t.scriptContainer.get(0).appendChild(i)},getJsContainer:function(){return this.jsContainer||(this.jsContainer=o('
').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(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({tagName:"iframe",attributes:{src:"about:blank",allowfullscreen:"allowfullscreen"},initialize:function(t){e.bindAll(this,"udpateOffset"),this.config=t.config||{},this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em,this.motionsEv="transitionend oTransitionEnd transitionend webkitTransitionEnd",this.listenTo(this.em,"change:device",this.updateWidth)},updateWidth:function(t){var e=this.em.getDeviceModel();this.el.style.width=e?e.get("width"):"",this.udpateOffset(),this.$el.on(this.motionsEv,this.udpateOffset)},udpateOffset:function(){var t=this.em.get("Canvas").getOffset();this.em.set("canvasOffset",t),this.$el.off(this.motionsEv,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}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t={},e={},i={},r=n(168),o=n(169),s=function(t,n){return delete n.initialize,e[t]=o.extend(n),this};return{name:"Commands",init:function(e){t=e||{};for(var o in r)o in t||(t[o]=r[o]);var s=t.pStylePrefix;s&&(t.stylePrefix=s+t.stylePrefix);for(var a in t.defaults){var l=t.defaults[a];l.id&&this.add(l.id,l)}return i["select-comp"]=n(19),i["create-comp"]=n(20),i["delete-comp"]=n(174),i["image-comp"]=n(175),i["move-comp"]=n(176),i["text-comp"]=n(177),i["insert-custom"]=n(51),i["export-template"]=n(178),i["sw-visibility"]=n(179),i["open-layers"]=n(180),i["open-sm"]=n(183),i["open-tm"]=n(184),i["open-blocks"]=n(185),i["open-assets"]=n(186),i["show-offset"]=n(187),i["select-parent"]=n(188),i.fullscreen=n(189),i.preview=n(190),i.resize=n(191),i.drag=n(192),i["tlb-delete"]={run:function(t){var e=t.getSelected();if(!e||!e.get("removable"))return void console.warn("The element is not removable");t.select(null),e.destroy()}},i["tlb-clone"]={run:function(t){var e=t.getSelected();if(!e||!e.get("copyable"))return void console.warn("The element is not clonable");var n=e.collection,i=n.indexOf(e);n.add(e.clone(),{at:i+1}),t.trigger("component:update",e)}},i["tlb-move"]={run:function(t,e,n){var i,r=t.getSelected();if(!r||!r.get("draggable"))return void console.warn("The element is not draggable");var o=function(t,e){console.log("start mouse pos ",e.start),console.log("el rect ",e.elRect);var n=e.el;n.style.position="absolute",n.style.margin=0},s=function(e,n){l.runDefault(),l.set("selectedComponent",r),t.trigger("component:update",r),i&&i.blur()},a=function(t,e){console.log("Delta ",e.delta),console.log("Current ",e.current)};t.Canvas.getToolbarEl().style.display="none";var l=t.getModel();if(l.stopDefault(),l.get("designerMode"))i=editor.runCommand("drag",{el:r.view.el,options:{event:n&&n.event,onStart:o,onDrag:a,onEnd:s}});else{var c=t.Commands.get("move-comp");c.onEndMoveFromModel=s,c.initSorterFromModel(r)}r.set("status","selected")}},t.em&&(t.model=t.em.get("Canvas")),this.loadDefaultCommands(),this},add:s,get:function(n){var i=e[n];return"function"==typeof i&&(i=new i(t),e[n]=i),i},has:function(t){return!!e[t]},loadDefaultCommands:function(){for(var t in i)this.add(t,i[t]);return this}}}},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";(function(e){var n=e.$;t.exports=e.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=n(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){},run:function(t,e){},stop:function(t,e){}})}).call(e,n(0))},function(t,e,n){"use strict";var i=(n(0),n(48)),r=n(171);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";var i=n(0);t.exports=i.View.extend({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();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";var i=n(0),r=n(173);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Model.extend({defaults:{command:"",attributes:{}}})},function(t,e,n){"use strict";(function(e,i){var r=n(19),o=e.$;t.exports=i.extend({},r,{init:function(t){i.bindAll(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),o(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=o(t.target);e.data("model").get("removable")&&(e.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html("Remove "+t.getName())}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=(n(0),n(51));t.exports=e.extend({},i,{beforeInsert:function(t){t.type="image",t.style={},t.attributes={},t.attributes.onmousedown="return false",this.config.firstCentered&&this.getCanvasWrapper()==this.sorter.target&&(t.style.margin="0 auto")},afterInsert:function(t){t.trigger("dblclick"),this.sender&&this.sender.set("active",!1)}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,i){var r=n(4),o=n(19),s=n(50),a=e.$;t.exports=i.extend({},s,o,{init:function(t){o.init.apply(this,arguments),i.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;n"),o=this.codeMirror.clone().set({label:i,codeName:t,theme:e,input:r[0]}),s=new this.cm.EditorView({model:o,config:this.cm.getConfig()}).render().$el;return o.init(r[0]),{el:o,$el:s}},enable:function(){if(!this.$editors){var t=this.buildEditor("htmlmixed","hopscotch","HTML"),e=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=t.el,this.cssEditor=e.el,this.$editors=n('
'),this.$editors.append(t.$el).append(e.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var i=this.em;this.protCss;this.htmlEditor.setContent(i.getHtml()),this.cssEditor.setContent(i.getCss()),this.sender&&this.sender.set("active",!1)},stop:function(){}}}).call(e,n(0))},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";(function(e){var i=n(181),r=e.$;t.exports={run:function(t,e){if(!this.toAppend){var n=t.DomComponents.getComponent().get("components"),o=t.getConfig(),s=o.stylePrefix,a=t.Panels,l=o.layers.stylePrefix||"nv-";o.layers.stylePrefix=o.stylePrefix+l,o.layers.pStylePrefix=o.stylePrefix,o.layers.em=t.editor,o.layers.opened=t.editor.get("opened"),a.getPanel("views-container")?this.panel=a.getPanel("views-container"):this.panel=a.addPanel({id:"views-container"});var c=r('
');this.panel.set("appendContent",c).trigger("change:appendContent"),o.layers.sortContainer=c.get(0);var u=(new i).init(n,o.layers);this.$layers=u.render(),c.append(this.$layers),this.toAppend=c}this.toAppend.show()},stop:function(){this.toAppend&&this.toAppend.hide()}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports=function(){var t=void 0,e={},i=n(182),r=n(52),o=n(53);return{init:function(n,s){e=s||e;var a=e.em;for(var l in i)l in e||(e[l]=i[l]);var c=o,u=s.opened||{},h={level:0,config:e,opened:u};return e.showWrapper&&n.parent?(c=r,h.model=n.parent):h.collection=n,t=new c(h),a&&a.on("change:selectedComponent",this.componentChanged),this.componentChanged(),this},componentChanged:function(t,n){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fromLayers){var i=e.em,r=i.get("opened"),o=i.get("selectedComponent"),s=o&&o.collection?o.collection.parent:null;for(var a in r)r[a].set("open",0);for(;s;)s.set("open",1),r[s.cid]=s,s=s.collection?s.collection.parent:null}},render:function(){return t.render().$el}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,showWrapper:1}},function(t,e,n){"use strict";var i=(n(28),n(0)),r=i.$;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,"change:selectedComponent",this.toggleSm)}this.toggleSm()},toggleSm:function(){this.sender.get("active")&&(this.target.get("selectedComponent")?(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";(function(e){var n=e.$;t.exports={run:function(t,e){var i,r=t.Config,o=r.stylePrefix,s=t.TraitManager;if(!this.obj){var a=s.getTraitsViewer(),l=s.getConfig();this.obj=n("
").append('
'+l.labelContainer+"
").get(0),this.obj.appendChild(a.render().el);var c=t.Panels;i=c.getPanel("views-container")?c.getPanel("views-container"):c.addPanel({id:"views-container"}),i.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}).call(e,n(0))},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";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=n.modalTitle||o.modalTitle||"";r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),this.rendered||(r.render(r.getAll().filter(function(t){return"image"==t.get("type")})),this.rendered=1),i.setTitle(s),i.setContent(r.getContainer()),i.open()}}},function(t,e,n){"use strict";(function(e){var n=e.$;t.exports={getOffsetMethod:function(t){return"get"+(t||"")+"OffsetViewerEl"},run:function(t,e,i){var r=i||{},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=this.getOffsetMethod(o),p=a[f]();p.style.display="block";var g=this["marginT"+o],m=this["marginB"+o],v=this["marginL"+o],y=this["marginR"+o],b=this["padT"+o],x=this["padB"+o],w=this["padL"+o],C=this["padR"+o];if(!this[d]){var k=o.toLowerCase(),S=k+"margin-v",T=k+"padding-v",M=n('
').get(0),E=n('
').get(0),P=h+S+"-el",A=h+T+"-el",L=P+" "+(h+S),N=A+" "+(h+T);g=n('
').get(0),m=n('
').get(0),v=n('
').get(0),y=n('
').get(0),b=n('
').get(0),x=n('
').get(0),w=n('
').get(0),C=n('
').get(0),this["marginT"+o]=g,this["marginB"+o]=m,this["marginL"+o]=v,this["marginR"+o]=y,this["padT"+o]=b,this["padB"+o]=x,this["padL"+o]=w,this["padR"+o]=C,M.appendChild(g),M.appendChild(m),M.appendChild(v),M.appendChild(y),E.appendChild(b),E.appendChild(x),E.appendChild(w),E.appendChild(C),p.appendChild(M),p.appendChild(E),this[d]="1"}var O=u.marginLeft.replace("px",""),I=parseInt(u.marginTop.replace("px","")),D=parseInt(u.marginBottom.replace("px","")),_=g.style,$=m.style,F=v.style,z=y.style,R=b.style,H=x.style,V=w.style,B=C.style,j=parseInt(c.left);_.height=u.marginTop,_.width=u.width,_.top=c.top-u.marginTop.replace("px","")+"px",_.left=j+"px",$.height=u.marginBottom,$.width=u.width,$.top=c.top+c.height+"px",$.left=j+"px";var W=c.height+I+D+"px",U=c.top-I+"px";F.height=W,F.width=u.marginLeft,F.top=U,F.left=j-O+"px",z.height=W,z.width=u.marginRight,z.top=U,z.left=j+c.width+"px";var q=parseInt(u.paddingTop.replace("px",""));R.height=u.paddingTop,R.width=u.width,R.top=c.top+"px",R.left=j+"px";var K=parseInt(u.paddingBottom.replace("px",""));H.height=u.paddingBottom,H.width=u.width,H.top=c.top+c.height-K+"px",H.left=j+"px";var G=c.height-K-q+"px",Y=c.top+q+"px";V.height=G,V.width=u.paddingLeft,V.top=Y,V.left=c.left+"px";var X=parseInt(u.paddingRight.replace("px",""));B.height=G,B.width=u.paddingRight,B.top=Y,B.left=c.left+c.width-X+"px"}},stop:function(t,e,n){var i=n||{},r=i.state||"",o=this.getOffsetMethod(r);t.Canvas[o]().style.display="none"}}}).call(e,n(0))},function(t,e,n){"use strict";t.exports={run:function(t){var e=t.getSelected(),n=e&&e.collection;n&&n.parent&&t.select(n.parent)}}},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){var n=(document,(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";(function(e){t.exports={getPanels:function(t){return this.panels||(this.panels=t.Panels.getPanelsEl()),this.panels},tglPointers:function(t,n){var i=t.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");e.each(i,function(t){t.style.pointerEvents=n?"":"all"})},run:function(t,e){e&&e.set&&e.set("active",!1),t.stopCommand("sw-visibility"),t.getModel().stopDefault();var n=this,i=this.getPanels(t),r=t.Canvas.getElement(),o=t.getEl(),s=t.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=s+"off-prv fa fa-eye-slash",o.appendChild(this.helper),this.helper.onclick=function(){n.stop(t)}),this.helper.style.display="inline-block",this.tglPointers(t),i.style.display="none";var a=r.style;a.width="100%",a.height="100%",a.top="0",a.left="0",a.padding="0",a.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)}}}).call(e,n(1))},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.focus(r),s},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}},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=function(){var t,e,i,r={},o=n(194),s=n(195),a=n(197),l=n(198),c=[];return{name:"BlockManager",init:function(n){r=n||{};var u=r.em;for(var h in o)h in r||(r[h]=o[h]);return t=new s([]),e=new s([]),c=new a,i=new l({collection:e,categories:c},r),t.listenTo(t,"add",function(t){e.add(t),u&&u.trigger("block:add",t)}),t.listenTo(t,"remove",function(t){e.remove(t),u&&u.trigger("block:remove",t)}),t.listenTo(t,"reset",function(t){e.reset(t.models)}),this},getConfig:function(){return r},onLoad:function(){var t=this.getAll();!t.length&&t.reset(r.blocks)},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 c},getContainer:function(){return i.el},render:function(t){var e=t||this.getAll().models;i.rendered||(i.render(),i.rendered=1),i.collection.reset(e)}}}},function(t,e,n){"use strict";t.exports={blocks:[],appendTo:""}},function(t,e,n){"use strict";var i=n(0),r=n(196);t.exports=i.Collection.extend({model:r})},function(t,e,n){"use strict";var i=n(0),r=n(54);t.exports=i.Model.extend({defaults:{label:"",content:"",category:"",attributes:{}},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],this.get("category"));if(t&&"string"==typeof t){new r({id:t,label:t})}}})},function(t,e,n){"use strict";var i=n(0);t.exports=i.Collection.extend({model:n(54)})},function(t,e,n){"use strict";(function(e){var i=n(0),r=n(199),o=n(200);t.exports=i.View.extend({initialize:function(t,n){e.bindAll(this,"getSorter","onDrag","onDrop"),this.config=n||{},this.categories=t.categories||"",this.renderedCategories=[];var i=this.config.pStylePrefix||"";this.ppfx=i,this.noCatClass=i+"blocks-no-cat",this.blockContClass=i+"blocks-c",this.catsClass=i+"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.initChildrenComp(t),e.trigger("block:drag:stop",t))},addTo:function(t){this.add(t)},add:function(t,e){var n=e||null,i=new r({model:t,attributes:t.get("attributes")},this.config),s=i.render().el,a=t.get("category");if(a&&this.categories){"string"==typeof a&&(a={id:a,label:a});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=document.createDocumentFragment();return this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML='\n
\n
\n
\n
\n ',this.collection.each(function(n){return t.add(n,e)}),this.append(e),this.$el.addClass(this.blockContClass+"s"),this}})}).call(e,n(1))},function(t,e,n){"use strict";(function(e,n){var i=e.$;t.exports=e.View.extend({events:{mousedown:"startDrag"},initialize:function(t,e){n.bindAll(this,"endDrag"),this.config=e||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy remove",this.remove),this.doc=i(document)},startDrag:function(t){if(0===t.button&&this.config.getSorter){this.config.em.refreshCanvas();var e=this.config.getSorter();e.setDragHelper(this.el,t),e.startSort(this.el),e.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.endDrag)}},endDrag:function(t){this.doc.off("mouseup",this.endDrag);var e=this.config.getSorter();e.moved=0,e.endMove()},render:function(){var t=this.ppfx+"block";return this.$el.addClass(t),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";(function(e){var i=n(0);t.exports=i.View.extend({template:e.template('\n
\n \n <%= label %>\n
\n
\n '),events:{},initialize:function(){var t=(arguments.length>0&&void 0!==arguments[0]&&arguments[0],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.updateVisibility(),this}})}).call(e,n(1))},function(t,e,n){"use strict";t.exports=function(){var t,e={},i=n(202),r=(n(45),n(203));return{TraitsView:r,name:"TraitManager",getConfig:function(){return e},init:function(n){e=n||{};for(var o in i)o in e||(e[o]=i[o]);var s=e.pStylePrefix;return s&&(e.stylePrefix=s+e.stylePrefix),t=new r({collection:[],editor:e.em,config:e}),this},getTraitsViewer:function(){return t},addType:function(e,n){var i=t.itemView;t.itemsView[e]=i.extend(n)},getType:function(e){return t.itemsView[e]}}}},function(t,e,n){"use strict";t.exports={stylePrefix:"trt-",labelContainer:"Component settings"}},function(t,e,n){"use strict";var i=n(48),r=n(7),o=n(204),s=n(205),a=n(206),l=n(207);t.exports=i.extend({itemView:r,itemsView:{text:r,number:a,select:o,checkbox:s,color:l},initialize:function(t){this.config=t.config||{},this.em=t.editor,this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"traits",this.listenTo(this.em,"change:selectedComponent",this.updatedCollection),this.updatedCollection()},updatedCollection:function(){this.el.className=this.className;var t=this.em.get("selectedComponent");t&&(this.collection=t.get("traits"),this.render())}})},function(t,e,n){"use strict";(function(e,i){var r=n(7),o=e.$;t.exports=r.extend({initialize:function(t){r.prototype.initialize.apply(this,arguments);var e=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var t=this.model,e=t.get("options")||[],n="",this.input=n,this.$input=o(this.input);var r=this.target,s=t.get("name"),a=t.get("value");if(t.get("changeProp"))a=a||r.get(s);else{a=r.get("attributes")[s]}a&&this.$input.val(a)}return this.$input.get(0)}})}).call(e,n(0),n(1))},function(t,e,n){"use strict";var i=n(7);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