diff --git a/bower.json b/bower.json index 1a0f098cf..059f7e316 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "grapesjs", "description": "Open source Web Template Editor", - "version": "0.4.15", + "version": "0.4.17", "author": "Artur Arseniev", "homepage": "http://grapesjs.com", "main": [ diff --git a/dist/css/grapes.min.css b/dist/css/grapes.min.css index 757250883..f0fa565de 100644 --- a/dist/css/grapes.min.css +++ b/dist/css/grapes.min.css @@ -3,4 +3,4 @@ @charset "UTF-8";.sp-alpha-handle,.sp-slider{opacity:.8;background-color:#ccc}.fa-fw,.fa-li,.sp-container button{text-align:center}.fa,.gjs-fonts::before{text-rendering:auto;-moz-osx-font-smoothing:grayscale}.sp-container{position:absolute;top:0;left:0;display:inline-block;z-index:9999994;overflow:hidden}.sp-container.sp-flat,.sp-top{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{width:100%;display:inline-block}.sp-alpha-handle,.sp-color,.sp-dragger,.sp-hue,.sp-sat,.sp-slider,.sp-top-inner,.sp-val{position:absolute}.sp-top-inner{top:0;left:0;bottom:0;right:0}.sp-color{top:0;left:0;bottom:0}.sp-hue{top:0;right:0;bottom:0;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{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,.sp-clear{display:none}.sp-alpha-handle{top:-4px;bottom:-4px;left:50%;background:#fff;opacity:.8}.sp-alpha{bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:1px solid #333}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0;right:0;bottom:0;left:84%;height:28px}.sp-alpha,.sp-alpha-handle,.sp-clear,.sp-container,.sp-container button,.sp-container.sp-dragging .sp-input,.sp-dragger,.sp-preview,.sp-replacer,.sp-slider{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-buttons-disabled .sp-button-container,.sp-container.sp-input-disabled .sp-input-container,.sp-container.sp-palette-buttons-disabled .sp-palette-button-container,.sp-initial-disabled .sp-initial,.sp-palette-disabled .sp-palette-container,.sp-palette-only .sp-picker-container{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%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-ms-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-o-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-webkit-gradient(linear,left top,left bottom,from(red),color-stop(.17,#ff0),color-stop(.33,#0f0),color-stop(.5,#0ff),color-stop(.67,#00f),color-stop(.83,#f0f),to(red));background:-webkit-linear-gradient(top,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:linear-gradient(to bottom,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 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:after,.sp-cf:before{content:"";display:table}.sp-cf:after{clear:both}@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;top:0;left:0}.sp-slider{top:0;right:-1px;background:#fff;opacity:.8}.sp-container{border:1px solid #f0c49B;padding:0}.sp-clear,.sp-color,.sp-container,.sp-container button,.sp-container input,.sp-hue{font:400 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}.gjs-btnt,.gjs-com-dashed *,.gjs-cv-canvas,.gjs-cv-canvas *,.gjs-editor,.gjs-input,.gjs-pn-btn,.gjs-pn-panel,.gjs-select{box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-clear,.sp-color,.sp-hue{border:1px solid #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container,.sp-input{width:100%}.sp-input{font-size:12px!important;border:1px inset;padding:4px 5px;margin:0;background:0 0;border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-palette-container,.sp-picker-container{float:left;position:relative;padding:10px 10px 300px;margin-bottom:-290px}.sp-picker-container{width:172px}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;cursor:pointer}.sp-palette .sp-thumb-el.sp-thumb-active,.sp-palette .sp-thumb-el:hover{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:1px solid #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-button-container,.sp-palette-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;border:1px solid #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer.sp-active,.sp-replacer:hover{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{width:25px;height:20px;border:1px solid #222;margin-right:5px;float:left;z-index:0}.sp-palette{max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:1px solid #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eee;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;font-size:14px;line-height:1;vertical-align:middle}.sp-container button:hover{background-color:#ddd;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}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.sp-cancel{margin:0 5px 0 0;padding:2px;vertical-align:middle}.fa.fa-pull-left,.fa.pull-left{margin-right:.3em}.sp-palette span.sp-thumb-active,.sp-palette span:hover{border-color:#000}.sp-alpha,.sp-preview,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-alpha-inner,.sp-preview-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.fa,.fa-stack{display:inline-block}.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.5.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.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.3333333333em;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.2857142857em}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.pull-left{float:left}.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(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.gjs-clm-tags #gjs-clm-close,.gjs-freezed,.gjs-nv-freezed,.opac50{opacity:.5;filter:alpha(opacity=50)}.fa-stack{position:relative;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-close:before,.fa-remove: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-cog:before,.fa-gear: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-repeat:before,.fa-rotate-right: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-image:before,.fa-photo: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-exclamation-triangle:before,.fa-warning: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-cogs:before,.fa-gears: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-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder: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-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste: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-chain-broken:before,.fa-unlink: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-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won: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-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira: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-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board: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: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-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-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-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-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-futbol-o:before,.fa-soccer-ball-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-ils:before,.fa-shekel:before,.fa-sheqel: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-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4: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-paper-o:before,.fa-hand-stop-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-television:before,.fa-tv: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:""}@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:400;font-style:normal}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;-webkit-font-smoothing:antialiased;font-size:5em}.gjs-block-label,.gjs-editor,.gjs-mdl-container{font-family:Helvetica,sans-serif}.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-clm-tags #gjs-clm-new,.gjs-invis-invis,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.checker-bg,.gjs-checker-bg,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.gjs-nav-comp-name,.gjs-no-user-select{-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{pointer-events:none}#gjs-rte-toolbar,.gjs-bg-main,.gjs-block,.gjs-clm-select option,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-mdl-dialog,.gjs-nv-item .gjs-nv-title-c,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-sm-select option,.gjs-sm-unit option,.sp-container{background-color:#444}#gjs-rte-toolbar .gjs-rte-btn,.gjs-btn-prim,.gjs-btnt,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-color-main,.gjs-mdl-dialog,.gjs-off-prv,.gjs-pn-btn,.gjs-pn-panel,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add{color:#ddd}.gjs-btnt.gjs-pn-active,.gjs-color-active,.gjs-pn-btn.gjs-pn-active{color:#f8f8f8}.gjs-bdrag{pointer-events:none!important;position:absolute!important;z-index:10!important;width:auto}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing!important;cursor:-webkit-grabbing!important}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label,.gjs-com-no-select,.gjs-com-no-select img,.no-select{-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{background-color:#444;position:relative;height:100%}.gjs-btn-prim,.gjs-btn-prim:active{background-color:rgba(255,255,255,.1)}.gjs-freezed,.gjs-nv-freezed{pointer-events:none}.gjs-btn-prim{border-radius:2px;cursor:pointer;padding:.5em;border:none}.gjs-input,.gjs-select{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);border-radius:2px;box-shadow:1px 1px 0 rgba(255,255,255,.1);color:#ddd;padding:.5em 1em}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select select:-moz-focusring,.gjs-select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-btn-prim:focus,.gjs-button:focus,.gjs-input:focus,.gjs-select select:focus,.gjs-select:focus{outline:0}.gjs-traits-label{border-bottom:1px solid rgba(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:.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,.15);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:0;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:#3b97e3 solid 1px;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:#ffca6f solid 3px}.gjs-cv-canvas .gjs-highlighter-sel{outline:#3b97e3 solid 3px}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:0}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.dragged,.gjs-resizer-c,.gjs-resizer-h,.gjs-toolbar{position:absolute}.gjs-frame{transition:width .35s ease}.gjs-toolbar{background-color:#3b97e3;color:#fff;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:.8rem;cursor:pointer}.gjs-resizer-c{z-index:9}.gjs-resizer-h{pointer-events:all;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff}.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:0 auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl,.gjs-resizer-h-cr{margin:auto 0;cursor:ew-resize;bottom:0;top:0}.gjs-resizer-h-cl{left:0}.gjs-resizer-h-cr{right:0}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:0 auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-resizing .gjs-badge,.gjs-resizing .gjs-highlighter{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 *,.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-am-assets-cont #gjs-am-close,.gjs-mdl-dialog .gjs-mdl-btn-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-am-assets-cont #gjs-am-close:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.dragged,.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}#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{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:0!important}.gjs-com-dashed *{outline:#888 dashed 1px;outline-offset:-2px}.gjs-cv-canvas .gjs-comp-selected{outline:#3b97e3 solid 3px!important}.gjs-com-hover,div.gjs-com-hover{outline:#3b97e3 solid 1px}.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:#dd3636 solid 2px;opacity:.5;filter:alpha(opacity=50)}.gjs-com-hover-move,div.gjs-com-hover-move{outline:#ffca6f solid 3px}.gjs-badge,.gjs-com-badge,.gjs-com-badge-red{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:0;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-com-placeholder,.gjs-nv-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-nv-placeholder,.gjs-placeholder{border-style:solid!important;border-color:#62c462;outline:0;box-sizing:border-box}.gjs-com-placeholder-int,.gjs-nv-placeholder-int,.gjs-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:0}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;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,.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-redo,.gjs-pn-panel .icon-undo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(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,.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-btnt,.gjs-pn-btn{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-btnt.gjs-pn-active,.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.gjs-btnt>.gjs-pn-arrow-rd,.gjs-pn-btn>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-btnt>.gjs-pn-buttons,.gjs-pn-btn>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible,.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-pn-btn>.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}.gjs-nv-navigator{position:relative;height:100%}.gjs-nv-navigator #gjs-nv-placeholder{width:100%;position:absolute}.gjs-nv-navigator #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-nv-navigator #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-nv-navigator .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,.1)}.gjs-nv-navigator .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-nv-navigator .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-nv-navigator .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:5px;cursor:pointer;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{background-color:rgba(0,0,0,.1);font-size:11px;letter-spacing:1px;padding:3px 10px 5px 30px;border-bottom:1px solid rgba(0,0,0,.3);border-top:1px solid rgba(255,255,255,.1);display:flex;align-items:center}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,.3)}.gjs-nv-item>.gjs-nv-children{margin-left:7px;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-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,.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:10px;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}.btn.expand,.gjs-nv-navigator .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:#ffca6f solid 3px;outline-offset:-3px;text-align:center;font-size:16.67px;cursor:pointer}.gjs-field-checkbox input,.gjs-radio-item input{display:none}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:rgba(255,255,255,.7);border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:3px 4px 4px;z-index:1}.gjs-field textarea{resize:vertical}.gjs-field select{height:20px;padding-right:12px}.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:7px;border-top:4px solid rgba(255,255,255,.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(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{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,.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:checked+.gjs-chk-icon{border-color:rgba(255,255,255,.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,.3)}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;right:0;top:0}.gjs-field-units select{padding:0 12px 0 0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-field-arrows{z-index:10;cursor:ns-resize;height:100%;position:absolute;right:0;top:0;width:9px}.gjs-field-arrow-d,.gjs-field-arrow-u{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,.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,.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,.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,.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.15);border-radius:1px;height:2px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.15);border-radius:1px;height:2px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.15);border-radius:1px;height:2px}.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:0 0;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,.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:.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-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-sm-close-btn,.gjs-sm-sector .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-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-sm-close-btn:hover,.gjs-sm-sector .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-clm-tags,.gjs-sm-sector{clear:both;border-bottom:1px solid rgba(0,0,0,.3);font-weight:lighter;text-align:left}.gjs-clm-tags #gjs-sm-caret,.gjs-sm-sector #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-clm-tags .gjs-sm-title,.gjs-sm-sector .gjs-sm-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:12px 10px 12px 20px;border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.gjs-clm-tags .gjs-sm-label,.gjs-sm-sector .gjs-sm-label{margin:5px 5px 2px 0}.gjs-clm-tags .gjs-clm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-sm-sector .gjs-sm-field{width:100%;position:relative}.gjs-clm-tags .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field select,.gjs-clm-tags .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field input,.gjs-sm-sector .gjs-clm-field select,.gjs-sm-sector .gjs-sm-field input,.gjs-sm-sector .gjs-sm-field select{background-color:transparent;color:rgba(255,255,255,.7);border:none;width:100%}.gjs-clm-tags .gjs-clm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field input{box-sizing:border-box}.gjs-clm-tags .gjs-clm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-sm-sector .gjs-sm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-clm-tags .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-sm-sector .gjs-sm-field select::-ms-expand{display:none}.gjs-clm-tags .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-sm-sector .gjs-sm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-clm-tags .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field select:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-sm-sector .gjs-sm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus{outline:0}.gjs-clm-tags .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-sm-sector .gjs-sm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-clm-tags .gjs-clm-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-sm-sector .gjs-sm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-clm-tags .gjs-clm-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-sm-sector .gjs-sm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,.7);top:4px}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,.7);bottom:4px}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-clm-tags .gjs-clm-select,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-select.gjs-clm-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);color:rgba(255,255,255,.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite{border-radius:2px;background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.25)}.gjs-clm-tags .gjs-clm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field{padding:0}.gjs-clm-tags .gjs-clm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select{height:20px}.gjs-clm-tags .gjs-clm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option{padding:3px 0}.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input,.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input{display:none}.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label,.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-sm-sector .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{background-color:rgba(255,255,255,.2)}.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-clm-tags .gjs-sm-list .gjs-sm-el,.gjs-sm-sector .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,.3)}.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child,.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover,.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,.3)}.gjs-clm-tags .gjs-sm-properties,.gjs-sm-sector .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-clm-tags .gjs-sm-property,.gjs-sm-sector .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack{width:100%}.gjs-clm-tags .gjs-sm-property .gjs-sm-btn,.gjs-sm-sector .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,.3),1px 1px 0 rgba(43,43,43,.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,.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c,.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,.05);padding:3px 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-clm-tags .gjs-sm-property .gjs-sm-layers,.gjs-sm-sector .gjs-sm-property .gjs-sm-layers{margin-top:5px;min-height:30px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,.055);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.2),1px 1px 0 rgba(255,255,255,.055) inset;margin:2px;padding:7px;position:relative;cursor:pointer}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-sm-sector .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-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:#fff;height:100%;width:100%;background-size:cover!important}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,.12)}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties,.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add{background:0 0;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:.75}.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-clm-tags .gjs-sm-colorp-c,.gjs-sm-sector .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg{height:100%;width:100%;border-radius:1px}.gjs-clm-tags .gjs-sm-color-picker,.gjs-sm-sector .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,.3);border-radius:1px}.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload,.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label,.gjs-sm-sector .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{-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,.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,.15);transition:all .2s ease 0s;transition-property:box-shadow,color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,.15)}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:.65rem;font-weight:400}.gjs-block.gjs-bdrag{width:auto;padding:0}.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,.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,.2) inset;border:1px solid rgba(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,.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,.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,.gjs-mdl-container{position:absolute;top:0;left:0;width:100%;height:100%}.gjs-mdl-backlayer{background-color:#000;z-index:1;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{z-index:10}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);animation:gjs-slide-down 215ms;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 216ms}.gjs-mdl-content,.gjs-mdl-header{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-am-assets{height:290px;overflow:auto;clear:both}.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-add-field input{padding:6px}.gjs-am-assets-cont{background-color:rgba(0,0,0,.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-assets-cont #gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-assets-cont #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-assets-cont #gjs-am-preview-bg{position:absolute;height:100%;width:100%;opacity:.5;filter:alpha(opacity=50);z-index:0}.gjs-am-assets-cont .gjs-am-highlight{background-color:rgba(255,255,255,.1)}.gjs-am-assets-cont .gjs-am-asset{border-bottom:1px solid rgba(0,0,0,.3);padding:5px;cursor:pointer;position:relative}.gjs-am-assets-cont .gjs-am-asset:hover #gjs-am-close{display:block}.gjs-am-assets-cont #gjs-am-close{position:absolute;right:5px;top:0;display:none}.gjs-am-assets-cont #gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-assets-cont #gjs-am-meta>div{margin-bottom:5px}.gjs-am-assets-cont #gjs-am-meta #gjs-am-dimensions{font-size:10px;opacity:.5;filter:alpha(opacity=50)}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}#gjs-rte-toolbar .gjs-rte-btn.btn-info,.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,.3)}.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,.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,.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,.3);position:absolute;border-radius:3px;overflow:hidden;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,.3);text-align:center;cursor:pointer;outline:0}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-handle,.sp-alpha-inner{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,.3);box-shadow:0 0 7px rgba(0,0,0,.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:rgba(0,0,0,.3) solid 1px}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777!important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333}.sp-slider{border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:0 0;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:active,.sp-container button:hover{background:rgba(0,0,0,.3);border-color:rgba(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,.9)}.sp-palette .sp-thumb-el.sp-thumb-active,.sp-palette .sp-thumb-el:hover{border-color:rgba(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}} \ No newline at end of file + */@font-face{font-family:FontAwesome;src:url(../fonts/fontawesome-webfont.eot?v=4.5.0);src:url(../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0) format("embedded-opentype"),url(../fonts/fontawesome-webfont.woff2?v=4.5.0) format("woff2"),url(../fonts/fontawesome-webfont.woff?v=4.5.0) format("woff"),url(../fonts/fontawesome-webfont.ttf?v=4.5.0) format("truetype"),url(../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{font:normal normal normal 14px/1 FontAwesome;font-size:inherit;-webkit-font-smoothing:antialiased}.fa-lg{font-size:1.3333333333em;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.2857142857em}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa.fa-pull-right,.fa.pull-right{margin-left:.3em}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right,.pull-right{float:right}.pull-left{float:left}.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(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{filter:none}.gjs-clm-tags #gjs-clm-close,.gjs-freezed,.gjs-nv-freezed,.opac50{opacity:.5;filter:alpha(opacity=50)}.fa-stack{position:relative;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-close:before,.fa-remove: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-cog:before,.fa-gear: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-repeat:before,.fa-rotate-right: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-image:before,.fa-photo: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-exclamation-triangle:before,.fa-warning: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-cogs:before,.fa-gears: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-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder: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-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste: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-chain-broken:before,.fa-unlink: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-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won: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-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira: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-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board: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: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-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-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-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-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-futbol-o:before,.fa-soccer-ball-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-ils:before,.fa-shekel:before,.fa-sheqel: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-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4: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-paper-o:before,.fa-hand-stop-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-television:before,.fa-tv: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:""}@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:400;font-style:normal}.gjs-fonts::before{display:block;font:normal normal normal 14px font3336;-webkit-font-smoothing:antialiased;font-size:5em}.gjs-block-label,.gjs-editor,.gjs-mdl-container{font-family:Helvetica,sans-serif}.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-clm-tags #gjs-clm-new,.gjs-invis-invis,.gjs-no-app{background-color:transparent;border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:'#fff'}.checker-bg,.gjs-checker-bg,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.gjs-nav-comp-name,.gjs-no-user-select{-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{pointer-events:none}#gjs-rte-toolbar,.gjs-bg-main,.gjs-block,.gjs-clm-select option,.gjs-clm-tags .gjs-sm-colorp-c,.gjs-mdl-dialog,.gjs-nv-item .gjs-nv-title-c,.gjs-off-prv,.gjs-pn-panel,.gjs-select option,.gjs-sm-sector .gjs-sm-colorp-c,.gjs-sm-select option,.gjs-sm-unit option,.sp-container{background-color:#444}#gjs-rte-toolbar .gjs-rte-btn,.gjs-btn-prim,.gjs-btnt,.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-color-main,.gjs-mdl-dialog,.gjs-off-prv,.gjs-pn-btn,.gjs-pn-panel,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add{color:#ddd}.gjs-btnt.gjs-pn-active,.gjs-color-active,.gjs-pn-btn.gjs-pn-active{color:#f8f8f8}.gjs-bdrag{pointer-events:none!important;position:absolute!important;z-index:10!important;width:auto}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing!important;cursor:-webkit-grabbing!important}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.gjs-clm-tags #gjs-clm-close,.gjs-clm-tags #gjs-clm-tag-label,.gjs-com-no-select,.gjs-com-no-select img,.no-select{-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{background-color:#444;position:relative;height:100%}.gjs-btn-prim,.gjs-btn-prim:active{background-color:rgba(255,255,255,.1)}.gjs-freezed,.gjs-nv-freezed{pointer-events:none}.gjs-btn-prim{border-radius:2px;cursor:pointer;padding:.5em;border:none}.gjs-input,.gjs-select{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);border-radius:2px;box-shadow:1px 1px 0 rgba(255,255,255,.1);color:#ddd;padding:.5em 1em}div.gjs-select{padding:0}.gjs-select select{padding-right:10px}.gjs-select select:-moz-focusring,.gjs-select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-btn-prim:focus,.gjs-button:focus,.gjs-input:focus,.gjs-select select:focus,.gjs-select:focus{outline:0}.gjs-traits-label{border-bottom:1px solid rgba(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:.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,.15);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:0;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:#3b97e3 solid 1px;pointer-events:none}.gjs-cv-canvas .gjs-highlighter-warning{outline:#ffca6f solid 3px}.gjs-cv-canvas .gjs-highlighter-sel{outline:#3b97e3 solid 3px}.gjs-cv-canvas #gjs-tools{width:100%;position:absolute;top:0;left:0;outline:0}.gjs-cv-canvas>div:first-child{background-color:#fff;position:relative;height:100%;overflow:auto;width:100%}.dragged,.gjs-resizer-c,.gjs-resizer-h,.gjs-toolbar{position:absolute}.gjs-frame{transition:width .35s ease}.gjs-toolbar{background-color:#3b97e3;color:#fff;z-index:10}.gjs-toolbar-item{padding:5px 7px;font-size:.8rem;cursor:pointer}.gjs-resizer-c{z-index:9}.gjs-resizer-h{pointer-events:all;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,.gjs-resizer-h-cr{margin:auto -5px;cursor:ew-resize;bottom:0;top:0}.gjs-resizer-h-cl{left:0}.gjs-resizer-h-cr{right:0}.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-resizing .gjs-badge,.gjs-resizing .gjs-highlighter{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 *,.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-am-assets-cont #gjs-am-close,.gjs-mdl-dialog .gjs-mdl-btn-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-am-assets-cont #gjs-am-close:hover,.gjs-mdl-dialog .gjs-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.dragged,.gjs-nv-opac50{opacity:.5;filter:alpha(opacity=50)}#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{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:0!important}.gjs-com-dashed *{outline:#888 dashed 1px;outline-offset:-2px}.gjs-cv-canvas .gjs-comp-selected{outline:#3b97e3 solid 3px!important}.gjs-com-hover,div.gjs-com-hover{outline:#3b97e3 solid 1px}.gjs-com-hover-delete,div.gjs-com-hover-delete{outline:#dd3636 solid 2px;opacity:.5;filter:alpha(opacity=50)}.gjs-com-hover-move,div.gjs-com-hover-move{outline:#ffca6f solid 3px}.gjs-badge,.gjs-com-badge,.gjs-com-badge-red{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:0;display:none}.gjs-com-badge-red{background-color:#dd3636}.gjs-badge-warning{background-color:#ffca6f}.gjs-com-placeholder,.gjs-nv-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-nv-placeholder,.gjs-placeholder{border-style:solid!important;border-color:#62c462;outline:0;box-sizing:border-box}.gjs-com-placeholder-int,.gjs-nv-placeholder-int,.gjs-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:0}.gjs-pn-panel{display:inline-block;padding:5px;position:absolute;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,.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-redo,.gjs-pn-panel .icon-undo{font-size:20px;height:30px;width:25px}.gjs-pn-panel#gjs-pn-views{border-bottom:2px solid rgba(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,.3)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:center}.gjs-btnt,.gjs-pn-btn{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-btnt.gjs-pn-active,.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.gjs-btnt>.gjs-pn-arrow-rd,.gjs-pn-btn>.gjs-pn-arrow-rd{border-bottom:5px solid rgba(255,255,255,.7);border-left:5px solid transparent;bottom:2px;right:2px;position:absolute}.gjs-btnt>.gjs-pn-buttons,.gjs-pn-btn>.gjs-pn-buttons{background-color:#444;border-radius:2px;position:absolute;display:none;left:50px;top:0;padding:5px}.gjs-btnt>.gjs-pn-buttons.gjs-pn-visible,.gjs-pn-btn>.gjs-pn-buttons.gjs-pn-visible{display:block}.gjs-btnt>.gjs-pn-buttons>.gjs-pn-arrow-l,.gjs-pn-btn>.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}.gjs-nv-navigator{position:relative;height:100%}.gjs-nv-navigator #gjs-nv-placeholder{width:100%;position:absolute}.gjs-nv-navigator #gjs-nv-placeholder #gjs-nv-plh-int{height:100%;padding:1px}.gjs-nv-navigator #gjs-nv-placeholder #gjs-nv-plh-int.gjs-nv-insert{background-color:#62c462}.gjs-nv-navigator .gjs-nv-item{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,.1)}.gjs-nv-navigator .gjs-nv-item.gjs-nv-hide{opacity:.55;filter:alpha(opacity=55)}.gjs-nv-navigator .gjs-nv-item #gjs-nv-counter{font-size:10px;position:absolute;right:27px;top:9px}.gjs-nv-navigator .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:5px;cursor:pointer;opacity:.7;filter:alpha(opacity=70)}.gjs-nv-item #gjs-nv-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-nv-title{background-color:rgba(0,0,0,.1);font-size:11px;letter-spacing:1px;padding:3px 10px 5px 30px;border-bottom:1px solid rgba(0,0,0,.3);border-top:1px solid rgba(255,255,255,.1);display:flex;align-items:center}.gjs-nv-item .gjs-nv-children .gjs-nv-title{border-left:1px solid rgba(5,5,5,.3)}.gjs-nv-item>.gjs-nv-children{margin-left:7px;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-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,.1)}.gjs-nv-nav-item-edit{visibility:hidden;padding:5px;font-size:10px;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}.btn.expand,.gjs-nv-navigator .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:#ffca6f solid 3px;outline-offset:-3px;text-align:center;font-size:16.67px;cursor:pointer}.gjs-field-checkbox input,.gjs-radio-item input{display:none}.gjs-comp-image-placeholder.fa-picture-o::after{content:"\f03e"}.gjs-label{line-height:18px}.gjs-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:rgba(255,255,255,.7);border:none;background-color:transparent;box-sizing:border-box;width:100%;position:relative;padding:3px 4px 4px;z-index:1}.gjs-field textarea{resize:vertical}.gjs-field select{height:20px;padding-right:12px}.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:7px;border-top:4px solid rgba(255,255,255,.7);position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(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{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,.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:checked+.gjs-chk-icon{border-color:rgba(255,255,255,.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{float:left;border-left:1px solid rgba(0,0,0,.3)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,.3)}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,.2)}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;right:0;top:0}.gjs-field-units select{padding:0 12px 0 0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-field-arrows{z-index:10;cursor:ns-resize;height:100%;position:absolute;right:0;top:0;width:9px}.gjs-field-arrow-d,.gjs-field-arrow-u{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(255,255,255,.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,.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,.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,.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,.3);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.15);border-radius:1px;height:2px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.15);border-radius:1px;height:2px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.15);border-radius:1px;height:2px}.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:0 0;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,.2)}.gjs-devices-c{display:flex;align-items:center;padding:4px}.gjs-devices-c .gjs-device-label{flex-grow:2;font-size:.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-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-sm-close-btn,.gjs-sm-sector .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-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close:hover,.gjs-sm-close-btn:hover,.gjs-sm-sector .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-clm-tags,.gjs-sm-sector{clear:both;border-bottom:1px solid rgba(0,0,0,.3);font-weight:lighter;text-align:left}.gjs-clm-tags #gjs-sm-caret,.gjs-sm-sector #gjs-sm-caret{padding-right:5px;font-size:11px}.gjs-clm-tags .gjs-sm-title,.gjs-sm-sector .gjs-sm-title{background-color:rgba(0,0,0,.1);font-size:13px;letter-spacing:1px;padding:12px 10px 12px 20px;border-top:1px solid rgba(255,255,255,.1);cursor:pointer}.gjs-clm-tags .gjs-sm-label,.gjs-sm-sector .gjs-sm-label{margin:5px 5px 2px 0}.gjs-clm-tags .gjs-clm-field,.gjs-clm-tags .gjs-sm-field,.gjs-sm-sector .gjs-clm-field,.gjs-sm-sector .gjs-sm-field{width:100%;position:relative}.gjs-clm-tags .gjs-clm-field input,.gjs-clm-tags .gjs-clm-field select,.gjs-clm-tags .gjs-sm-field input,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field input,.gjs-sm-sector .gjs-clm-field select,.gjs-sm-sector .gjs-sm-field input,.gjs-sm-sector .gjs-sm-field select{background-color:transparent;color:rgba(255,255,255,.7);border:none;width:100%}.gjs-clm-tags .gjs-clm-field input,.gjs-clm-tags .gjs-sm-field input,.gjs-sm-sector .gjs-clm-field input,.gjs-sm-sector .gjs-sm-field input{box-sizing:border-box}.gjs-clm-tags .gjs-clm-field select,.gjs-clm-tags .gjs-sm-field select,.gjs-sm-sector .gjs-clm-field select,.gjs-sm-sector .gjs-sm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-clm-tags .gjs-clm-field select::-ms-expand,.gjs-clm-tags .gjs-sm-field select::-ms-expand,.gjs-sm-sector .gjs-clm-field select::-ms-expand,.gjs-sm-sector .gjs-sm-field select::-ms-expand{display:none}.gjs-clm-tags .gjs-clm-field select:-moz-focusring,.gjs-clm-tags .gjs-sm-field select:-moz-focusring,.gjs-sm-sector .gjs-clm-field select:-moz-focusring,.gjs-sm-sector .gjs-sm-field select:-moz-focusring{color:transparent;text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-clm-tags .gjs-clm-field input:focus,.gjs-clm-tags .gjs-clm-field select:focus,.gjs-clm-tags .gjs-sm-field input:focus,.gjs-clm-tags .gjs-sm-field select:focus,.gjs-sm-sector .gjs-clm-field input:focus,.gjs-sm-sector .gjs-clm-field select:focus,.gjs-sm-sector .gjs-sm-field input:focus,.gjs-sm-sector .gjs-sm-field select:focus{outline:0}.gjs-clm-tags .gjs-clm-field .gjs-sm-unit,.gjs-clm-tags .gjs-sm-field .gjs-sm-unit,.gjs-sm-sector .gjs-clm-field .gjs-sm-unit,.gjs-sm-sector .gjs-sm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-clm-tags .gjs-clm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-clm-field .gjs-sm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-tags .gjs-sm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-clm-field .gjs-sm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-sel-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-int-arrows,.gjs-sm-sector .gjs-sm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-clm-tags .gjs-clm-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-sm-sector .gjs-sm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-u-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-u-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid transparent;border-right:4px solid transparent;cursor:pointer}.gjs-clm-tags .gjs-clm-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-sm-sector .gjs-sm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,.7);top:4px}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,.7);bottom:4px}.gjs-clm-tags .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-tags .gjs-sm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-clm-d-s-arrow,.gjs-sm-sector .gjs-sm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-clm-tags .gjs-clm-select,.gjs-clm-tags .gjs-sm-color.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-color,.gjs-clm-tags .gjs-sm-field.gjs-sm-input,.gjs-clm-tags .gjs-sm-field.gjs-sm-integer,.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-input.gjs-clm-field,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-sm-sector .gjs-sm-color.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-color,.gjs-sm-sector .gjs-sm-field.gjs-sm-input,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-input.gjs-clm-field,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field,.gjs-sm-sector .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-select.gjs-clm-field{background-color:rgba(0,0,0,.3);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);color:rgba(255,255,255,.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-clm-tags .gjs-sm-composite.gjs-clm-field,.gjs-clm-tags .gjs-sm-field.gjs-sm-composite,.gjs-sm-sector .gjs-sm-composite.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-composite{border-radius:2px;background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.25)}.gjs-clm-tags .gjs-clm-select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field,.gjs-sm-sector .gjs-clm-select,.gjs-sm-sector .gjs-sm-field.gjs-sm-select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field{padding:0}.gjs-clm-tags .gjs-clm-select select,.gjs-clm-tags .gjs-sm-field.gjs-sm-select select,.gjs-clm-tags .gjs-sm-select.gjs-clm-field select,.gjs-sm-sector .gjs-clm-select select,.gjs-sm-sector .gjs-sm-field.gjs-sm-select select,.gjs-sm-sector .gjs-sm-select.gjs-clm-field select{height:20px}.gjs-clm-tags .gjs-clm-select option,.gjs-clm-tags .gjs-sm-field.gjs-sm-select option,.gjs-clm-tags .gjs-sm-select.gjs-clm-field option,.gjs-sm-sector .gjs-clm-select option,.gjs-sm-sector .gjs-sm-field.gjs-sm-select option,.gjs-sm-sector .gjs-sm-select.gjs-clm-field option{padding:3px 0}.gjs-clm-tags .gjs-sm-field.gjs-sm-list,.gjs-clm-tags .gjs-sm-list.gjs-clm-field,.gjs-sm-sector .gjs-sm-field.gjs-sm-list,.gjs-sm-sector .gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-clm-tags .gjs-sm-field.gjs-sm-list input,.gjs-clm-tags .gjs-sm-list.gjs-clm-field input,.gjs-sm-sector .gjs-sm-field.gjs-sm-list input,.gjs-sm-sector .gjs-sm-list.gjs-clm-field input{display:none}.gjs-clm-tags .gjs-sm-field.gjs-sm-list label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field label,.gjs-sm-sector .gjs-sm-field.gjs-sm-list label,.gjs-sm-sector .gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label,.gjs-sm-sector .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{background-color:rgba(255,255,255,.2)}.gjs-clm-tags .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-clm-tags .gjs-sm-list.gjs-clm-field .gjs-sm-icon,.gjs-sm-sector .gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-sector .gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-clm-tags .gjs-sm-field.gjs-sm-integer select,.gjs-clm-tags .gjs-sm-integer.gjs-clm-field select,.gjs-sm-sector .gjs-sm-field.gjs-sm-integer select,.gjs-sm-sector .gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-clm-tags .gjs-sm-list .gjs-sm-el,.gjs-sm-sector .gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,.3)}.gjs-clm-tags .gjs-sm-list .gjs-sm-el:first-child,.gjs-sm-sector .gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-clm-tags .gjs-sm-list .gjs-sm-el:hover,.gjs-sm-sector .gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,.3)}.gjs-clm-tags .gjs-sm-properties,.gjs-sm-sector .gjs-sm-properties{font-size:11px;padding:10px 5px}.gjs-clm-tags .gjs-sm-property,.gjs-sm-sector .gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-composite,.gjs-clm-tags .gjs-sm-property.gjs-sm-file,.gjs-clm-tags .gjs-sm-property.gjs-sm-list,.gjs-clm-tags .gjs-sm-property.gjs-sm-stack,.gjs-sm-sector .gjs-sm-property.gjs-sm-composite,.gjs-sm-sector .gjs-sm-property.gjs-sm-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-list,.gjs-sm-sector .gjs-sm-property.gjs-sm-stack{width:100%}.gjs-clm-tags .gjs-sm-property .gjs-sm-btn,.gjs-sm-sector .gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,.3);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,.3),1px 1px 0 rgba(43,43,43,.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,.3);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-clm-tags .gjs-sm-property .gjs-sm-btn-c,.gjs-sm-sector .gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%;padding:0 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box{background-color:rgba(255,255,255,.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box.gjs-sm-show{border:1px solid rgba(252,252,252,.05);padding:3px 5px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-box #gjs-sm-close{display:block}.gjs-clm-tags .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-file .gjs-sm-show #gjs-sm-preview-file{height:50px}.gjs-clm-tags .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file,.gjs-sm-sector .gjs-sm-property.gjs-sm-file #gjs-sm-preview-file{background-size:auto 100%;background-repeat:no-repeat;background-position:center center}.gjs-clm-tags .gjs-sm-property .gjs-sm-layers,.gjs-sm-sector .gjs-sm-property .gjs-sm-layers{margin-top:5px;min-height:30px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer{background-color:rgba(255,255,255,.055);border-radius:2px;box-shadow:1px 1px 0 rgba(0,0,0,.2),1px 1px 0 rgba(255,255,255,.055) inset;margin:2px;padding:7px;position:relative;cursor:pointer}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box{height:15px;position:absolute;right:27px;top:6px;width:15px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-preview-box{border-radius:2px}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer,.gjs-sm-sector .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-clm-tags .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer>#gjs-sm-preview-box #gjs-sm-preview{background-color:#fff;height:100%;width:100%;background-size:cover!important}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-active,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,.12)}.gjs-clm-tags .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box,.gjs-sm-sector .gjs-sm-property .gjs-sm-layer.gjs-sm-no-preview #gjs-sm-preview-box{display:none}.gjs-clm-tags #gjs-sm-text-shadow #gjs-sm-preview::after,.gjs-sm-sector #gjs-sm-text-shadow #gjs-sm-preview::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-clm-tags .gjs-sm-stack .gjs-sm-properties,.gjs-sm-sector .gjs-sm-stack .gjs-sm-properties{padding-top:5px}.gjs-clm-tags .gjs-sm-stack #gjs-sm-add,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add{background:0 0;border:none;cursor:pointer;font-size:22px;line-height:10px;position:absolute;right:0;top:-20px;opacity:.75}.gjs-clm-tags .gjs-sm-stack #gjs-sm-add:hover,.gjs-sm-sector .gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-clm-tags .gjs-sm-colorp-c,.gjs-sm-sector .gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-clm-tags .gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-sector .gjs-sm-colorp-c .gjs-checker-bg{height:100%;width:100%;border-radius:1px}.gjs-clm-tags .gjs-sm-color-picker,.gjs-sm-sector .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,.3);border-radius:1px}.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-upload,.gjs-sm-sector .gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-clm-tags .gjs-sm-btn-upload #gjs-sm-label,.gjs-sm-sector .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{-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,.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,.15);transition:all .2s ease 0s;transition-property:box-shadow,color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,.15)}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:.65rem;font-weight:400}.gjs-block.gjs-bdrag{width:auto;padding:0}.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,.15);border-radius:2px;padding:5px 6px;box-shadow:1px 1px 0 rgba(255,255,255,.2) inset;border:1px solid rgba(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,.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,.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,.gjs-mdl-container{position:absolute;top:0;left:0;width:100%;height:100%}.gjs-mdl-backlayer{background-color:#000;z-index:1;opacity:.5;filter:alpha(opacity=50)}.gjs-mdl-container{z-index:10}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);animation:gjs-slide-down 215ms;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 216ms}.gjs-mdl-content,.gjs-mdl-header{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,.3);padding:15px 15px 7px}.gjs-mdl-content{border-top:1px solid rgba(255,255,255,.1)}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-am-assets{height:290px;overflow:auto;clear:both}.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-add-field input{padding:6px}.gjs-am-assets-cont{background-color:rgba(0,0,0,.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-assets-cont #gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-assets-cont #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-assets-cont #gjs-am-preview-bg{position:absolute;height:100%;width:100%;opacity:.5;filter:alpha(opacity=50);z-index:0}.gjs-am-assets-cont .gjs-am-highlight{background-color:rgba(255,255,255,.1)}.gjs-am-assets-cont .gjs-am-asset{border-bottom:1px solid rgba(0,0,0,.3);padding:5px;cursor:pointer;position:relative}.gjs-am-assets-cont .gjs-am-asset:hover #gjs-am-close{display:block}.gjs-am-assets-cont #gjs-am-close{position:absolute;right:5px;top:0;display:none}.gjs-am-assets-cont #gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-assets-cont #gjs-am-meta>div{margin-bottom:5px}.gjs-am-assets-cont #gjs-am-meta #gjs-am-dimensions{font-size:10px;opacity:.5;filter:alpha(opacity=50)}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}#gjs-rte-toolbar .gjs-rte-btn.btn-info,.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,.3)}.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,.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,.1)}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{font-size:12px;padding:5px 10px 3px;text-align:right}#gjs-rte-toolbar{display:none;border:1px solid rgba(0,0,0,.3);position:absolute;border-radius:3px;overflow:hidden;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,.3);text-align:center;cursor:pointer;outline:0}#gjs-rte-toolbar .gjs-rte-btn:last-child{border-right:none}#gjs-rte-toolbar .gjs-rte-btn:hover{background-color:rgba(255,255,255,.1)}#gjs-rte-toolbar select{height:16px}.sp-hue,.sp-slider{cursor:row-resize}.sp-color,.sp-dragger{cursor:crosshair}.sp-alpha-handle,.sp-alpha-inner{cursor:col-resize}.sp-hue{left:90%}.sp-color{right:15%}.sp-container{border:1px solid rgba(0,0,0,.3);box-shadow:0 0 7px rgba(0,0,0,.3);border-radius:3px}.sp-picker-container{border:none}.colpick_dark .colpick_color{outline:rgba(0,0,0,.3) solid 1px}.sp-cancel,.sp-cancel:hover{bottom:-8px;color:#777!important;font-size:25px;left:0;position:absolute;text-decoration:none}.sp-alpha-handle{border:1px solid #555;width:4px}.sp-color,.sp-hue{border:1px solid #333}.sp-slider{border:1px solid #555;height:3px;left:-4px;width:22px}.sp-dragger{background:0 0;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:active,.sp-container button:hover{background:rgba(0,0,0,.3);border-color:rgba(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,.9)}.sp-palette .sp-thumb-el.sp-thumb-active,.sp-palette .sp-thumb-el:hover{border-color:rgba(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}} \ No newline at end of file diff --git a/dist/grapes.min.js b/dist/grapes.min.js index b718ad2b3..bea504938 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,4 +1,4 @@ -/*! grapesjs - v0.4.15 */ +/*! grapesjs - v0.4.17 */ !function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports&&"object"==typeof module?module.exports=b():a.grapesjs=a.GrapesJS=b()}(this,function(){var a,b,c;!function(d){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if(e=p[o.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,b){return function(){var c=w.call(arguments,0);return"string"!=typeof c[0]&&1===c.length&&c.push(null),o.apply(d,c.concat([a,b]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var b=s[a];delete s[a],u[a]=!0,n.apply(d,b)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return"undefined"!=typeof b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,b,c,f){var h,k,m,n,o,t,v,w=[],x=typeof c;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(b=!b.length&&c.length?["require","exports","module"]:b,o=0;o
",attributes:{"class":"gjs-fonts gjs-f-b1"}},{id:"b2",label:"2 Blocks",content:'
",attributes:{"class":"gjs-fonts gjs-f-b2"}},{id:"b3",label:"3 Blocks",content:'
",attributes:{"class":"gjs-fonts gjs-f-b3"}},{id:"b4",label:"3/7 Block",content:'
",attributes:{"class":"gjs-fonts gjs-f-b37"}},{id:"hero",label:"Hero section",content:'
Build your templates without coding
Try it now
',attributes:{"class":"gjs-fonts gjs-f-hero"}},{id:"h1p",label:"Text section",content:'

Insert title here

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

',attributes:{"class":"gjs-fonts gjs-f-h1p"}},{id:"3ba",label:"Badges",content:'
Adam Smith
CEO
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
ftln
John Black
Software Engineer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
ftln
Jessica White
Web Designer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
ftln
',attributes:{"class":"gjs-fonts gjs-f-3ba"}},{id:"text",label:"Text",attributes:{"class":"gjs-fonts gjs-f-text"},content:{type:"text",content:"Insert your text here",style:{padding:"10px"},activeOnRender:1}},{id:"image",label:"Image",attributes:{"class":"gjs-fonts gjs-f-image"},content:{style:{color:"black"},type:"image",activeOnRender:1}},{id:"quo",label:"Quote",content:'
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit
',attributes:{"class":"fa fa-quote-right"}},{id:"link",label:"Link",attributes:{"class":"fa fa-link"},content:{type:"link",content:"Link",style:{color:"#d983a6"}}},{id:"map",label:"Map",attributes:{"class":"fa fa-map-o"},content:{type:"map",style:{height:"350px"}}},{id:"video",label:"Video",attributes:{"class":"fa fa-youtube-play"},content:{type:"video",src:"img/video2.webm",style:{height:"350px",width:"615px"}}}]}}}),function(){function a(a){function b(b,c,d,e,f,g){for(;f>=0&&f0?0:h-1;return arguments.length<3&&(e=c[g?g[i]:i],i+=a),b(c,d,e,g,i,h)}}function b(a){return function(b,c,d){c=v(c,d);for(var e=A(b),f=a>0?0:e-1;f>=0&&f0?g=f>=0?f:Math.max(f+h,g):h=f>=0?Math.min(f+1,h):f+h+1;else if(c&&f&&h)return f=c(d,e),d[f]===e?f:-1;if(e!==e)return f=b(l.call(d,g,h),t.isNaN),f>=0?f+g:-1;for(f=a>0?g:h-1;f>=0&&f=0&&b<=z};t.each=t.forEach=function(a,b,c){b=u(b,c);var d,e;if(B(a))for(d=0,e=a.length;d=0},t.invoke=function(a,b){var c=l.call(arguments,2),d=t.isFunction(b);return t.map(a,function(a){var e=d?b:a[b];return null==e?e:e.apply(a,c)})},t.pluck=function(a,b){return t.map(a,t.property(b))},t.where=function(a,b){return t.filter(a,t.matcher(b))},t.findWhere=function(a,b){return t.find(a,t.matcher(b))},t.max=function(a,b,c){var d,e,f=-(1/0),g=-(1/0);if(null==b&&null!=a){a=B(a)?a:t.values(a);for(var h=0,i=a.length;hf&&(f=d)}else b=v(b,c),t.each(a,function(a,c,d){e=b(a,c,d),(e>g||e===-(1/0)&&f===-(1/0))&&(f=a,g=e)});return f},t.min=function(a,b,c){var d,e,f=1/0,g=1/0;if(null==b&&null!=a){a=B(a)?a:t.values(a);for(var h=0,i=a.length;hd||void 0===c)return 1;if(cb?(g&&(clearTimeout(g),g=null),h=j,f=a.apply(d,e),g||(d=e=null)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},t.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=t.now()-g;j=0?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),d||(f=e=null)))};return function(){f=this,e=arguments,g=t.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},t.wrap=function(a,b){return t.partial(b,a)},t.negate=function(a){return function(){return!a.apply(this,arguments)}},t.compose=function(){var a=arguments,b=a.length-1;return function(){for(var c=b,d=a[b].apply(this,arguments);c--;)d=a[c].call(this,d);return d}},t.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}},t.before=function(a,b){var c;return function(){return--a>0&&(c=b.apply(this,arguments)),a<=1&&(b=null),c}},t.once=t.partial(t.before,2);var F=!{toString:null}.propertyIsEnumerable("toString"),G=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];t.keys=function(a){if(!t.isObject(a))return[];if(p)return p(a);var b=[];for(var c in a)t.has(a,c)&&b.push(c);return F&&e(a,b),b},t.allKeys=function(a){if(!t.isObject(a))return[];var b=[];for(var c in a)b.push(c);return F&&e(a,b),b},t.values=function(a){for(var b=t.keys(a),c=b.length,d=Array(c),e=0;e":">",'"':""","'":"'","`":"`"},J=t.invert(I),K=function(a){var b=function(b){return a[b]},c="(?:"+t.keys(a).join("|")+")",d=RegExp(c),e=RegExp(c,"g");return function(a){return a=null==a?"":""+a,d.test(a)?a.replace(e,b):a}};t.escape=K(I),t.unescape=K(J),t.result=function(a,b,c){var d=null==a?void 0:a[b];return void 0===d&&(d=c),t.isFunction(d)?d.call(a):d};var L=0;t.uniqueId=function(a){var b=++L+"";return a?a+b:b},t.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var M=/(.)^/,N={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,P=function(a){return"\\"+N[a]};t.template=function(a,b,c){!b&&c&&(b=c),b=t.defaults({},b,t.templateSettings);var d=RegExp([(b.escape||M).source,(b.interpolate||M).source,(b.evaluate||M).source].join("|")+"|$","g"),e=0,f="__p+='";a.replace(d,function(b,c,d,g,h){return f+=a.slice(e,h).replace(O,P),e=h+b.length,c?f+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'":d?f+="'+\n((__t=("+d+"))==null?'':__t)+\n'":g&&(f+="';\n"+g+"\n__p+='"),b}),f+="';\n",b.variable||(f="with(obj||{}){\n"+f+"}\n"),f="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+f+"return __p;\n";try{var g=new Function(b.variable||"obj","_",f)}catch(h){throw h.source=f,h}var i=function(a){return g.call(this,a,t)},j=b.variable||"obj";return i.source="function("+j+"){\n"+f+"}",i},t.chain=function(a){var b=t(a);return b._chain=!0,b};var Q=function(a,b){return a._chain?t(b).chain():b};t.mixin=function(a){t.each(t.functions(a),function(b){var c=t[b]=a[b];t.prototype[b]=function(){var a=[this._wrapped];return k.apply(a,arguments),Q(this,c.apply(t,a))}})},t.mixin(t),t.each(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=h[a];t.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!==a&&"splice"!==a||0!==c.length||delete c[0],Q(this,c)}}),t.each(["concat","join","slice"],function(a){var b=h[a];t.prototype[a]=function(){return Q(this,b.apply(this._wrapped,arguments))}}),t.prototype.value=function(){return this._wrapped},t.prototype.valueOf=t.prototype.toJSON=t.prototype.value,t.prototype.toString=function(){return""+this._wrapped},"function"==typeof c&&c.amd&&c("underscore",[],function(){return t})}.call(this),c("jquery",[],function(){return jQuery}),function(a){var d="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global;if("function"==typeof c&&c.amd)c("backbone",["underscore","jquery","exports"],function(b,c,e){d.Backbone=a(d,e,b,c)});else if("undefined"!=typeof exports){var e,f=b("underscore");try{e=b("jquery")}catch(g){}a(d,exports,f,e)}else d.Backbone=a(d,{},d._,d.jQuery||d.Zepto||d.ender||d.$)}(function(a,b,c,d){var e=a.Backbone,f=Array.prototype.slice;b.VERSION="1.3.3",b.$=d,b.noConflict=function(){return a.Backbone=e,this},b.emulateHTTP=!1,b.emulateJSON=!1;var g=function(a,b,d){switch(a){case 1:return function(){return c[b](this[d])};case 2:return function(a){return c[b](this[d],a)};case 3:return function(a,e){return c[b](this[d],i(a,this),e)};case 4:return function(a,e,f){return c[b](this[d],i(a,this),e,f)};default:return function(){var a=f.call(arguments);return a.unshift(this[d]),c[b].apply(c,a)}}},h=function(a,b,d){c.each(b,function(b,e){c[e]&&(a.prototype[e]=g(b,e,d))})},i=function(a,b){return c.isFunction(a)?a:c.isObject(a)&&!b._isModel(a)?j(a):c.isString(a)?function(b){return b.get(a)}:a},j=function(a){var b=c.matches(a);return function(a){return b(a.attributes)}},k=b.Events={},l=/\s+/,m=function(a,b,d,e,f){var g,h=0;if(d&&"object"==typeof d){void 0!==e&&"context"in f&&void 0===f.context&&(f.context=e);for(g=c.keys(d);hthis.length&&(e=this.length),e<0&&(e+=this.length+1);var f,g,h=[],i=[],j=[],k=[],l={},m=b.add,n=b.merge,o=b.remove,p=!1,q=this.comparator&&null==e&&b.sort!==!1,r=c.isString(this.comparator)?this.comparator:null;for(g=0;g7),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(L,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var b=this.root.slice(0,-1)||"/";return this.location.replace(b+"#"+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 d=document.body,e=d.insertBefore(this.iframe,d.firstChild).contentWindow;e.document.open(),e.document.close(),e.location.hash="#"+this.fragment}var f=window.addEventListener||function(a,b){return attachEvent("on"+a,b)};if(this._usePushState?f("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?f("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var a=window.removeEventListener||function(a,b){return detachEvent("on"+a,b)};this._usePushState?a("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&a("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),J.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(a){var b=this.getFragment();return b===this.fragment&&this.iframe&&(b=this.getHash(this.iframe.contentWindow)),b!==this.fragment&&(this.iframe&&this.navigate(b),void this.loadUrl())},loadUrl:function(a){return!!this.matchRoot()&&(a=this.fragment=this.getFragment(a),c.some(this.handlers,function(b){if(b.route.test(a))return b.callback(a),!0}))},navigate:function(a,b){if(!J.started)return!1;b&&b!==!0||(b={trigger:!!b}),a=this.getFragment(a||"");var c=this.root;""!==a&&"?"!==a.charAt(0)||(c=c.slice(0,-1)||"/");var d=c+a;if(a=this.decodeFragment(a.replace(M,"")),this.fragment!==a){if(this.fragment=a,this._usePushState)this.history[b.replace?"replaceState":"pushState"]({},document.title,d);else{if(!this._wantsHashChange)return this.location.assign(d);if(this._updateHash(this.location,a,b.replace),this.iframe&&a!==this.getHash(this.iframe.contentWindow)){var e=this.iframe.contentWindow;b.replace||(e.document.open(),e.document.close()),this._updateHash(e.location,a,b.replace)}}return b.trigger?this.loadUrl(a):void 0}},_updateHash:function(a,b,c){if(c){var d=a.href.replace(/(javascript:|#).*$/,"");a.replace(d+"#"+b)}else a.hash="#"+b}}),b.history=new J;var N=function(a,b){var d,e=this;return d=a&&c.has(a,"constructor")?a.constructor:function(){return e.apply(this,arguments)},c.extend(d,e,b),d.prototype=c.create(e.prototype,a),d.prototype.constructor=d,d.__super__=e.prototype,d};t.extend=v.extend=E.extend=A.extend=J.extend=N;var O=function(){throw new Error('A "url" property or function must be specified')},P=function(a,b){var c=b.error;b.error=function(d){c&&c.call(b.context,a,d,b),a.trigger("error",a,d,b)}};return b}),function(a){"function"==typeof c&&c.amd?c("backboneUndo",["underscore","backbone"],a):"undefined"!=typeof exports?module.exports=a(b("underscore"),b("backbone")):a(_,Backbone)}(function(a,b){function c(a,b,c){return c.length<=4?a.call(b,c[0],c[1],c[2],c[3]):a.apply(b,c)}function d(a,b){return n.call(a,b)}function e(b,c){return null!=b&&(a.isArray(c)||(c=d(arguments,1)),a.all(c,function(a){return a in b}))}function f(){this.registeredObjects=[],this.cidIndexes=[]}function g(b,c,d,e){for(var f,g=0,h=c.length;ga.maximumStackLength&&(a.shift(),a.pointer--)}}}function l(){}function m(b,c,d,f){if("object"==typeof c)return a.each(c,function(a,c){2===b?m(b,a,d,f):m(b,c,a,d)});switch(b){case 0:e(d,"undo","redo","on")&&a.all(a.pick(d,"undo","redo","on"),a.isFunction)&&(f[c]=d);break;case 1:f[c]&&a.isObject(d)&&(f[c]=a.extend({},f[c],d));break;case 2:delete f[c]}return this}var n=Array.prototype.slice,o=function(){function b(){d++,c=!0,a.defer(function(){c=!1})}var c=!1,d=-1;return function(){return c||b(),d}}();f.prototype={isRegistered:function(b){return b&&b.cid?this.registeredObjects[b.cid]:a.contains(this.registeredObjects,b)},register:function(a){return!this.isRegistered(a)&&(a&&a.cid?(this.registeredObjects[a.cid]=a,this.cidIndexes.push(a.cid)):this.registeredObjects.push(a),!0)},unregister:function(b){if(this.isRegistered(b)){if(b&&b.cid)delete this.registeredObjects[b.cid],this.cidIndexes.splice(a.indexOf(this.cidIndexes,b.cid),1);else{var c=a.indexOf(this.registeredObjects,b);this.registeredObjects.splice(c,1)}return!0}return!1},get:function(){return a.map(this.cidIndexes,function(a){return this.registeredObjects[a]},this).concat(this.registeredObjects)}};var p={add:{undo:function(a,b,c,d){a.remove(c,d)},redo:function(a,b,c,d){d.index&&(d.at=d.index),a.add(c,d)},on:function(b,c,d){return{object:c,before:void 0,after:b,options:a.clone(d)}}},remove:{undo:function(a,b,c,d){"index"in d&&(d.at=d.index),a.add(b,d)},redo:function(a,b,c,d){a.remove(b,d)},on:function(b,c,d){return{object:c,before:b,after:void 0,options:a.clone(d)}}},change:{undo:function(b,c,d,e){a.isEmpty(c)?a.each(a.keys(d),b.unset,b):(b.set(c),e&&e.unsetData&&e.unsetData.before&&e.unsetData.before.length&&a.each(e.unsetData.before,b.unset,b))},redo:function(b,c,d,e){a.isEmpty(d)?a.each(a.keys(c),b.unset,b):(b.set(d),e&&e.unsetData&&e.unsetData.after&&e.unsetData.after.length&&a.each(e.unsetData.after,b.unset,b))},on:function(b,c){var d=b.changedAttributes(),e=a.keys(d),f=a.pick(b.previousAttributes(),e),g=a.keys(f),h=(c||(c={})).unsetData={after:[],before:[]};return e.length!=g.length&&(e.length>g.length?a.each(e,function(a){a in f||h.before.push(a)},this):a.each(g,function(a){a in d||h.after.push(a)})),{object:b,before:f,after:d,options:a.clone(c)}}},reset:{undo:function(a,b,c){a.reset(b)},redo:function(a,b,c){a.reset(c)},on:function(b,c){return{object:b,before:c.previousModels,after:a.clone(b.models)}}}};l.prototype=p;var q=b.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(a){h("undo",this.attributes)},redo:function(a){h("redo",this.attributes)}}),r=b.Collection.extend({model:q,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(a){this.maximumStackLength=a}}),s=b.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(b){this.stack=new r,this.objectRegistry=new f,this.undoTypes=new l,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(a,b){this.stack.setMaxLength(b)},this),b&&b.track&&this.startTracking(),b&&b.register&&(a.isArray(b.register)||a.isArguments(b.register)?c(this.register,this,b.register):this.register(b.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(a){k(this.stack,a,d(arguments,1),this.undoTypes)},register:function(){g("on",arguments,this._addToStack,this)},unregister:function(){g("off",arguments,this._addToStack,this)},unregisterAll:function(){c(this.unregister,this,this.objectRegistry.get())},undo:function(a){i("undo",this,this.stack,a)},undoAll:function(){i("undo",this,this.stack,!1,!0)},redo:function(a){i("redo",this,this.stack,a)},redoAll:function(){i("redo",this,this.stack,!1,!0)},isAvailable:function(a){var b=this.stack,c=b.length;switch(a){case"undo":return c>0&&b.pointer>-1;case"redo":return c>0&&b.pointer0;for(f in v)(!v[f]&&b(e.mods,+f)>-1||v[f]&&b(e.mods,+f)==-1)&&(i=!1);(0!=e.mods.length||v[16]||v[18]||v[17]||v[91])&&!i||e.method(a,e)===!1&&(a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.cancelBubble&&(a.cancelBubble=!0))}}function f(a){var c,d=a.keyCode,e=b(A,d);if(e>=0&&A.splice(e,1),93!=d&&224!=d||(d=91),d in v){v[d]=!1;for(c in x)x[c]==d&&(h[c]=!1)}}function g(){for(t in v)v[t]=!1;for(t in x)h[t]=!1}function h(a,b,c){var d,e;d=p(a),void 0===c&&(c=b,b="all");for(var f=0;f1&&(e=q(a),a=[a[a.length-1]]),a=a[0],a=z(a),a in u||(u[a]=[]),u[a].push({shortcut:d[f],scope:b,method:c,key:d[f],mods:e})}function i(a,b){var d,e,f,g,h,i=[];for(d=p(a),g=0;g1&&(i=q(e),a=e[e.length-1]),a=z(a),void 0===b&&(b=n()),!u[a])return;for(f=0;fg||g>h+j-e||i+e>f||f>i+k-e)&&(d=1),!!d},findPosition:function(a,b,c){for(var d={index:0,method:"before"},e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=a.length;mf||h&&j>=h||e&&gg?d.h=Math.round(d.w/g):d.w=Math.round(d.h*g)}return~e.indexOf("l")&&(d.l=c.w-d.w),~e.indexOf("t")&&(d.t=c.h-d.h),d}}}}),c("Utils/main",["require","./Sorter","./Resizer"],function(a){var b=function(){var b=a("./Sorter"),c=a("./Resizer");return{name:"Utils",init:function(){return this},Sorter:b,Resizer:c}};return b}),c("Utils",["Utils/main"],function(a){return a}),c("StorageManager/config/config",[],function(){return{id:"gjs-",autosave:1,autoload:1,type:"local",stepsBeforeSave:1,storeComponents:!1,storeStyles:!1,storeHtml:!0,storeCss:!0,checkLocal:!0,params:{},urlStore:"",urlLoad:"",beforeSend:function(a,b){},onComplete:function(a,b){}}}),c("StorageManager/model/LocalStorage",["backbone"],function(a){return a.Model.extend({defaults:{checkLocal:!0},store:function(a){this.checkStorageEnvironment();for(var b in a)localStorage.setItem(b,a[b])},load:function(a){this.checkStorageEnvironment();for(var b={},c=0,d=a.length;c/im,j=/]*>\s*([\s\S]+)\s*<\/body>/im,k="undefined"!=typeof location&&location.href,l=k&&location.protocol&&location.protocol.replace(/\:/,""),m=k&&location.hostname,n=k&&(location.port||void 0),o={},p=a.config&&a.config()||{};return c={version:"2.0.12",strip:function(a){if(a){a=a.replace(i,"");var b=a.match(j);b&&(a=b[1])}else a="";return a},jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var a,b,c;if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)for(b=0;b<3;b+=1){c=h[b];try{a=new ActiveXObject(c)}catch(d){}if(a){h=[c];break}}return a},parseName:function(a){var b,c,d,e=!1,f=a.indexOf("."),g=0===a.indexOf("./")||0===a.indexOf("../");return f!==-1&&(!g||f>1)?(b=a.substring(0,f),c=a.substring(f+1,a.length)):b=a,d=c||b,f=d.indexOf("!"),f!==-1&&(e="strip"===d.substring(f+1),d=d.substring(0,f),c?c=d:b=d),{moduleName:b,ext:c,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,d,e){var f,g,h,i=c.xdRegExp.exec(a);return!i||(f=i[2],g=i[3],g=g.split(":"),h=g[1],g=g[0],!(f&&f!==b||g&&g.toLowerCase()!==d.toLowerCase()||(h||g)&&h!==e))},finishLoad:function(a,b,d,e){d=b?c.strip(d):d,p.isBuild&&(o[a]=d),e(d)},load:function(a,b,d,e){if(e&&e.isBuild&&!e.inlineText)return void d();p.isBuild=e&&e.isBuild;var f=c.parseName(a),g=f.moduleName+(f.ext?"."+f.ext:""),h=b.toUrl(g),i=p.useXhr||c.useXhr;return 0===h.indexOf("empty:")?void d():void(!k||i(h,l,m,n)?c.get(h,function(b){c.finishLoad(a,f.strip,b,d)},function(a){d.error&&d.error(a)}):b([g],function(a){c.finishLoad(f.moduleName+"."+f.ext,f.strip,a,d)}))},write:function(a,b,d,e){if(o.hasOwnProperty(b)){var f=c.jsEscape(o[b]);d.asModule(a+"!"+b,"define(function () { return '"+f+"';});\n")}},writeFile:function(a,b,d,e,f){var g=c.parseName(b),h=g.ext?"."+g.ext:"",i=g.moduleName+h,j=d.toUrl(g.moduleName+h)+".js";c.load(i,d,function(b){var d=function(a){return e(j,a)};d.asModule=function(a,b){return e.asModule(a,j,b)},c.write(a,i,d,f)},f)}},"node"===p.env||!p.env&&"undefined"!=typeof process&&process.versions&&process.versions.node&&!process.versions["node-webkit"]?(d=b.nodeRequire("fs"),c.get=function(a,b,c){try{var e=d.readFileSync(a,"utf8");0===e.indexOf("\ufeff")&&(e=e.substring(1)),b(e)}catch(f){c&&c(f)}}):"xhr"===p.env||!p.env&&c.createXhr()?c.get=function(a,b,d,e){var f,g=c.createXhr();if(g.open("GET",a,!0),e)for(f in e)e.hasOwnProperty(f)&&g.setRequestHeader(f.toLowerCase(),e[f]);p.onXhr&&p.onXhr(g,a),g.onreadystatechange=function(c){var e,f;4===g.readyState&&(e=g.status||0,e>399&&e<600?(f=new Error(a+" HTTP status: "+e),f.xhr=g,d&&d(f)):b(g.responseText),p.onXhrComplete&&p.onXhrComplete(g,a))},g.send(null)}:"rhino"===p.env||!p.env&&"undefined"!=typeof Packages&&"undefined"!=typeof java?c.get=function(a,b){var c,d,e="utf-8",f=new java.io.File(a),g=java.lang.System.getProperty("line.separator"),h=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(f),e)),i="";try{for(c=new java.lang.StringBuffer,d=h.readLine(),d&&d.length()&&65279===d.charAt(0)&&(d=d.substring(1)),null!==d&&c.append(d);null!==(d=h.readLine());)c.append(g),c.append(d);i=String(c.toString())}finally{h.close()}b(i)}:("xpconnect"===p.env||!p.env&&"undefined"!=typeof Components&&Components.classes&&Components.interfaces)&&(e=Components.classes,f=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),g="@mozilla.org/windows-registry-key;1"in e,c.get=function(a,b){var c,d,h,i={};g&&(a=a.replace(/\//g,"\\")),h=new FileUtils.File(a);try{c=e["@mozilla.org/network/file-input-stream;1"].createInstance(f.nsIFileInputStream),c.init(h,1,0,!1),d=e["@mozilla.org/intl/converter-input-stream;1"].createInstance(f.nsIConverterInputStream),d.init(c,"utf-8",c.available(),f.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),d.readString(c.available(),i),d.close(),c.close(),b(i.value)}catch(j){throw new Error((h&&h.path||"")+": "+j)}}),c}),c("text!DeviceManager/template/devices.html",[],function(){return'
<%= deviceLabel %>
\n
\n \n \n \n
\n
\n
\n
\n'}),c("DeviceManager/view/DevicesView",["backbone","text!./../template/devices.html"],function(a,b){return a.View.extend({template:_.template(b),events:{change:"updateDevice"},initialize:function(a){this.config=a.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 a=this.em;if(a){var b=this.devicesEl,c=b?b.val():"";a.set("device",c)}},updateSelect:function(){var a=this.em,b=this.devicesEl;if(a&&a.getDeviceModel&&b){var c=a.getDeviceModel(),d=c?c.get("name"):"";b.val(d)}},getOptions:function(){var a="";return this.collection.each(function(b){var c=b.get("name");a+='"}),a},render:function(){var a=this.ppfx;return this.$el.html(this.template({ppfx:a,deviceLabel:this.config.deviceLabel})),this.devicesEl=this.$el.find("."+a+"devices"),this.devicesEl.append(this.getOptions()),this.el.className=a+"devices-c",this}})}),c("DeviceManager/main",["require","./config/config","./model/Devices","./view/DevicesView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Devices"),g=a("./view/DevicesView");return{name:"DeviceManager",init:function(a){d=a||{};for(var h in e)h in d||(d[h]=e[h]);return b=new f(d.devices),c=new g({collection:b,config:d}),this},add:function(a,c,d){var e=d||{};return e.name=a,e.width=c,b.add(e)},get:function(a){return b.get(a)},getAll:function(){return b},render:function(){return c.render().el}}}}),c("DeviceManager",["DeviceManager/main"],function(a){return a}),c("Parser/config/config",[],function(){return{textTags:["br","b","i","u"]}}),c("Parser/model/ParserCss",["require"],function(a){return function(a){return{parseSelector:function(a){for(var b=[],c=a.split(","),d=0,e=c.length;d\n
<%= label %>
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n\n
\n
\n \n \n
\n
\n
Selected
\n
\n
\n
\n'}),c("text!SelectorManager/template/classTag.html",[],function(){return'\n \n />\n \n'}),c("SelectorManager/view/ClassTagView",["backbone","text!./../template/classTag.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.config=a.config||{},this.coll=a.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 a=this.$labelInput.val(),b=this.model.escapeName(a);if(this.target){var c=this.target.get("SelectorManager");c&&(c.get(b)?this.$labelInput.val(this.model.get("label")):this.model.set({name:b,label:a}))}this.$labelInput.prop(this.inputProp,!0)},changeStatus:function(){this.model.set("active",!this.model.get("active")),this.target.trigger("targetClassUpdated")},removeTag:function(a){var b=this.target.get("selectedComponent");b&&b.get("classes").remove(this.model),this.coll&&(this.coll.remove(this.model),this.target.trigger("targetClassRemoved")),this.remove()},updateStatus:function(){this.$chk||(this.$chk=this.$el.find("#"+this.pfx+"checkbox")),this.model.get("active")?(this.$chk.removeClass("fa-circle-o").addClass("fa-dot-circle-o"),this.$el.removeClass("opac50")):(this.$chk.removeClass("fa-dot-circle-o").addClass("fa-circle-o"),this.$el.addClass("opac50"))},updateInputLabel:function(){this.$labelInput||(this.$labelInput=this.$el.find("input"));var a=this.$labelInput.val().length-1;a=a<1?1:a,this.$labelInput.attr("size",a)},render:function(){return this.$el.html(this.template({label:this.model.get("label"),pfx:this.pfx,ppfx:this.ppfx,inputProp:this.inputProp})),this.updateStatus(),this.$el.attr("class",this.className),this.updateInputLabel(),this}})}),c("SelectorManager/view/ClassTagsView",["backbone","text!./../template/classTags.html","./ClassTagView"],function(a,b,c){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.config=a.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(a){this.updateStateVis()},getStateOptions:function(){for(var a="",b=0;b'+this.states[b].label+"";return a},addNew:function(a){this.addToClasses(a)},startNewTag:function(a){this.$addBtn.hide(),this.$input.show().focus()},endNewTag:function(a){this.$addBtn.show(),this.$input.hide().val("")},onInputKeyUp:function(a){13===a.keyCode?this.addNewTag(this.$input.val()):27===a.keyCode&&this.endNewTag()},componentChanged:function(a){this.compTarget=this.target.get("selectedComponent"),this.compTarget&&this.getStates().val(this.compTarget.get("state"));var b=this.compTarget?this.compTarget.get("classes").models:[];this.collection.reset(b),this.updateStateVis()},updateStateVis:function(){this.collection.length?this.getStatesC().css("display","block"):this.getStatesC().css("display","none"),this.updateSelector()},updateSelector:function(){if(this.compTarget=this.target.get("selectedComponent"),this.compTarget&&this.compTarget.get){var a="",b=this.compTarget.get("classes");b.each(function(b){b.get("active")&&(a+="."+b.get("name"))});var c=this.compTarget.get("state");a=c?a+":"+c:a;var d=this.el.querySelector("#"+this.pfx+"sel");d&&(d.innerHTML=a)}},stateChanged:function(a){this.compTarget&&(this.compTarget.set("state",this.$states.val()),this.target&&this.target.trigger("targetStateUpdated"),this.updateSelector())},addNewTag:function(a){if(a){if(this.target){var b=this.target.get("SelectorManager"),c=b.add(a);if(this.compTarget){var d=this.compTarget.get("classes"),e=d.length;d.add(c);var f=d.length;this.collection.add(c),f>e&&this.target.trigger("targetClassAdded"),this.updateStateVis()}}this.endNewTag()}},addToClasses:function(a,b){var d=b||null,e=new c({model:a,config:this.config,coll:this.collection}),f=e.render().el;return d?d.appendChild(f):this.getClasses().append(f),f},renderClasses:function(){var a=document.createDocumentFragment();return this.collection.each(function(b){this.addToClasses(b,a)},this),this.getClasses()&&this.getClasses().empty().append(a),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(){return this.$el.html(this.template({label:this.config.label,statesLabel:this.config.statesLabel,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}})}),c("SelectorManager/main",["require","./config/config","./model/Selectors","./view/ClassTagsView"],function(a){return function(b){var c=b||{},d=a("./config/config");Selectors=a("./model/Selectors"),ClassTagsView=a("./view/ClassTagsView");var e,f;return{name:"SelectorManager",init:function(a){c=a||{};for(var b in d)b in c||(c[b]=d[b]);var g=c.pStylePrefix;return g&&(c.stylePrefix=g+c.stylePrefix),e=new Selectors(c.selectors),f=new ClassTagsView({collection:e,config:c}),this},add:function(a,b){var c=b||{};return c.name=a.name||a,e.add(c)},get:function(a){return e.where({name:a})[0]},getAll:function(){return e},render:function(a){if(a){var b=new ClassTagsView({collection:new Selectors(a),config:c});return b.render().el}return f.render().el}}}}),c("SelectorManager",["SelectorManager/main"],function(a){return a}),c("ModalDialog/config/config",[],function(){return{stylePrefix:"mdl-",title:"",content:"",backdrop:!0}}),c("ModalDialog/model/Modal",["backbone"],function(a){return a.Model.extend({defaults:{title:"",content:"",open:!1}})}),c("text!ModalDialog/template/modal.html",[],function(){return'
\n\t
\n\t\t
<%= title %>
\n\t\t
\n\t
\n\t
\n\t\t
<%= content %>
\n\t\t
\n\t
\n
\n
'}),c("ModalDialog/view/ModalView",["backbone","text!./../template/modal.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.config=a.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()},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 a=this.getContent();a&&a.html(this.model.get("content")); @@ -11,7 +11,7 @@ f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPe a.registerHelper("hintWords","css",x),a.defineMIME("text/css",{documentTypes:e,mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,tokenHooks:{"/":function(a,b){return!!a.eat("*")&&(b.tokenize=c,c(a,b))}},name:"css"}),a.defineMIME("text/x-scss",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},":":function(a){return!!a.match(/\s*\{/)&&[null,"{"]},$:function(a){return a.match(/^[\w-]+/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(a){return!!a.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),a.defineMIME("text/x-less",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},"@":function(a){return a.eat("{")?[null,"interpolation"]:!a.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),a.defineMIME("text/x-gss",{documentTypes:e,mediaTypes:g,mediaFeatures:i,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(a,b){return!!a.eat("*")&&(b.tokenize=c,c(a,b))}},name:"css",helperType:"gss"})}),function(a){"object"==typeof exports&&"object"==typeof module?a(b("../../lib/codemirror"),b("../xml/xml"),b("../javascript/javascript"),b("../css/css")):"function"==typeof c&&c.amd?c("codemirror/mode/htmlmixed/htmlmixed",["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){var d=a.current(),e=d.search(b);return e>-1?a.backUp(d.length-e):d.match(/<\/?$/)&&(a.backUp(d.length),a.match(b,!1)||a.match(d)),c}function c(a){var b=i[a];return b?b:i[a]=new RegExp("\\s+"+a+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function d(a,b){var d=a.match(c(b));return d?/^\s*(.*?)\s*$/.exec(d[2])[1]:""}function e(a,b){return new RegExp((b?"^":"")+"","i")}function f(a,b){for(var c in a)for(var d=b[c]||(b[c]=[]),e=a[c],f=e.length-1;f>=0;f--)d.unshift(e[f])}function g(a,b){for(var c=0;c\s\/]/.test(d.current())&&(h=f.htmlState.tagName&&f.htmlState.tagName.toLowerCase())&&k.hasOwnProperty(h))f.inTag=h+" ";else if(f.inTag&&m&&/>$/.test(d.current())){var n=/^([\S]+) (.*)/.exec(f.inTag);f.inTag=null;var o=">"==d.current()&&g(k[n[1]],n[2]),p=a.getMode(c,o),q=e(n[1],!0),r=e(n[1],!1);f.token=function(a,c){return a.match(q,!1)?(c.token=i,c.localState=c.localMode=null,null):b(a,r,c.localMode.token(a,c.localState))},f.localMode=p,f.localState=a.startState(p,j.indent(f.htmlState,""))}else f.inTag&&(f.inTag+=d.current(),d.eol()&&(f.inTag+=" "));return l}var j=a.getMode(c,{name:"xml",htmlMode:!0,multilineTagIndentFactor:d.multilineTagIndentFactor,multilineTagIndentPastTag:d.multilineTagIndentPastTag}),k={},l=d&&d.tags,m=d&&d.scriptTypes;if(f(h,k),l&&f(l,k),m)for(var n=m.length-1;n>=0;n--)k.script.unshift(["type",m[n].matches,m[n].mode]);return{startState:function(){var b=a.startState(j);return{token:i,inTag:null,localMode:null,localState:null,htmlState:b}},copyState:function(b){var c;return b.localState&&(c=a.copyState(b.localMode,b.localState)),{token:b.token,inTag:b.inTag,localMode:b.localMode,localState:c,htmlState:a.copyState(j,b.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c){return!b.localMode||/^\s*<\//.test(c)?j.indent(b.htmlState,c):b.localMode.indent?b.localMode.indent(b.localState,c):a.Pass},innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||j}}}},"xml","javascript","css"),a.defineMIME("text/html","htmlmixed")}),function(a){"object"==typeof exports&&"object"==typeof module?a(b("codemirror/lib/codemirror")):"function"==typeof c&&c.amd?c("formatting",["codemirror/lib/codemirror"],a):a(CodeMirror)}(function(a){a.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(a,b){return/^[;{}]$/.test(b)}}),a.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(a,b,c,d){return this.jsonMode?/^[\[,{]$/.test(b)||/^}/.test(c):(";"!=b||!d.lexical||")"!=d.lexical.type)&&(/^[;{}]$/.test(b)&&!/^;/.test(c))}});var b=/^(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)$/;a.extendMode("xml",{commentStart:"",newlineAfterToken:function(a,c,d,e){var f=!1;return"html"==this.configuration&&(f=!!e.context&&b.test(e.context.tagName)),!f&&("tag"==a&&/>$/.test(c)&&e.context||/^-1&&h>-1&&h>g&&(a=a.substr(0,g)+a.substring(g+f.commentStart.length,h)+a.substr(h+f.commentEnd.length)),e.replaceRange(a,c,d)}})}),a.defineExtension("autoIndentRange",function(a,b){var c=this;this.operation(function(){for(var d=a.line;d<=b.line;d++)c.indentLine(d,"smart")})}),a.defineExtension("autoFormatRange",function(b,c){function d(){j+="\n",l=!0,++k}for(var e=this,f=e.getMode(),g=e.getRange(b,c).split("\n"),h=a.copyState(f,e.getTokenAt(b).state),i=e.getOption("tabSize"),j="",k=0,l=0===b.ch,m=0;m\n\t
<%= label %>
\n\t
\n\n'}),c("CodeManager/view/EditorView",["backbone","text!./../template/editor.html"],function(a,b){return a.View.extend({template:_.template(b),initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix},render:function(){var a=this.model.toJSON();return a.pfx=this.pfx,this.$el.html(this.template(a)),this.$el.attr("class",this.pfx+"editor-c"),this.$el.find("#"+this.pfx+"code").html(this.model.get("input")),this}})}),c("CodeManager/main",["require","./config/config","./model/HtmlGenerator","./model/CssGenerator","./model/JsonGenerator","./model/CodeMirrorEditor","./view/EditorView"],function(a){var b=function(){var b={},c=a("./config/config"),d=a("./model/HtmlGenerator"),e=a("./model/CssGenerator"),f=a("./model/JsonGenerator"),g=a("./model/CodeMirrorEditor"),h=a("./view/EditorView"),i={},j={},k={},l={};return{getConfig:function(){return b},config:b,EditorView:h,name:"CodeManager",init:function(a){b=a||{};for(var h in c)h in b||(b[h]=c[h]);var i=b.pStylePrefix;return i&&(b.stylePrefix=i+b.stylePrefix),j.html=new d,j.css=new e,j.json=new f,l.CodeMirror=new g,this},onLoad:function(){this.loadDefaultGenerators().loadDefaultViewers()},addGenerator:function(a,b){return i[a]=b,this},getGenerator:function(a){return i[a]||null},getGenerators:function(){return i},addViewer:function(a,b){return k[a]=b,this},getViewer:function(a){return k[a]||null},getViewers:function(){return k},updateViewer:function(a,b){a.setContent(b)},getCode:function(a,b,c){var d=this.getGenerator(b);return d?d.build(a,c):""},loadDefaultGenerators:function(){for(var a in j)this.addGenerator(a,j[a]);return this},loadDefaultViewers:function(){for(var a in l)this.addViewer(a,l[a]);return this}}};return b}),c("CodeManager",["CodeManager/main"],function(a){return a}),c("Panels/config/config",[],function(){var a="create-comp",b="move-comp",c="sw-visibility",d="export-template",e="open-sm",f="open-tm",g="open-layers",h="open-blocks",i="fullscreen",j="preview";return{stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{id:a,command:a,className:"fa fa-pencil-square-o",attributes:{title:"Create element"},stopDefaultCommand:1},{id:b,command:b,className:"fa fa-arrows",attributes:{title:"Move elements"},stopDefaultCommand:1}]},{id:"options",buttons:[{active:!0,id:c,className:"fa fa-square-o",command:c,context:c,attributes:{title:"View components"}},{id:j,className:"fa fa-eye",command:j,context:j,stopDefaultCommand:1,attributes:{title:"Preview"}},{id:i,className:"fa fa-arrows-alt",command:i,context:i,attributes:{title:"Fullscreen"}},{id:d,className:"fa fa-code",command:d,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:e,className:"fa fa-paint-brush",command:e,active:!0,attributes:{title:"Open Style Manager"}},{id:f,className:"fa fa-cog",command:f,attributes:{title:"Settings"}},{id:g,className:"fa fa-bars",command:g,attributes:{title:"Open Layer Manager"}},{id:h,className:"fa fa-th-large",command:h,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300}}),c("Panels/model/Button",["backbone","require"],function(a,b){return a.Model.extend({defaults:{id:"",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,runDefaultCommand:!0,stopDefaultCommand:!1},initialize:function(a){if(this.get("buttons").length){var c=b("./Buttons");this.set("buttons",new c(this.get("buttons")))}}})}),c("Panels/model/Buttons",["backbone","./Button"],function(a,b){return a.Collection.extend({model:b,deactivateAllExceptOne:function(a,b){this.forEach(function(c,d){c!==a&&(c.set("active",!1),b&&c.get("buttons").length&&c.get("buttons").deactivateAllExceptOne(a,b))})},deactivateAll:function(a){var b=a||"";this.forEach(function(a,c){a.get("context")==b&&(a.set("active",!1),a.get("buttons").length&&a.get("buttons").deactivateAll(b))})}})}),c("Panels/model/Panel",["backbone","./Buttons"],function(a,b){return a.Model.extend({defaults:{id:"",content:"",visible:!0,buttons:[]},initialize:function(a){this.btn=this.get("buttons")||[],this.buttons=new b(this.btn),this.set("buttons",this.buttons)}})}),c("Panels/model/Panels",["backbone","./Panel"],function(a,b){return a.Collection.extend({model:b})}),c("Panels/view/ButtonView",["backbone","require"],function(a,b){return a.View.extend({tagName:"span",initialize:function(a){_.bindAll(this,"startTimer","stopTimer","showButtons","hideButtons","closeOnKeyPress","onDrop","initSorter","stopDrag");var b=this.model.get("className");this.config=a.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=a.parentM||null,this.className=this.pfx+"btn"+(b?" "+b:""),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 a=this.em.Canvas;this.canvasEl=a.getBody(),this.sorter=new this.em.Utils.Sorter({container:this.canvasEl,placer:a.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onMove:this.onDrag,onEndMove:this.onDrop,document:a.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1});var b=a.getOffset();this.sorter.offTop=b.top,this.sorter.offLeft=b.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(a){},onDrop:function(a){this.canvasEl.style.cursor="default"},updateClassName:function(){var a=this.model.get("className");this.$el.attr("class",this.pfx+"btn"+(a?" "+a:""))},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(a){a&&$(a.target).trigger("click"),this.model.set("bntsVis",!1),$(document).off("mousedown",this.hideButtons),$(document).off("keypress",this.closeOnKeyPress)},closeOnKeyPress:function(a){var b=a.which||a.keyCode;27==b&&this.hideButtons()},updateActive:function(){var a=null,b=this.em&&this.em.get?this.em.get("Editor"):null,c=this.model.get("command");this.commands&&"string"==typeof c?a=this.commands.get(c):null!==c&&"object"==typeof c?a=c:"function"==typeof c&&(a={run:c}),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"),a&&a.run&&(a.run(b,this.model,this.model.get("options")),b.trigger("run:"+c))):(this.$el.removeClass(this.activeCls),this.model.collection.deactivateAll(this.model.get("context")),this.parentM&&this.parentM.set("active",!1,{silent:!0}).trigger("checkActive"),a&&a.stop&&(a.stop(b,this.model,this.model.get("options")),b.trigger("stop:"+c)))},checkActive:function(){this.model.get("active")?this.$el.addClass(this.activeCls):this.$el.removeClass(this.activeCls)},clicked:function(a){if(!this.model.get("bntsVis")){this.parentM&&this.swapParent();var b=this.model.get("active");this.model.set("active",!b);this.em.get("Commands").get("select-comp");b?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 a=b("./ButtonsView"),c=new a({collection:this.model.get("buttons"),config:this.config,parentM:this.model});this.$buttons=c.render().$el,this.$buttons.append($("
",{"class":this.pfx+"arrow-l"})),this.$el.append(this.$buttons)}return this}})}),c("Panels/view/ButtonsView",["backbone","./ButtonView"],function(a,b){return a.View.extend({initialize:function(a){this.opt=a||{},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(a){this.addToCollection(a)},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,config:this.config,parentM:this.parentM}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g),g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",_.result(this,"className")),this}})}),c("Panels/view/PanelView",["backbone","./ButtonsView"],function(a,b){return a.View.extend({initialize:function(a){this.config=a.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"))},render:function(){if(this.$el.attr("class",_.result(this,"className")),this.id&&this.$el.attr("id",this.id),this.buttons.length){var a=new b({collection:this.buttons,config:this.config});this.$el.append(a.render().el)}return this.$el.append(this.model.get("content")),this}})}),c("Panels/view/PanelsView",["backbone","./PanelView"],function(a,b){return a.View.extend({initialize:function(a){this.opt=a||{},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(a){this.addToCollection(a)},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,config:this.config}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g),g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",_.result(this,"className")),this}})}),c("Panels/main",["require","./config/config","./model/Panel","./model/Panels","./view/PanelView","./view/PanelsView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Panel"),g=a("./model/Panels"),h=(a("./view/PanelView"),a("./view/PanelsView"));return{name:"Panels",init:function(a){d=a||{};for(var f in e)f in d||(d[f]=e[f]);var i=d.pStylePrefix;return i&&(d.stylePrefix=i+d.stylePrefix),b=new g(d.defaults),c=new h({collection:b,config:d}),this},getPanels:function(){return b},getPanelsEl:function(){return c.el},addPanel:function(a){return b.add(a)},getPanel:function(a){var c=b.where({id:a});return c.length?c[0]:null},addButton:function(a,b){var c=this.getPanel(a);return c?c.get("buttons").add(b):null},getButton:function(a,b){var c=this.getPanel(a);if(c){var d=c.get("buttons").where({id:b});return d.length?d[0]:null}return null},render:function(){return c.render().el},active:function(){this.getPanels().each(function(a){a.get("buttons").each(function(a){a.get("active")&&a.trigger("updateActive")})})},Panel:f}}}),c("Panels",["Panels/main"],function(a){return a}),c("RichTextEditor/config/config",[],function(){return{stylePrefix:"rte-",toolbarId:"toolbar",containerId:"wrapper",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}'}]}}),c("RichTextEditor/view/TextEditorView",["jquery"],function(a){var b=function(b){var c=a.Deferred(),d=new FileReader;return d.onload=function(a){c.resolve(a.target.result)},d.onerror=c.reject,d.onprogress=c.notify,d.readAsDataURL(b),c.promise()};return a.fn.cleanHtml=function(){var b=a(this).html();return b&&b.replace(/(
|\s|

<\/div>| )*$/,"")},a.fn.wysiwyg=function(c){var d,e,f,g=this,h=function(){var b=e.activeToolbarClass;b&&a(e.toolbarSelector).find(f).each(function(){var c=a(this),d=c.data(e.commandRole),f=g.get(0).ownerDocument;f.queryCommandState(d)?c.addClass(b):c.removeClass(b)})},i=function(a,b){var c=a.split(" "),d=c.shift(),e=c.join(" ")+(b||"");g.get(0).ownerDocument.execCommand("styleWithCSS",!1,!0),g.get(0).ownerDocument.execCommand(d,0,e),h(),g.trigger("change")},j=function(){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount)return a.getRangeAt(0)},k=function(){d=j()},l=function(){var a=window.getSelection();if(d){try{a.removeAllRanges()}catch(b){document.body.createTextRange().select(),document.selection.empty()}a.addRange(d)}},m=function(c){g.focus(),a.each(c,function(c,d){/^image\//.test(d.type)?a.when(b(d)).done(function(a){i("insertimage",a)}).fail(function(a){e.fileUploadError("file-reader",a)}):e.fileUploadError("unsupported-file-type",d.type)})},n=function(a,b){l(),document.queryCommandSupported("hiliteColor")&&document.execCommand("hiliteColor",0,b||"transparent"),k(),a.data(e.selectionMarker,b)},o=function(b,c){b.find(f).unbind().click(function(){l();var b=g.get(0).ownerDocument,d=a(this),e=d.data(c.commandRole),f=d.data("args");f?(f=f.replace("${content}",b.getSelection()),i(e,f)):b.execCommand(e),k()}),b.find("[data-toggle=dropdown]").click(l);var d="[data-"+c.commandRole+"]";b.find("select"+d).on("webkitspeechchange change",function(){var b=this.value;l(),b&&(g.focus(),i(a(this).data(c.commandRole),b)),k()}),b.find("input[type=text]"+d,", select"+d).on("webkitspeechchange change",function(){var b=this.value;this.value="",l(),b&&(g.focus(),i(a(this).data(c.commandRole),b)),k()}).on("focus",function(){var b=a(this);b.data(c.selectionMarker)||(n(b,c.selectionColor),b.focus())}).on("blur",function(){var b=a(this);b.data(c.selectionMarker)&&n(b,!1)}),b.find("input[type=file][data-"+c.commandRole+"]").change(function(){l(),"file"===this.type&&this.files&&this.files.length>0&&m(this.files),k(),this.value=""})},p=function(){g.on("dragenter dragover",!1).on("drop",function(a){var b=a.originalEvent.dataTransfer;a.stopPropagation(),a.preventDefault(),b&&b.files&&b.files.length>0&&m(b.files)})};if("string"==typeof c&&"destroy"==c)return g.attr("contenteditable",!1).unbind("mouseup keyup mouseout dragenter dragover"),a(window).unbind("touchend"),this;e=a.extend({},a.fn.wysiwyg.defaults,c);var q="[data-"+e.commandRole+"]";return f="a"+q+",button"+q+",input[type=button]"+q+", select"+q,e.dragAndDropImages&&p(),o(a(e.toolbarSelector),e),g.attr("contenteditable",!0).on("mouseup keyup mouseout",function(){k(),h()}),a(window).bind("touchend",function(a){var b=g.is(a.target)||g.has(a.target).length>0,c=j(),d=c&&c.startContainer===c.endContainer&&c.startOffset===c.endOffset;d&&!b||(k(),h())}),this},a.fn.wysiwyg.defaults={toolbarSelector:"[data-role=editor-toolbar]",commandRole:"edit",activeToolbarClass:"btn-info",selectionMarker:"edit-focus-marker",selectionColor:"darkgrey",dragAndDropImages:!0,fileUploadError:function(a,b){console.log("File upload error",a,b)}},a}),c("RichTextEditor/model/CommandButton",["backbone"],function(a){return a.Model.extend({idAttribute:"command",defaults:{command:"",type:"",title:"","class":"",options:[]},initialize:function(){var a=this.get("options");a.length&&this.set("type","select")}})}),c("RichTextEditor/model/CommandButtons",["backbone","./CommandButton"],function(a,b){return a.Collection.extend({model:b})}),c("RichTextEditor/view/CommandButtonView",["backbone"],function(a){return a.View.extend({tagName:"a",initialize:function(a,b){this.config=b||{},this.ppfx=this.config.pStylePrefix||"",this.className=this.config.stylePrefix+"btn "+this.model.get("class")},render:function(){return this.$el.addClass(this.className),this}})}),c("RichTextEditor/view/CommandButtonSelectView",["backbone","./CommandButtonView"],function(a,b){return b.extend({initialize:function(a,c){b.prototype.initialize.apply(this,arguments)},getInput:function(){var a=this.model;if(!this.input){var b=a.get("command"),c='",this.input=$(c)}return this.input},getInputCont:function(){var a=this.getInput(),b=this.ppfx,c=$('
');return c.append(a)},render:function(){return b.prototype.render.apply(this,arguments),this.$el.html(this.getInputCont()),this}})}),c("RichTextEditor/view/CommandButtonsView",["backbone","./CommandButtonView","./CommandButtonSelectView"],function(a,b,c){return a.View.extend({attributes:{"data-role":"editor-toolbar"},initialize:function(a){this.config=a.config||{};var b=this.config.stylePrefix||"";this.id=b+this.config.toolbarId,this.listenTo(this.collection,"add",this.addTo),this.$el.data("helper",1)},addTo:function(a){this.add(a)},add:function(a,d){var e=d||null,f=b;switch(a.get("type")){case"select":f=c}var g=a.get("args"),h={title:a.get("title"),"data-edit":a.get("command")};g&&(h["data-args"]=g);var i=new f({model:a,attributes:h},this.config),j=i.render().el;e?e.appendChild(j):this.$el.append(j)},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.add(b,a)},this),this.$el.append(a),this.$el.attr("id",this.id),this}})}),c("RichTextEditor/main",["require","./config/config","./view/TextEditorView","./model/CommandButtons","./view/CommandButtonsView"],function(a){return function(){var b,c,d,e,f={},g=a("./config/config"),h=(a("./view/TextEditorView"),a("./model/CommandButtons")),i=a("./view/CommandButtonsView");return{customRte:null,name:"rte",init:function(a){e=this,f=a||{};for(var j in g)j in f||(f[j]=g[j]);var k=f.pStylePrefix;return k&&(f.stylePrefix=k+f.stylePrefix),b=f.stylePrefix,d=new h(f.commands),c=new i({collection:d,config:f}),this},add:function(a,b){var c=b||{};return c.command=a,d.add(c)},get:function(a){return d.where({command:a})[0]},getAll:function(){return d},udpatePosition:function(){var a="px",b=f.em.get("Canvas"),d=b.getTargetToElementDim(c.el,this.lastEl,{event:"rteToolbarPosUpdate"}),e=c.el.style;e.top=d.top+a,e.left=d.left+a},attach:function(a,b){this.lastEl=a.el;var d=this.customRte;return d?b=d.enable(a.el,b):a.$el.wysiwyg({}).focus(),this.show(),f.em&&(setTimeout(this.udpatePosition.bind(this),0),f.em.off("change:canvasOffset",this.udpatePosition,this),f.em.on("change:canvasOffset",this.udpatePosition,this),f.em.off("canvasScroll",this.udpatePosition,this),f.em.on("canvasScroll",this.udpatePosition,this)),c.$el.on("mousedown",this.disableProp),b},detach:function(a,b){var d=this.customRte;d?(a.model.set("content",a.el.innerHTML),d.disable(a.el,b)):a.$el.wysiwyg("destroy"),this.hide(),c.$el.off("mousedown",this.disableProp)},focus:function(a,b){var c=this.customRte;c?c.focus(a.el,b):this.attach(a)},show:function(){var a=c.el.style;a.display="block"},hide:function(){c.el.style.display="none"},disableProp:function(a){a.stopPropagation()},getToolbarEl:function(){return c.el},render:function(){return c.render().el}}}}),c("RichTextEditor",["RichTextEditor/main"],function(a){return a}),c("StyleManager/config/config",[],function(){return{stylePrefix:"sm-",sectors:[],textNoElement:"Select an element before using Style Manager"}}),c("StyleManager/model/Layer",["backbone"],function(a){return a.Model.extend({defaults:{index:"",active:!0,value:"",values:{},preview:!1},initialize:function(){var a=this.get("value");if(!a){var b="",c=this.get("values");for(var d in c)b+=" "+c[d];this.set("value",b.trim())}}})}),c("StyleManager/model/Layers",["backbone","./Layer"],function(a,b){return a.Collection.extend({model:b,initialize:function(){this.idx=1,this.on("add",this.onAdd),this.on("reset",this.onReset)},onAdd:function(a,b,c){c.noIncrement||a.set("index",this.idx++)},onReset:function(){this.idx=1}})}),c("StyleManager/model/Property",["backbone","./Layers","require"],function(a,b,c){return a.Model.extend({defaults:{name:"",property:"",type:"",units:[],unit:"",defaults:"",info:"",value:"",icon:"",preview:!1,detached:!1,functionName:"",properties:[],layers:[],list:[],fixedValues:["initial","inherit"]},initialize:function(a){var d=this.get("type"),e=this.get("name"),f=this.get("property"),g=this.get("properties");if(e||this.set("name",f.charAt(0).toUpperCase()+f.slice(1).replace(/-/g," ")),g.length){var h=c("./Properties");this.set("properties",new h(g))}switch(d){case"stack":this.set("layers",new b)}},getValue:function(){var a="",b=this.get("type");switch(b){case"integer":a=this.get("value")+this.get("unit");break;default:a=this.get("value")}return a}})}),c("StyleManager/model/Properties",["backbone","./Property"],function(a,b){return a.Collection.extend({model:b})}),c("StyleManager/model/PropertyFactory",["backbone"],function(a){return function(){return{build:function(a){var b=[];"string"==typeof a&&(a=[a]);for(var c=0,d=a.length;c\n\t
\n\t\t<%= label %>\n\t
\n
'}),c("text!StyleManager/templates/propertyInput.html",[],function(){return'
\n\tinput-holder\'>\n
\n
\n'}),c("StyleManager/view/PropertyView",["backbone","text!./../templates/propertyLabel.html","text!./../templates/propertyInput.html"],function(a,b,c){return a.View.extend({template:_.template(c),templateLabel:_.template(b),events:{change:"valueUpdated"},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=a.target||{},this.propTarget=a.propTarget||{},this.onChange=a.onChange||{},this.onInputRender=a.onInputRender||{},this.customValue=a.customValue||{},this.defaultValue=this.model.get("defaults"),this.property=this.model.get("property"),this.input=this.$input=null,this.className=this.pfx+"property",this.inputHolderId="#"+this.pfx+"input-holder",this.model.get("value")||this.model.set("value",this.model.get("defaults")),this.listenTo(this.model,"destroy remove",this.remove),this.listenTo(this.propTarget,"update",this.targetUpdated),this.listenTo(this.model,"change:value",this.valueChanged),this.listenTo(this.model,"targetUpdated",this.targetUpdated)},getTarget:function(){return this.selectedComponent?this.selectedComponent:this.propTarget?this.propTarget.model:null},valueUpdated:function(){this.$input&&this.model.set("value",this.getInputValue())},targetUpdated:function(){this.selectedComponent=this.propTarget.model,this.helperComponent=this.propTarget.helper,this.getTarget()&&(this.sameValue()||this.renderInputRequest())},sameValue:function(){return this.getComponentValue()==this.model.get("value")+this.model.get("unit")},getComponentValue:function(){var a=this.getTarget();if(a){var b=a.get("style")[this.property];if(b?this.componentValue=b:this.componentValue=this.defaultValue+(this.unit||""),this.model.get("functionName")){var c=this.fetchFromFunction(this.componentValue);c&&(this.componentValue=c)}if(this.customValue&&"function"==typeof this.customValue){var d=this.model.collection.indexOf(this.model),e=this.customValue(this,d);e&&(this.componentValue=e)}return this.componentValue}},fetchFromFunction:function(a){return a.substring(a.indexOf("(")+1,a.lastIndexOf(")"))},getValueForTarget:function(){return this.model.getValue()},getInputValue:function(){return this.$input?this.$input.val():""},valueChanged:function(a,b,c){var d=this.getValueForTarget();if(this.$input&&this.setValue(d),this.getTarget()&&this.isTargetStylable()){value=this.getValueForTarget();var e=this.model.get("functionName");e&&(value=e+"("+value+")");var f=this.getTarget(),g=this.onChange;g&&"function"==typeof g?g(f,this,c):this.updateTargetStyle(value,null,c)}},updateTargetStyle:function(a,b,c){var d=b||this.property,e=a||"",f=c?c.avoidStore:0,g=this.getTarget(),h=_.clone(g.get("style"));e?h[d]=e:delete h[d],g.set("style",h,{avoidStore:f}),this.helperComponent&&this.helperComponent.set("style",h,{avoidStore:f})},isTargetStylable:function(){var a=this.getTarget().get("stylable");return a instanceof Array&&(a=_.indexOf(a,this.property)>=0),a},setValue:function(a,b){var c=0===b?0:1,d=this.model.get("defaults"),e=this.model.get("value")||d;(a||c)&&(e=a),this.$input&&this.$input.val(e),this.model.set({value:e},{silent:!0})},renderLabel:function(){this.$el.html(this.templateLabel({pfx:this.pfx,ppfx:this.ppfx,icon:this.model.get("icon"),info:this.model.get("info"),label:this.model.get("name")}))},renderField:function(){this.renderTemplate(),this.renderInput(),delete this.componentValue},renderTemplate:function(){this.$el.append(this.template({pfx:this.pfx,ppfx:this.ppfx,icon:this.model.get("icon"),info:this.model.get("info"),label:this.model.get("name")}))},renderInput:function(){this.$input||(this.$input=$("",{placeholder:this.model.get("defaults"),type:"text"}),this.$el.find(this.inputHolderId).html(this.$input)),this.setValue(this.componentValue,0)},renderInputRequest:function(){this.renderInput()},cleanValue:function(){this.setValue("")},render:function(){return this.renderLabel(),this.renderField(),this.$el.attr("class",this.className),this}})}),c("text!Abstract/ui/templates/inputNumber.html",[],function(){return'input-holder\'>\nfield-units\'>\n
\n\t
\n\t
\n
\n'}),c("Abstract/ui/InputNumber",["backbone","text!./templates/inputNumber.html"],function(a,b){return a.View.extend({events:{},template:_.template(b),initialize:function(a){_.bindAll(this,"moveIncrement","upIncrement");var b=a.ppfx||"";this.ppfx=b,this.docEl=$(document),this.inputCls=b+"input-number",this.unitCls=b+"input-unit",this.events["click ."+b+"field-arrow-u"]="upArrowClick",this.events["click ."+b+"field-arrow-d"]="downArrowClick",this.events["mousedown ."+b+"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(a,b){var c=b||{},d=this.validateInputValue(a,{deepCheck:1}),e={value:d.value};(d.unit||d.force)&&(e.unit=d.unit),this.model.set(e,c),c.silent&&this.handleModelChange()},handleChange:function(a){a.stopPropagation(),this.setValue(this.getInputEl().value)},handleUnitChange:function(a){a.stopPropagation();var b=this.getUnitEl().value;this.model.set("unit",b)},handleModelChange:function(){var a=this.model;this.getInputEl().value=a.get("value");var b=this.getUnitEl();b&&(b.value=a.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 a=this.model,b=a.get("units")||[];if(b.length){var c='",this.unitEl=$(c)}}return this.unitEl&&this.unitEl.get(0)},upArrowClick:function(){var a=this.model.get("value");a=isNaN(a)?1:parseInt(a,10)+1;var b=this.validateInputValue(a);this.model.set("value",b.value)},downArrowClick:function(){var a=this.model.get("value");a=isNaN(a)?0:parseInt(a,10)-1;var b=this.validateInputValue(a);this.model.set("value",b.value)},downIncrement:function(a){a.preventDefault(),this.moved=0;var b=this.model.get("value");b=isNaN(b)?0:parseInt(b,10);var c={y:a.pageY,val:b};this.docEl.mouseup(c,this.upIncrement),this.docEl.mousemove(c,this.moveIncrement)},moveIncrement:function(a){this.moved=1;var b=parseInt(a.data.val-a.pageY+a.data.y,10);return this.prValue=this.validateInputValue(b).value,this.model.set("value",this.prValue,{avoidStore:1}),!1},upIncrement:function(a){if(this.docEl.off("mouseup",this.upIncrement),this.docEl.off("mousemove",this.moveIncrement),this.prValue&&this.moved){var b=this.prValue-1;this.model.set("value",b,{avoidStore:1}).set("value",b+1)}},validateInputValue:function(a,b){var c=0,d=b||{},e=this.model,f=a||e.get("defaults"),g=e.get("units")||[],h=e.get("unit")||g.length&&g[0]||"",i=e.get("max"),j=e.get("min");if(d.deepCheck){var k=e.get("fixedValues")||[];if(f){var l=new RegExp("^"+k.join("|"),"g");if(k.length&&l.test(f))f=f.match(l)[0],h="",c=1;else{var m=f+"";f+="",f=parseFloat(f.replace(",",".")),f=isNaN(f)?e.get("defaults"):f;var n=m.replace(f,"");_.indexOf(g,n)>=0&&(h=n)}}}return"undefined"!=typeof i&&(f=f>i?i:f),"undefined"!=typeof j&&(f=f\n\tinput-holder\'>\n
\n
\n'}),c("StyleManager/view/PropertyRadioView",["backbone","./PropertyView","text!./../templates/propertyRadio.html"],function(a,b,c){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),this.list=this.model.get("list")||[],this.className=this.className+" "+this.pfx+"list"},renderInput:function(){var a=this.pfx,b=this.ppfx,c=b+"radio-item-label";this.$input||this.list&&this.list.length&&(this.input="",_.each(this.list,function(d){var e=d.className?d.className+" "+a+"icon "+c:"",f=this.property+"-"+d.value,g=d.name?d.name:d.value;titleAttr=d.title?'title="'+d.title+'"':"",this.input+='
"},this),this.$inputEl=$(this.input),this.$el.find("#"+a+"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(a){var b=this.model.get("value")||this.defaultValue;a&&(b=a),this.$input&&this.$input.filter('[value="'+b+'"]').prop("checked",!0),this.model.set({value:b},{silent:!0})}})}),c("text!StyleManager/templates/propertySelect.html",[],function(){return'
\n\tinput-holder\'>\n\t
\n\t\t
\n\t
\n
\n
\n'}),c("StyleManager/view/PropertySelectView",["backbone","./PropertyView","text!./../templates/propertySelect.html"],function(a,b,c){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),this.list=this.model.get("list")||[]},renderInput:function(){var a=this.pfx;this.$input||(this.input="",this.$input=$(this.input),this.$el.find("#"+a+"input-holder").html(this.$input)),this.setValue(this.componentValue,0)}})}),c("text!Abstract/ui/templates/input.html",[],function(){return"\n"}),c("Abstract/ui/Input",["backbone","text!./templates/input.html"],function(a,b){return a.View.extend({events:{change:"handleChange"},template:_.template(b),initialize:function(a){var b=a||{},c=b.ppfx||"";this.target=b.target||{},this.inputClass=c+"field",this.inputHolderClass=c+"input-holder",this.ppfx=c,this.listenTo(this.model,"change:value",this.handleModelChange)},handleChange:function(a){a.stopPropagation(),this.setValue(this.getInputEl().value)},setValue:function(a,b){var c=b||{},d=this.model;d.set({value:a||d.get("defaults")},c),c.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 a=this.$el;return a.addClass(this.inputClass),a.html(this.template({holderClass:this.inputHolderClass,ppfx:this.ppfx})),a.find("."+this.inputHolderClass).html(this.getInputEl()),this}})}),function(a){"use strict";"function"==typeof c&&c.amd?c("Spectrum",["jquery"],a):"object"==typeof exports&&"object"==typeof module?module.exports=a(b("jquery")):a(jQuery)}(function(a,b){"use strict";function c(b,c,d,e){for(var f=[],g=0;g')}else{var m="sp-clear-display";f.push(a("
").append(a('').attr("title",e.noColorSelectedText)).html())}}return"
"+f.join("")+"
"}function d(){for(var a=0;aMath.abs(b-e);ta=f?"x":"y"}}else ta=null;var g=!ta||"x"===ta,h=!ta||"y"===ta;g&&(ka=parseFloat(a/ba)),h&&(la=parseFloat((ca-b)/ca)),Xa=!1,U.showAlpha||(ma=1),K()},y,z),Ta?(H(Ta),L(),Va=U.preferredFormat||tinycolor(Ta).format,u(Ta)):L(),V&&C();var d=p?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Ha.delegate(".sp-thumb-el",d,b),Ia.delegate(".sp-thumb-el:nth-child(1)",d,{ignore:!0},b)}function t(){if(X&&window.localStorage){try{var b=window.localStorage[X].split(",#");b.length>1&&(delete window.localStorage[X],a.each(b,function(a,b){u(b)}))}catch(c){}try{qa=window.localStorage[X].split(";")}catch(c){}}}function u(b){if(W){var c=tinycolor(b).toRgbString();if(!pa[c]&&a.inArray(c,qa)===-1)for(qa.push(c);qa.length>ra;)qa.shift();if(X&&window.localStorage)try{window.localStorage[X]=qa.join(";")}catch(d){}}}function v(){var a=[];if(U.showPalette)for(var b=0;bj&&j>e?Math.abs(l.left+e-j):0),l.top-=Math.min(l.top,l.top+f>k&&k>f?Math.abs(f+g-d):d),l}function h(){}function i(a){a.stopPropagation()}function j(a,b){var c=Array.prototype.slice,d=c.call(arguments,2);return function(){return a.apply(b,d.concat(c.call(arguments)))}}function k(b,c,d,e){function f(a){a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a.returnValue=!1}function g(a){if(k){if(p&&j.documentMode<9&&!a.button)return i(); var d=a.originalEvent&&a.originalEvent.touches&&a.originalEvent.touches[0],e=d&&d.pageX||a.pageX,g=d&&d.pageY||a.pageY,h=Math.max(0,Math.min(e-l.left,n)),q=Math.max(0,Math.min(g-l.top,m));o&&f(a),c.apply(b,[h,q,a])}}function h(c){var e=c.which?3==c.which:2==c.button;e||k||d.apply(b,arguments)!==!1&&(k=!0,m=a(b).height(),n=a(b).width(),l=a(b).offset(),a(j).bind(q),a(j.body).addClass("sp-dragging"),g(c),f(c))}function i(){k&&(a(j).unbind(q),a(j.body).removeClass("sp-dragging"),setTimeout(function(){e.apply(b,arguments)},0)),k=!1}c=c||function(){},d=d||function(){},e=e||function(){};var j=document,k=!1,l={},m=0,n=0,o="ontouchstart"in window,q={};q.selectstart=f,q.dragstart=f,q["touchmove mousemove"]=g,q["touchend mouseup"]=i,a(b).bind("touchstart mousedown",h)}function l(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,a.apply(e,f)};c&&clearTimeout(d),!c&&d||(d=setTimeout(g,b))}}function m(){return a.fn.spectrum.inputTypeColorSupport()}var n={beforeShow:h,move:h,change:h,show:h,hide:h,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},o=[],p=!!/msie/i.exec(window.navigator.userAgent),q=function(){function a(a,b){return!!~(""+a).indexOf(b)}var b=document.createElement("div"),c=b.style;return c.cssText="background-color:rgba(0,0,0,.5)",a(c.backgroundColor,"rgba")||a(c.backgroundColor,"hsla")}(),r=["
","
","
","
"].join(""),s=function(){var a="";if(p)for(var b=1;b<=6;b++)a+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",a,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}(),t="spectrum.id";a.fn.spectrum=function(b,c){if("string"==typeof b){var d=this,e=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=o[a(this).data(t)];if(c){var f=c[b];if(!f)throw new Error("Spectrum: no such method: '"+b+"'");"get"==b?d=c.get():"container"==b?d=c.container:"option"==b?d=c.option.apply(c,e):"destroy"==b?(c.destroy(),a(this).removeData(t)):f.apply(c,e)}}),d}return this.spectrum("destroy").each(function(){var c=a.extend({},b,a(this).data()),d=f(this,c);a(this).data(t,d.id)})},a.fn.spectrum.load=!0,a.fn.spectrum.loadOpts={},a.fn.spectrum.draggable=k,a.fn.spectrum.defaults=n,a.fn.spectrum.inputTypeColorSupport=function u(){if("undefined"==typeof u._cachedResult){var b=a("")[0];u._cachedResult="color"===b.type&&""!==b.value}return u._cachedResult},a.spectrum={},a.spectrum.localization={},a.spectrum.palettes={},a.fn.spectrum.processNativeColorInputs=function(){var b=a("input[type=color]");b.length&&!m()&&b.spectrum({preferredFormat:"hex6"})},function(){function a(a){var c={r:0,g:0,b:0},e=1,g=!1,h=!1;return"string"==typeof a&&(a=G(a)),"object"==typeof a&&(a.hasOwnProperty("r")&&a.hasOwnProperty("g")&&a.hasOwnProperty("b")?(c=b(a.r,a.g,a.b),g=!0,h="%"===String(a.r).substr(-1)?"prgb":"rgb"):a.hasOwnProperty("h")&&a.hasOwnProperty("s")&&a.hasOwnProperty("v")?(a.s=D(a.s),a.v=D(a.v),c=f(a.h,a.s,a.v),g=!0,h="hsv"):a.hasOwnProperty("h")&&a.hasOwnProperty("s")&&a.hasOwnProperty("l")&&(a.s=D(a.s),a.l=D(a.l),c=d(a.h,a.s,a.l),g=!0,h="hsl"),a.hasOwnProperty("a")&&(e=a.a)),e=w(e),{ok:g,format:a.format||h,r:M(255,N(c.r,0)),g:M(255,N(c.g,0)),b:M(255,N(c.b,0)),a:e}}function b(a,b,c){return{r:255*x(a,255),g:255*x(b,255),b:255*x(c,255)}}function c(a,b,c){a=x(a,255),b=x(b,255),c=x(c,255);var d,e,f=N(a,b,c),g=M(a,b,c),h=(f+g)/2;if(f==g)d=e=0;else{var i=f-g;switch(e=h>.5?i/(2-f-g):i/(f+g),f){case a:d=(b-c)/i+(b1&&(c-=1),c<1/6?a+6*(b-a)*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a}var e,f,g;if(a=x(a,360),b=x(b,100),c=x(c,100),0===b)e=f=g=c;else{var h=c<.5?c*(1+b):c+b-c*b,i=2*c-h;e=d(i,h,a+1/3),f=d(i,h,a),g=d(i,h,a-1/3)}return{r:255*e,g:255*f,b:255*g}}function e(a,b,c){a=x(a,255),b=x(b,255),c=x(c,255);var d,e,f=N(a,b,c),g=M(a,b,c),h=f,i=f-g;if(e=0===f?0:i/f,f==g)d=0;else{switch(f){case a:d=(b-c)/i+(b>1)+720)%360;--b;)d.h=(d.h+e)%360,f.push(P(d));return f}function u(a,b){b=b||6;for(var c=P(a).toHsv(),d=c.h,e=c.s,f=c.v,g=[],h=1/b;b--;)g.push(P({h:d,s:e,v:f})),f=(f+h)%1;return g}function v(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[a[c]]=c);return b}function w(a){return a=parseFloat(a),(isNaN(a)||a<0||a>1)&&(a=1),a}function x(a,b){A(a)&&(a="100%");var c=B(a);return a=M(b,N(0,parseFloat(a))),c&&(a=parseInt(a*b,10)/100),K.abs(a-b)<1e-6?1:a%b/parseFloat(b)}function y(a){return M(1,N(0,a))}function z(a){return parseInt(a,16)}function A(a){return"string"==typeof a&&a.indexOf(".")!=-1&&1===parseFloat(a)}function B(a){return"string"==typeof a&&a.indexOf("%")!=-1}function C(a){return 1==a.length?"0"+a:""+a}function D(a){return a<=1&&(a=100*a+"%"),a}function E(a){return Math.round(255*parseFloat(a)).toString(16)}function F(a){return z(a)/255}function G(a){a=a.replace(H,"").replace(I,"").toLowerCase();var b=!1;if(Q[a])a=Q[a],b=!0;else if("transparent"==a)return{r:0,g:0,b:0,a:0,format:"name"};var c;return(c=S.rgb.exec(a))?{r:c[1],g:c[2],b:c[3]}:(c=S.rgba.exec(a))?{r:c[1],g:c[2],b:c[3],a:c[4]}:(c=S.hsl.exec(a))?{h:c[1],s:c[2],l:c[3]}:(c=S.hsla.exec(a))?{h:c[1],s:c[2],l:c[3],a:c[4]}:(c=S.hsv.exec(a))?{h:c[1],s:c[2],v:c[3]}:(c=S.hsva.exec(a))?{h:c[1],s:c[2],v:c[3],a:c[4]}:(c=S.hex8.exec(a))?{a:F(c[1]),r:z(c[2]),g:z(c[3]),b:z(c[4]),format:b?"name":"hex8"}:(c=S.hex6.exec(a))?{r:z(c[1]),g:z(c[2]),b:z(c[3]),format:b?"name":"hex"}:!!(c=S.hex3.exec(a))&&{r:z(c[1]+""+c[1]),g:z(c[2]+""+c[2]),b:z(c[3]+""+c[3]),format:b?"name":"hex"}}var H=/^[\s,#]+/,I=/\s+$/,J=0,K=Math,L=K.round,M=K.min,N=K.max,O=K.random,P=function(b,c){if(b=b?b:"",c=c||{},b instanceof P)return b;if(!(this instanceof P))return new P(b,c);var d=a(b);this._originalInput=b,this._r=d.r,this._g=d.g,this._b=d.b,this._a=d.a,this._roundA=L(100*this._a)/100,this._format=c.format||d.format,this._gradientType=c.gradientType,this._r<1&&(this._r=L(this._r)),this._g<1&&(this._g=L(this._g)),this._b<1&&(this._b=L(this._b)),this._ok=d.ok,this._tc_id=J++};P.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 a=this.toRgb();return(299*a.r+587*a.g+114*a.b)/1e3},setAlpha:function(a){return this._a=w(a),this._roundA=L(100*this._a)/100,this},toHsv:function(){var a=e(this._r,this._g,this._b);return{h:360*a.h,s:a.s,v:a.v,a:this._a}},toHsvString:function(){var a=e(this._r,this._g,this._b),b=L(360*a.h),c=L(100*a.s),d=L(100*a.v);return 1==this._a?"hsv("+b+", "+c+"%, "+d+"%)":"hsva("+b+", "+c+"%, "+d+"%, "+this._roundA+")"},toHsl:function(){var a=c(this._r,this._g,this._b);return{h:360*a.h,s:a.s,l:a.l,a:this._a}},toHslString:function(){var a=c(this._r,this._g,this._b),b=L(360*a.h),d=L(100*a.s),e=L(100*a.l);return 1==this._a?"hsl("+b+", "+d+"%, "+e+"%)":"hsla("+b+", "+d+"%, "+e+"%, "+this._roundA+")"},toHex:function(a){return g(this._r,this._g,this._b,a)},toHexString:function(a){return"#"+this.toHex(a)},toHex8:function(){return h(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:L(this._r),g:L(this._g),b:L(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+L(this._r)+", "+L(this._g)+", "+L(this._b)+")":"rgba("+L(this._r)+", "+L(this._g)+", "+L(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:L(100*x(this._r,255))+"%",g:L(100*x(this._g,255))+"%",b:L(100*x(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+L(100*x(this._r,255))+"%, "+L(100*x(this._g,255))+"%, "+L(100*x(this._b,255))+"%)":"rgba("+L(100*x(this._r,255))+"%, "+L(100*x(this._g,255))+"%, "+L(100*x(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(R[g(this._r,this._g,this._b,!0)]||!1)},toFilter:function(a){var b="#"+h(this._r,this._g,this._b,this._a),c=b,d=this._gradientType?"GradientType = 1, ":"";if(a){var e=P(a);c=e.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+d+"startColorstr="+b+",endColorstr="+c+")"},toString:function(a){var b=!!a;a=a||this._format;var c=!1,d=this._a<1&&this._a>=0,e=!b&&d&&("hex"===a||"hex6"===a||"hex3"===a||"name"===a);return e?"name"===a&&0===this._a?this.toName():this.toRgbString():("rgb"===a&&(c=this.toRgbString()),"prgb"===a&&(c=this.toPercentageRgbString()),"hex"!==a&&"hex6"!==a||(c=this.toHexString()),"hex3"===a&&(c=this.toHexString(!0)),"hex8"===a&&(c=this.toHex8String()),"name"===a&&(c=this.toName()),"hsl"===a&&(c=this.toHslString()),"hsv"===a&&(c=this.toHsvString()),c||this.toHexString())},_applyModification:function(a,b){var c=a.apply(null,[this].concat([].slice.call(b)));return this._r=c._r,this._g=c._g,this._b=c._b,this.setAlpha(c._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(n,arguments)},desaturate:function(){return this._applyModification(i,arguments)},saturate:function(){return this._applyModification(j,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(o,arguments)},_applyCombination:function(a,b){return a.apply(null,[this].concat([].slice.call(b)))},analogous:function(){return this._applyCombination(t,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(u,arguments)},splitcomplement:function(){return this._applyCombination(s,arguments)},triad:function(){return this._applyCombination(q,arguments)},tetrad:function(){return this._applyCombination(r,arguments)}},P.fromRatio=function(a,b){if("object"==typeof a){var c={};for(var d in a)a.hasOwnProperty(d)&&("a"===d?c[d]=a[d]:c[d]=D(a[d]));a=c}return P(a,b)},P.equals=function(a,b){return!(!a||!b)&&P(a).toRgbString()==P(b).toRgbString()},P.random=function(){return P.fromRatio({r:O(),g:O(),b:O()})},P.mix=function(a,b,c){c=0===c?0:c||50;var d,e=P(a).toRgb(),f=P(b).toRgb(),g=c/100,h=2*g-1,i=f.a-e.a;d=h*i==-1?h:(h+i)/(1+h*i),d=(d+1)/2;var j=1-d,k={r:f.r*d+e.r*j,g:f.g*d+e.g*j,b:f.b*d+e.b*j,a:f.a*g+e.a*(1-g)};return P(k)},P.readability=function(a,b){var c=P(a),d=P(b),e=c.toRgb(),f=d.toRgb(),g=c.getBrightness(),h=d.getBrightness(),i=Math.max(e.r,f.r)-Math.min(e.r,f.r)+Math.max(e.g,f.g)-Math.min(e.g,f.g)+Math.max(e.b,f.b)-Math.min(e.b,f.b);return{brightness:Math.abs(g-h),color:i}},P.isReadable=function(a,b){var c=P.readability(a,b);return c.brightness>125&&c.color>500},P.mostReadable=function(a,b){for(var c=null,d=0,e=!1,f=0;f125&&g.color>500,i=3*(g.brightness/125)+g.color/500;(h&&!e||h&&e&&i>d||!h&&!e&&i>d)&&(e=h,d=i,c=P(b[f]))}return c};var Q=P.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"},R=P.hexNames=v(Q),S=function(){var a="[-\\+]?\\d+%?",b="[-\\+]?\\d*\\.\\d+%?",c="(?:"+b+")|(?:"+a+")",d="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?",e="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?";return{rgb:new RegExp("rgb"+d),rgba:new RegExp("rgba"+e),hsl:new RegExp("hsl"+d),hsla:new RegExp("hsla"+e),hsv:new RegExp("hsv"+d),hsva:new RegExp("hsva"+e),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=P}(),a(function(){a.fn.spectrum.load&&a.fn.spectrum.processNativeColorInputs()})}),c("text!Abstract/ui/templates/inputColor.html",[],function(){return'
input-holder\'>
\n
\n\t
\n\t\t
\n\t
\n
\n'}),c("Abstract/ui/InputColor",["backbone","./Input","Spectrum","text!./templates/inputColor.html"],function(a,b,c,d){return b.extend({template:_.template(d),initialize:function(a){b.prototype.initialize.apply(this,arguments);var c=this.ppfx;this.colorCls=c+"field-color-picker",this.inputClass=c+"field "+c+"field-color",this.colorHolderClass=c+"field-colorp-c",this.listenTo(this.model,"change:value",this.handleModelChange)},handleModelChange:function(){b.prototype.handleModelChange.apply(this,arguments);var a=this.model.get("value"),c=this.getColorEl();a="none"===a?"#fff":a,c.spectrum("set",a),c.get(0).style.backgroundColor=a},getColorEl:function(){if(!this.colorEl){var a=this.model,b=$("
",{"class":this.colorCls}),c=b.get(0).style,d=this.target&&this.target.config?this.target.config.el:"";b.spectrum({appendTo:d||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[],move:function(a){var b=1==a.getAlpha()?a.toHexString():a.toRgbString();c.backgroundColor=b},change:function(b){var d=1==b.getAlpha()?b.toHexString():b.toRgbString();d=d.replace(/ /g,""),c.backgroundColor=d,a.set("value",d)}}),this.colorEl=b}return this.colorEl},render:function(){return b.prototype.render.apply(this,arguments),this.$el.find("."+this.colorHolderClass).html(this.getColorEl()),this}})}),c("StyleManager/view/PropertyColorView",["backbone","./PropertyView","Abstract/ui/InputColor"],function(a,b,c){return b.extend({renderTemplate:function(){},renderInput:function(){if(!this.input){var a=new c({target:this.target,model:this.model,ppfx:this.ppfx});this.input=a.render(),this.$el.append(this.input.$el),this.$input=this.input.inputEl,this.$color=this.input.colorEl}this.setValue(this.componentValue)},setValue:function(a){this.input.setValue(a,{silent:1})}})}),c("text!StyleManager/templates/propertyFile.html",[],function(){return'
\n\t
input-holder\'>\n\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t
\n\t
\n
\n
'}),c("StyleManager/view/PropertyFileView",["backbone","./PropertyView","text!./../templates/propertyFile.html"],function(a,b,c){return b.extend({template:_.template(c),initialize:function(a){b.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.defaultValue,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.componentValue&&this.componentValue!=this.defaultValue?this.setPreviewView(1):this.setPreviewView(0),this.setValue(this.componentValue,0)},setPreviewView:function(a){this.$previewBox&&(a?this.$previewBox.addClass(this.pfx+"show"):this.$previewBox.removeClass(this.pfx+"show"))},spreadUrl:function(a){this.setValue('url("'+a+'")'),this.setPreviewView(1)},setPreview:function(a){this.$preview&&this.$preview.css("background-image",a)},setValue:function(a,c){b.prototype.setValue.apply(this,arguments),this.setPreview(a)},renderTemplate:function(){this.$el.append(this.template({upload:"Upload",assets:"Images",pfx:this.pfx}))},cleanValue:function(){this.setPreviewView(0),this.model.set({value:""},{silent:!0})},removeFile:function(){this.model.set("value",this.defaultValue),b.prototype.cleanValue.apply(this,arguments),this.setPreviewView(0)},openAssetManager:function(a){var b=this;this.modal&&this.am&&(this.modal.setTitle("Select image"),this.modal.setContent(this.am.render()),this.am.setTarget(null),this.modal.open(),this.am.onSelect(function(c){b.modal.close(),b.spreadUrl(c.get("src")),b.valueChanged(a)}))}})}),c("text!StyleManager/templates/propertyComposite.html",[],function(){return'
\n\tinput-holder\'>\n
\n
'}),c("StyleManager/view/PropertyCompositeView",["backbone","./PropertyView","text!./../templates/propertyComposite.html","require"],function(a,b,c,d){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),_.bindAll(this,"build"),this.config=a.config||{},this.className=this.className+" "+this.pfx+"composite"},valueUpdated:function(){this.model.get("detached")||b.prototype.valueUpdated.apply(this,arguments)},renderInput:function(){var a=this.model.get("properties");this.model.get("detached");if(a&&a.length&&(this.$input||(this.$input=$("",{value:0,type:"hidden"})),this.props||(this.props=this.model.get("properties")),!this.$props)){this.props.each(function(a,b){a&&"composite"==a.get("type")&&(this.props.remove(a),console.warn("Nested composite types not yet allowed."))},this);var b=d("./PropertiesView"),c=new b(this.getPropsConfig());this.$props=c.render().$el,this.$el.find("#"+this.pfx+"input-holder").html(this.$props)}},getPropsConfig:function(a){var b=this;return result={config:this.config,collection:this.props,target:this.target,propTarget:this.propTarget,onChange:function(a,c,d){var e=b.build();b.model.set("value",e,d)},customValue:function(a,c){return b.valueOnIndex(c,a)}},this.model.get("detached")&&delete result.onChange,result},getDefaultValue:function(){var a="";return this.props.each(function(b,c){a+=b.get("defaults")+b.get("unit")+" "}),a.replace(/ +$/,"")},valueOnIndex:function(a,b){var c=null,d=this.getComponentValue().split(" ");if(d.length&&d[a]&&(c=d[a],b&&b.model&&b.model.get("functionName"))){var e=this.fetchFromFunction(c);e&&(c=e)}return c},build:function(a,b,c){var d="";return this.model.get("properties").each(function(a){var b=a.getValue();func=a.get("functionName"),func&&(b=func+"("+b+")"),d+=b+" "}),d.replace(/ +$/,"")}})}),c("text!StyleManager/templates/propertyStack.html",[],function(){return"
field <%= pfx %>stack\">\n\t\n\t\n
\n
"}),c("text!StyleManager/templates/layer.html",[],function(){return'
\n \n
\n
<%= label %>
\n
\n\t
\n
\n
\n
\n
'}),c("StyleManager/view/LayerView",["backbone","text!./../templates/layer.html"],function(a,b){return a.View.extend({events:{click:"updateIndex"},template:_.template(b),initialize:function(a){this.stackModel=a.stackModel||{},this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.className=this.pfx+"layer",this.sorter=a.sorter||null,this.listenTo(this.model,"destroy remove",this.remove),this.listenTo(this.model,"change:value",this.valueChanged),this.listenTo(this.model,"change:props",this.showProps),this.events["click #"+this.pfx+"close-layer"]="remove",this.events["mousedown > #"+this.pfx+"move"]="initSorter",this.model.get("preview")||this.$el.addClass(this.pfx+"no-preview"),this.$el.data("model",this.model),this.delegateEvents()},initSorter:function(a){this.sorter&&this.sorter.startSort(this.el)},getProps:function(){return this.stackModel.get?this.stackModel.get("properties"):null},valueChanged:function(){var a=this.model.get("preview");if(a){this.$preview||(this.$preview=this.$el.find("#"+this.pfx+"preview"));"function"==typeof a?a(this.getProps(),this.$preview):this.onPreview(this.getProps(),this.$preview)}},onPreview:function(a,b){var c=this.model.get("value").split(" "),d=3,e="";if(a.each(function(a,b){var f=c[b]||"";if(f&&"integer"==a.get("type")){var g=parseInt(f,10),h=f.replace(g,"");g=isNaN(g)?0:g,g>d&&(g=d),g<-d&&(g=-d),f=g+h}e+=f+" "}),this.stackModel.get){var f=this.stackModel.get("property");f&&(this.$preview.get(0).style[f]=e)}},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(b){this.$props&&this.$props.detach(),b&&b.stopPropagation&&b.stopPropagation(),a.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(a){var b=this.getIndex();this.stackModel.set("stackIndex",b),this.model.collection&&this.model.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"active")},getIndex:function(){var a=0;return this.model.collection&&(a=this.model.collection.indexOf(this.model)),a},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}})}),c("StyleManager/view/LayersView",["backbone","./LayerView"],function(a,b){return a.View.extend({initialize:function(a){this.config=a.config||{},this.stackModel=a.stackModel,this.preview=a.preview,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.className=this.pfx+"layers "+this.ppfx+"field",this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"deselectAll",this.deselectAll),this.listenTo(this.collection,"reset",this.render);var b=this.config.em||"",c=b?b.get("Utils"):"";this.sorter=c?new c.Sorter({container:this.el,containerSel:"."+this.pfx+"layers",itemSel:"."+this.pfx+"layer",pfx:this.config.pStylePrefix}):"",this.$el.data("collection",this.collection)},addTo:function(a){var b=this.collection.indexOf(a);this.addToCollection(a,null,b)},addToCollection:function(a,c,d){var e=c||null,f=b;"undefined"!=typeof this.preview&&a.set("preview",this.preview);var g=new f({model:a,stackModel:this.stackModel,config:this.config,sorter:this.sorter}),h=g.render().el;if(e)e.appendChild(h);else if("undefined"!=typeof d){var i="before";this.$el.children().length==d&&(d--,i="after"),d<0?this.$el.append(h):this.$el.children().eq(d)[i](h)}else this.$el.append(h);return h},deselectAll:function(){this.$el.find("."+this.pfx+"layer").removeClass(this.pfx+"active")},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",this.className),this.sorter&&(this.sorter.plh=null),this}})}),c("StyleManager/view/PropertyStackView",["backbone","./PropertyCompositeView","text!./../templates/propertyStack.html","./../model/Layers","./LayersView"],function(a,b,c,d,e){return b.extend({template:_.template(c),initialize:function(a){b.prototype.initialize.apply(this,arguments),this.model.set("stackIndex",null),this.className=this.pfx+"property "+this.pfx+"stack",this.events["click #"+this.pfx+"add"]="addLayer",this.listenTo(this.model,"change:stackIndex",this.indexChanged),this.listenTo(this.model,"updateValue",this.valueUpdated),this.delegateEvents()},targetUpdated:function(){this.model.get("detached")?this.refreshLayers():b.prototype.targetUpdated.apply(this,arguments)},getLayers:function(){return this.model.get("layers")},indexChanged:function(a){var b=this.getLayers().at(this.model.get("stackIndex"));b.set("props",this.$props),this.model.get("properties").each(function(a){a.trigger("targetUpdated")})},getStackValues:function(){return this.getLayers().pluck("value")},getPropsConfig:function(a){var c=this,d=b.prototype.getPropsConfig.apply(this,arguments);return d.onChange=function(a,b,d){var e=b.model,f=c.build();if(c.model.get("detached")){var g="";e.collection.indexOf(e);c.getLayers().each(function(a){var b=a.get("values")[e.get("property")];b&&(g+=(g?",":"")+b)}),b.updateTargetStyle(g,null,d)}else c.model.set("value",f,d)},d},valueOnIndex:function(a,b){var c=null;if(this.model.get("detached")){var d=b.componentValue.split(",");c=d[this.model.get("stackIndex")],c=c?c.trim():c}else{var e=this.getStackValues(),f=e[this.model.get("stackIndex")];if(!f)return;var g=f.split(" ");g.length&&g[a]&&(c=g[a])}return c},build:function(){var a=this.model.get("stackIndex");if(null!==a){var c=b.prototype.build.apply(this,arguments),d=this.getLayers().at(a);if(d){var e={};return this.model.get("properties").each(function(a){var b=a.getValue(),c=a.get("functionName");c&&(b=c+"("+b+")"),e[a.get("property")]=b}),d.set("values",e),d.set("value",c),this.createValue()}}},addLayer:function(a){if(this.getTarget()){var b=this.getLayers(),c=b.add({name:"test"}),d=b.indexOf(c);return c.set("value",this.getDefaultValue()),this.valueUpdated(),this.model.set("stackIndex",d),c}},valueUpdated:function(){this.model.get("detached")?this.model.get("properties").each(function(a){a.trigger("change:value")}):this.model.set("value",this.createValue())},createValue:function(){return this.getStackValues().join(", ")},renderLayers:function(){return this.$field||(this.$field=this.$el.find("> ."+this.pfx+"field")),this.$layers||(this.$layers=new e({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(){b.prototype.renderInput.apply(this,arguments),this.refreshLayers()},getLayersFromTarget:function(){ -var a=[],b=this.getTarget();if(!b)return a;var c=b.get("style");return this.model.get("properties").each(function(b){var d=c[b.get("property")];if(d)for(var e=d.split(","),f=0,g=e.length;f",{"class":"clear"})),this.$el.attr("class",this.pfx+"properties"),this}})}),c("text!StyleManager/templates/sector.html",[],function(){return'
\n \n <%= label %>\n
'}),c("StyleManager/view/SectorView",["backbone","./PropertiesView","text!./../templates/sector.html"],function(a,b,c){return a.View.extend({template:_.template(c),events:{},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.target=a.target||{},this.propTarget=a.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.events["click ."+this.pfx+"title"]="toggle",this.delegateEvents()},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 a=this.model.get("open")?0:1;this.model.set("open",a)},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 a=this.model.get("properties");if(a){var c=new b({collection:a,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(c.render().el)}}})}),c("StyleManager/view/SectorsView",["backbone","./SectorView"],function(a,b){return a.View.extend({initialize:function(b){this.config=b.config||{},this.pfx=this.config.stylePrefix||"",this.target=b.target||{},this.propTarget={},_.extend(this.propTarget,a.Events),this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.listenTo(this.target,"change:selectedComponent targetClassAdded targetClassRemoved targetClassUpdated targetStateUpdated targetStyleUpdated change:device",this.targetUpdated)},addTo:function(a){this.addToCollection(a)},targetUpdated:function(){var a=this.target.get("selectedComponent");if(a){var b=this.target.get("Config").devicePreviewMode,c=a.get("classes"),d=this.propTarget,e=this.target.getDeviceModel(),f=b?"":a.get("state"),g=e&&!b?e.get("width"):"";if(d.helper=null,c.length){var h=this.target.get("CssComposer"),i=_.filter(c.models,function(a){return a.get("active")}),j=h.get(i,f,g);if(j?1==c.length&&a.set("style",{}):(j=h.add(i,f,g),j.set("style",a.get("style")),a.set("style",{})),f){var k=this.target.get("SelectorManager"),l=k.add("hc-state"),m=h.get([l]);m?(h.getAll().remove(m),h.getAll().add(m)):m=h.add([l]),m.set("style",j.get("style")),d.helper=m}return d.model=j,void d.trigger("update")}d.model=a,d.trigger("update")}},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,id:this.pfx+a.get("name").replace(" ","_").toLowerCase(),name:a.get("name"),properties:a.get("properties"),target:this.target,propTarget:this.propTarget,config:this.config}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g),g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.attr("id",this.pfx+"sectors"),this.$el.append(a),this}})}),c("StyleManager/main",["require","./config/config","./model/Sectors","./view/SectorsView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Sectors"),g=a("./view/SectorsView");return{name:"StyleManager",getConfig:function(){return d},init:function(a){d=a||{};for(var h in e)h in d||(d[h]=e[h]);var i=d.pStylePrefix;return i&&(d.stylePrefix=i+d.stylePrefix),b=new f(d.sectors),c=new g({collection:b,target:d.em,config:d}),this},addSector:function(a,c){var d=this.getSector(a);return d||(c.id=a,d=b.add(c)),d},getSector:function(a){var c=b.where({id:a});return c.length?c[0]:null},getSectors:function(){return b},addProperty:function(a,b){var c=null,d=this.getSector(a);return d&&(c=d.get("properties").add(b)),c},getProperty:function(a,b){var c=null,d=this.getSector(a);return d&&(c=d.get("properties").where({property:b}),c=1==c.length?c[0]:c),c},getProperties:function(a){var b=null,c=this.getSector(a);return c&&(b=c.get("properties")),b},getModelToStyle:function(a){var b=a.get("classes");if(d.em&&b&&b.length){var c=d.em.get("Config").devicePreviewMode,e=d.em.getDeviceModel(),f=c?"":a.get("state"),g=e&&!c?e.get("width"):"",h=d.em.get("CssComposer"),i=_.filter(b.models,function(a){return a.get("active")}),j=h.get(i,f,g);if(j)return j}return a},render:function(){return c.render().el}}}}),c("StyleManager",["StyleManager/main"],function(a){return a}),c("AssetManager/model/Asset",["backbone"],function(a){return a.Model.extend({idAttribute:"src",defaults:{type:"",src:""},getFilename:function(){return this.get("src").split("/").pop()},getExtension:function(){return this.getFilename().split(".").pop()}})}),c("AssetManager/model/AssetImage",["backbone","./Asset"],function(a,b){return b.extend({defaults:_.extend({},b.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})}),c("AssetManager/model/Assets",["backbone","./Asset","./AssetImage"],function(a,b,c){return a.Collection.extend({model:c,initialize:function(a,b){this.model=function(a,b){var d;switch(a.type){default:d=new c(a,b)}return d}},addImg:function(a,b){return this.add({type:"image",src:a},b),this},add:function(b,c){var d=[];b=b instanceof Array?b:[b];for(var e=0,f=b.length;e\n
\n
\n
\n
\n\t
<%= name %>
\n\t
<%= dim %>
\n
\n
\n
'}),c("AssetManager/view/AssetImageView",["./AssetView","text!./../template/assetImage.html"],function(a,b){return a.extend({events:{click:"handleClick",dblclick:"handleDblClick"},template:_.template(b),initialize:function(b){a.prototype.initialize.apply(this,arguments),this.className+=" "+this.pfx+"asset-image",this.events["click #"+this.pfx+"close"]="removeItem",this.delegateEvents()},handleClick:function(){var a=this.config.onClick,b=this.model;b.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),"function"==typeof a?a(b):this.updateTarget(b.get("src"))},handleDblClick:function(){var a=this.config.onDblClick,b=this.model;"function"==typeof a?a(b):this.updateTarget(b.get("src"));var c=b.collection.onSelect;"function"==typeof c&&c(this.model)},updateTarget:function(a){var b=this.model.collection.target;if(b&&b.set){var c=_.clone(b.get("attributes"));b.set("attributes",c),b.set("src",a)}},removeItem:function(a){a.stopPropagation(),this.model.collection.remove(this.model)},render:function(){var a=this.model.get("name"),b=this.model.get("width")&&this.model.get("height")?this.model.get("width")+" x "+this.model.get("height"):"";return a=a?a:this.model.get("src").split("/").pop(),a=a&&a.length>30?a.substring(0,30)+"...":a,b=b?b+(this.model.get("unitDim")?this.model.get("unitDim"):" px"):"",this.$el.html(this.template({name:a,src:this.model.get("src"),dim:b,pfx:this.pfx,ppfx:this.ppfx})),this.$el.attr("class",this.className),this}})}),c("text!AssetManager/template/fileUploader.html",[],function(){return'
\n\t
<%= title %>
\n\t multiple/>\n\t
\n
'}),c("AssetManager/view/FileUploader",["backbone","text!./../template/fileUploader.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.options=a||{},this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.target=this.collection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=!this.config.upload,this.events["change #"+this.uploadId]="uploadFile",this.delegateEvents()},uploadFile:function(a){for(var b=a.dataTransfer?a.dataTransfer.files:a.target.files,c=new FormData,d=0;d\n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n
\n
\n'}),c("AssetManager/view/AssetsView",["backbone","./AssetView","./AssetImageView","./FileUploader","text!./../template/assets.html"],function(a,b,c,d,e){return a.View.extend({template:_.template(e),initialize:function(a){this.options=a,this.config=a.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.collection,"add",this.addToAsset),this.listenTo(this.collection,"deselectAll",this.deselectAll),this.className=this.pfx+"assets",this.events={},this.events.submit="addFromStr",this.delegateEvents()},addFromStr:function(a){a.preventDefault();var b=this.getInputUrl(),c=b.value.trim();if(c)return this.collection.addImg(c,{at:0}),this.getAssetsEl().scrollTop=0,b.value="",this},getAssetsEl:function(){return this.assets=this.el.querySelector("."+this.pfx+"assets"),this.assets},getInputUrl:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector("."+this.pfx+"add-asset input")),this.inputUrl},addToAsset:function(a){this.addAsset(a)},addAsset:function(a,d){var e=d||null,f=b;a.get("type").indexOf("image")>-1&&(f=c);var g=new f({model:a,config:this.config}),h=g.render().el;if(e)e.appendChild(h);else{var i=this.getAssetsEl();i&&i.insertBefore(h,i.firstChild)}return h},deselectAll:function(){this.$el.find("."+this.pfx+"highlight").removeClass(this.pfx+"highlight")},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addAsset(b,a)},this),this.$el.html(this.template({pfx:this.pfx,ppfx:this.ppfx,btnText:this.config.addBtnText})),this.$el.find("."+this.pfx+"assets").append(a),this}})}),c("AssetManager/config/config",[],function(){return{assets:[],stylePrefix:"am-",upload:"http://localhost/assets/upload",uploadText:"Drop files here or click to upload",addBtnText:"Add image"}}),c("AssetManager/main",["require","./model/Assets","./view/AssetsView","./view/FileUploader","./config/config"],function(a){return function(){var b,c,d,e={},f=a("./model/Assets"),g=a("./view/AssetsView"),h=a("./view/FileUploader");return{name:"AssetManager",storageKey:"assets",init:function(i){e=i||{};var j=a("./config/config");for(var k in j)k in e||(e[k]=j[k]);var l=e.pStylePrefix;l&&(e.stylePrefix=l+e.stylePrefix),b=new f(e.assets);var m={collection:b,config:e};return c=new g(m),d=new h(m),this},add:function(a){return b.add(a)},get:function(a){return b.where({src:a})[0]},getAll:function(){return b},remove:function(a){var b=this.get(a);return this.getAll().remove(b),this},store:function(a){var b={},c=JSON.stringify(this.getAll().toJSON());return b[this.storageKey]=c,!a&&e.stm&&e.stm.store(b),b},load:function(a){var b=a||"",c=this.storageKey;!b&&e.stm&&(b=e.stm.load(c));var d=[];try{d=JSON.parse(b[c])}catch(f){}return this.getAll().add(d),d},render:function(a){return this.rendered&&!a||(this.rendered=c.render().$el.add(d.render().$el)),this.rendered},setTarget:function(a){c.collection.target=a},onSelect:function(a){c.collection.onSelect=a},onClick:function(a){e.onClick=a},onDblClick:function(a){e.onDblClick=a}}}}),c("AssetManager",["AssetManager/main"],function(a){return a}),c("CssComposer/config/config",[],function(){return{stylePrefix:"css-",staticRules:"",rules:[]}}),c("CssComposer/model/Selectors",["backbone","require"],function(a,b){return a.Collection.extend({initialize:function(a,c){this.model=function(a,c){var d;return this.ClassTag||(this.ClassTag=b("SelectorManager/model/Selector")),d=new this.ClassTag(a,c)}}})}),c("CssComposer/model/CssRule",["backbone","./Selectors"],function(a,b){return a.Model.extend({defaults:{selectors:{},style:{},maxWidth:"",state:"",stylable:!0},initialize:function(a,c){if(this.config=a||{},this.sm=c?c.sm||{}:{},this.slct=this.config.selectors||[],this.sm.get){for(var d=[],e=0;e=0&&(c.css=d.em.getCss()),e.indexOf("styles")>=0&&(c.styles=JSON.stringify(b)),a||d.stm.store(c),c}},add:function(a,c,d){var e=c||"",g=d||"",h=this.get(a,e,g);return h?h:(h=new f({state:e,maxWidth:g}),h.get("selectors").add(a),b.add(h),h)},get:function(a,c,d){var e=null;return b.each(function(b){e||b.compare(a,c,d)&&(e=b)}),e},getAll:function(){return b},addCollection:function(a){for(var b=[],c=a instanceof Array?a:[a],e=0,f=c.length;e=0&&this.set("void",!0),this.opt=e,this.sm=e?e.sm||{}:{},this.config=a||{},this.defaultC=this.config.components||[],this.defaultCl=this.normalizeClasses(this.get("classes")||this.config.classes||[]),this.components=new b(this.defaultC,e),this.components.parent=this,this.set("components",this.components),this.set("classes",new c(this.defaultCl));var f=new d;f.setTarget(this),f.add(this.get("traits")),this.set("traits",f),this.initToolbar(),this.init()},init:function(){},initToolbar:function(){var a=this;if(!a.get("toolbar")){var b=[];a.get("draggable")&&b.push({attributes:{"class":"fa fa-arrows"},command:"tlb-move"}),a.get("copyable")&&b.push({attributes:{"class":"fa fa-clone"},command:"tlb-clone"}),a.get("removable")&&b.push({attributes:{"class":"fa fa-trash-o"},command:"tlb-delete"}),a.set("toolbar",b)}},loadTraits:function(a){var b=new d;b.setTarget(this),b.add(a),this.set("traits",b)},normalizeClasses:function(a){var b=[];if(this.sm.get){var c=this.sm.get("SelectorManager");if(c)return a.forEach(function(a){var d="";d="string"==typeof a?a:a.name;var e=c.add(d);b.push(e)}),b}},clone:function(){var a=_.clone(this.attributes),b=this.get("components"),c=this.get("traits"),d=this.get("classes");return a.components=[],a.classes=[],a.traits=[],b.length&&b.each(function(b,c){a.components[c]=b.clone()}),c.length&&c.each(function(b,c){a.traits[c]=b.clone()}),d.length&&d.each(function(b,c){a.classes[c]=b.get("name")}),a.status="",a.view="",new this.constructor(a,this.opt)},getName:function(){if(!this.name){var a=(this.cid.replace(/\D/g,""),this.get("type")),b=this.get("tagName");b="div"==b?"box":b,b=a?a:b,this.name=b.charAt(0).toUpperCase()+b.slice(1)}return this.name},toHTML:function(a){var b="",c=this,d=c.get("tagName"),e=c.get("void"),f="",g="",h=this.getAttrToHTML();for(var i in h){var j=h[i];g+=void 0!==typeof j&&""!==j?" "+i+'="'+j+'"':""}var k="";return c.get("classes").each(function(a){k+=" "+a.get("name")}),k=""!==k?' class="'+k.trim()+'"':"",_.isEmpty(c.get("style"))||(f=' id="'+c.cid+'" '),b+="<"+d+k+f+g+(e?"/":"")+">"+c.get("content"),c.get("components").each(function(a){b+=a.toHTML()}),e||(b+=""),b},getAttrToHTML:function(){var a=this.get("attributes")||{};return delete a.style,a}},{isComponent:function(a){return{tagName:a.tagName?a.tagName.toLowerCase():""}}})}),c("DomComponents/view/ComponentsView",["backbone","require"],function(a,b){return a.View.extend({initialize:function(a){this.opts=a||{},this.config=a.config||{},this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render)},addTo:function(a){var b=this.collection.indexOf(a);this.addToCollection(a,null,b),this.config.em&&this.config.em.trigger("add:component",a)},addToCollection:function(a,c,d){this.compView||(this.compView=b("./ComponentView"));for(var e=c||null,f=this.compView,g=this.opts.defaultTypes,h=this.opts.componentTypes,i=a.get("type"),j=0;j=0&&(b.html=d.em.getHtml()),c.indexOf("components")>=0&&(b.components=JSON.stringify(d.em.getComponents())),a||d.stm.store(b),b}},getComponent:function(){return b},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(a){return this.getComponents().add(a)},render:function(){return c.render().el},clear:function(){for(var a=this.getComponents(),b=0,c=a.length;b div")},render:function(){return this.$el.attr({"class":this.ppfx+"frame"}),this}})}),c("Canvas/view/CanvasView",["backbone","./FrameView"],function(a,b){return a.View.extend({initialize:function(a){_.bindAll(this,"renderBody","onFrameScroll","clearOff"),this.config=a.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 b({model:this.model.get("frame"),config:this.config})},onFrameScroll:function(){var a="px",b=this.frame.el.contentDocument.body;this.toolsEl.style.top="-"+b.scrollTop+a,this.toolsEl.style.left="-"+b.scrollLeft+a,this.em.trigger("canvasScroll")},renderBody:function(){var a=this.model.get("frame").get("wrapper");if(a){var b=this.ppfx,c=this.frame.$el.contents().find("body"),d=this.config.em.get("CssComposer"),e=this.config.em.get("Config");c.append(a.render()).append(d.render());var f=e.protectedCss,g="."+b+"dashed :not([contenteditable]) > *{outline: 1px dashed rgba(170,170,170,0.7); outline-offset: -2px}."+b+"comp-selected{outline: 3px solid #3b97e3 !important}."+b+"no-select{user-select: none; -webkit-user-select:none; -moz-user-select: none}."+b+"freezed{opacity: 0.5; pointer-events: none}."+b+"no-pointer{pointer-events: none}."+b+"plh-image{background:#f5f5f5; border:none; height:50px; width:50px; display:block; outline:3px solid #ffca6f; cursor:pointer}."+b+"grabbing{cursor: grabbing; cursor: -webkit-grabbing}* ::-webkit-scrollbar-track {background: rgba(0, 0, 0, 0.1)}* ::-webkit-scrollbar-thumb {background: rgba(255, 255, 255, 0.2)}* ::-webkit-scrollbar {width: 10px}"+(e.canvasCss||"");f&&c.append(""),this.config.em.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.udpateOffset();var h=document,i=this.frame.el.contentDocument;i.addEventListener("keydown",function(a){h.dispatchEvent(new KeyboardEvent(a.type,a))}),i.addEventListener("keyup",function(a){h.dispatchEvent(new KeyboardEvent(a.type,a))})}},offset:function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument.body;return{top:b.top+c.scrollTop,left:b.left+c.scrollLeft}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(){return this.frmOff||(this.frmOff=this.offset(this.frame.el)),this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(a){var b=this.getFrameOffset(),c=this.getCanvasOffset(),d=this.offset(a),e=d.top+b.top-c.top,f=d.left+b.left-c.left;return{top:e,left:f,height:a.offsetHeight,width:a.offsetWidth}},getPosition:function(){var a=this.frame.el.contentDocument.body,b=this.getFrameOffset(),c=this.getCanvasOffset();return{top:b.top+a.scrollTop-c.top,left:b.left+a.scrollLeft-c.left}},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 a=this.frame;a.el.onload=this.renderBody}var b=this.ppfx;this.toolsEl=$("
",{id:b+"tools"}).get(0),this.hlEl=$("
",{"class":b+"highlighter"}).get(0),this.badgeEl=$("
",{"class":b+"badge"}).get(0),this.placerEl=$("
",{"class":b+"placeholder"}).get(0),this.placerIntEl=$("
",{"class":b+"placeholder-int"}).get(0),this.ghostEl=$("
",{"class":b+"ghost"}).get(0),this.toolbarEl=$("
",{"class":b+"toolbar"}).get(0),this.resizerEl=$("
",{"class":b+"resizer"}).get(0),this.placerEl.appendChild(this.placerIntEl),this.toolsEl.appendChild(this.hlEl),this.toolsEl.appendChild(this.badgeEl),this.toolsEl.appendChild(this.placerEl),this.toolsEl.appendChild(this.ghostEl),this.toolsEl.appendChild(this.toolbarEl),this.toolsEl.appendChild(this.resizerEl),this.$el.append(this.toolsEl);var c=this.em.get("rte");return c&&this.toolsEl.appendChild(c.render()),this.$el.attr({"class":this.className}),this}})}),c("Canvas/main",["require","./config/config","./model/Canvas","./view/CanvasView"],function(a){return function(){var b,c={},d=a("./config/config"),e=a("./model/Canvas"),f=a("./view/CanvasView");return{getCanvasView:function(){return f},name:"Canvas",init:function(a){c=a||{};for(var g in d)g in c||(c[g]=d[g]);var h=c.pStylePrefix;h&&(c.stylePrefix=h+c.stylePrefix),b=new e(a),f=new f({model:b,config:c});var i=c.em.get("DomComponents");return i&&this.setWrapper(i),this},setWrapper:function(a){b.set("wrapper",a)},getElement:function(){return f.el},getFrameEl:function(){return f.frame.el},getBody:function(){return f.frame.el.contentDocument.body},getWrapperEl:function(){return this.getBody().querySelector("#wrapper")},getToolsEl:function(){return f.toolsEl},getHighlighter:function(){return f.hlEl},getBadgeEl:function(){return f.badgeEl},getPlacerEl:function(){return f.placerEl},getGhostEl:function(){return f.ghostEl},getToolbarEl:function(){return f.toolbarEl},getResizerEl:function(){return f.resizerEl},render:function(){return f.render().el},getOffset:function(){var a=this.offset(this.getFrameEl()),b=this.offset(this.getElement());return{top:a.top-b.top,left:a.left-b.left}},offset:function(a){var b=a.getBoundingClientRect();return{top:b.top+document.body.scrollTop,left:b.left+document.body.scrollLeft}},getTargetToElementDim:function(a,b,d){var e=d||{},g=f.getPosition(),h=f.getElementPos(b),i=d.toRight||0,j=e.targetHeight||a.offsetHeight,k=e.targetWidth||a.offsetWidth,l=e.event||null,m=h.top-j,n=h.left;n+=i?h.width:0,n=i?n-k:n;var o=nh.top+h.height?h.top+h.height:p;var q={top:p,left:o,elementTop:h.top,elementLeft:h.left,elementWidth:h.width,elementHeight:h.height,targetWidth:a.offsetWidth,targetHeight:a.offsetHeight,canvasTop:g.top,canvasLeft:g.left};return l&&c.em&&c.em.trigger(l,q),q},getMouseRelativePos:function(a,b){var c=b||{},d=0,e=0,f=c.subWinOffset,g=a.target.ownerDocument,h=g.defaultView||g.parentWindow,i=h.frameElement,j=f?h.pageYOffset:0,k=f?h.pageXOffset:0;if(i){var l=i.getBoundingClientRect();d=l.top||0,e=l.left||0}return{y:a.clientY+d-j,x:a.clientX+e-k}},getFrameWrapperEl:function(){return f.frame.getWrapper()}}}}),c("Canvas",["Canvas/main"],function(a){return a}),c("Commands/config/config",[],function(){return{ESCAPE_KEY:27,stylePrefix:"com-",defaults:[],em:null,firstCentered:!0,newFixedH:!1,minComponentH:50,minComponentW:50}}),c("Commands/view/CommandAbstract",["backbone"],function(a){return a.View.extend({initialize:function(a){this.config=a||{},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=$(this.getCanvasWrapper()),this.frameEl=this.canvas.getFrameEl(),this.canvasTool=this.getCanvasTools(),this.bodyEl=this.getCanvasBody()),this.init(this.config)},onFrameScroll:function(a){},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(a){var b=a.getBoundingClientRect();return{top:b.top+a.ownerDocument.body.scrollTop,left:b.left+a.ownerDocument.body.scrollLeft}},init:function(a){},run:function(a,b){},stop:function(a,b){}})}),c("Abstract/view/DomainViews",["backbone"],function(a){return a.View.extend({itemView:"",itemsView:"",itemType:"type",initialize:function(a,b){this.config=b||{}},addTo:function(a){this.add(a)},add:function(a,b){var c=b||null,d=this.itemView,e=a.get(this.itemType);this.itemsView&&this.itemsView[e]&&(d=this.itemsView[e]);var f=new d({model:a,config:this.config},this.config),g=f.render().el;c?c.appendChild(g):this.$el.append(g)},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.length&&this.collection.each(function(b){this.add(b,a)},this),this.$el.append(a),this}})}),c("DomComponents/view/ToolbarButtonView",["backbone"],function(a){return a.View.extend({events:{mousedown:"handleClick"},attributes:function(){return this.model.get("attributes")},initialize:function(a){this.editor=a.config.editor},handleClick:function(){var a=this.model.get("command");"function"==typeof a&&a(this.editor),"string"==typeof a&&this.editor.runCommand(a)},render:function(){var a=this.editor.getConfig();return this.el.className+=" "+a.stylePrefix+"toolbar-item",this}})}),c("DomComponents/view/ToolbarView",["backbone","Abstract/view/DomainViews","./ToolbarButtonView"],function(a,b,c){return b.extend({itemView:c,initialize:function(a){this.config={editor:a.editor||""},this.listenTo(this.collection,"reset",this.render)}})}),c("DomComponents/model/ToolbarButton",["backbone"],function(a){return a.Model.extend({defaults:{command:"",attributes:{}}})}),c("DomComponents/model/Toolbar",["backbone","./ToolbarButton"],function(a,b){return a.Collection.extend({model:b})}),c("Commands/view/SelectComponent",["require","DomComponents/view/ToolbarView","DomComponents/model/Toolbar"],function(a){var b=a("DomComponents/view/ToolbarView"),c=a("DomComponents/model/Toolbar");return{init:function(a){_.bindAll(this,"onHover","onOut","onClick","onKeyPress")},enable:function(){_.bindAll(this,"copyComp","pasteComp","onFrameScroll"),this.frameOff=this.canvasOff=this.adjScroll=null;var a=this.config.em.get("Config");this.startSelectComponent(),this.toggleClipboard(a.copyPaste);var b=this.config.em;b.on("change:canvasOffset",this.onFrameScroll),b.on("change:selectedComponent",this.updateToolbar,this)},toggleClipboard:function(a){var b=a||0;b?(key("⌘+c, ctrl+c",this.copyComp),key("⌘+v, ctrl+v",this.pasteComp)):(key.unbind("⌘+c, ctrl+c"),key.unbind("⌘+v, ctrl+v"))},copyComp:function(){var a=this.editorModel.get("selectedComponent");a&&a.get("copyable")&&this.editorModel.set("clipboard",a)},pasteComp:function(){var a=this.editorModel.get("clipboard"),b=this.editorModel.get("selectedComponent");if(a&&b&&b.collection){var c=b.collection.indexOf(b),d=a.clone();b.collection.add(d,{at:c+1})}},startSelectComponent:function(){this.selEl=$(this.getCanvasBody()).find("*"),this.selEl.on("mouseover",this.onHover).on("mouseout",this.onOut).on("click",this.onClick);var a=this.getContentWindow();a.on("scroll",this.onFrameScroll),a.on("keydown",this.onKeyPress)},stopSelectComponent:function(){this.selEl&&this.selEl.trigger("mouseout").off("mouseover",this.onHover).off("mouseout",this.onOut).off("click",this.onClick),this.selEl=null;var a=this.getContentWindow();a.off("scroll",this.onFrameScroll),a.off("keydown",this.onKeyPress)},onKeyPress:function(a){var b=a.which||a.keyCode,c=this.editorModel.get("selectedComponent"),d="BODY"!==this.frameEl.contentDocument.activeElement.tagName;if((8==b||46==b)&&(d||a.preventDefault(),c&&!d)){if(!c.get("removable"))return;c.set("status",""),c.destroy(),this.hideBadge(),this.clean(),this.hideHighlighter(),this.editorModel.set("selectedComponent",null)}},onHover:function(a){a.stopPropagation();var b=a.target;this.adjScroll||(this.adjScroll=1,this.onFrameScroll(a));var c=this.getElementPos(b);this.updateBadge(b,c),this.updateHighlighter(b,c)},onOut:function(a){a.stopPropagation(),this.hideBadge(),this.hideHighlighter()},hideHighlighter:function(){this.canvas.getHighlighter().style.display="none"},onClick:function(a){var b=$(a.target).data("model");if(b){var c=b.get("stylable");(c instanceof Array||c)&&this.onSelect(a,a.target)}},updateBadge:function(a,b){var c=$(a);this.cacheEl=a;var d=c.data("model");if(d&&d.get("badgable")){var e=this.getBadge();e.innerHTML=d.getName();var f=e.style,g="px";f.display="block";var h=this.canvas.getCanvasView().getPosition(),i=e?e.offsetHeight:0,j=e?e.offsetWidth:0,k=b.top-ie.top+e.height?e.top+e.height:k,f.top=k+g,f.left=j+g},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},clean:function(){this.selEl&&this.selEl.removeClass(this.hoverClass)},getBadge:function(){return this.canvas.getBadgeEl()},onFrameScroll:function(a){var b=this.cacheEl;if(b){var c=this.getElementPos(b);this.updateBadge(b,c);var d=this.editorModel.get("selectedComponent"); +var a=[],b=this.getTarget();if(!b)return a;var c=b.get("style");return this.model.get("properties").each(function(b){var d=c[b.get("property")];if(d)for(var e=d.split(","),f=0,g=e.length;f",{"class":"clear"})),this.$el.attr("class",this.pfx+"properties"),this}})}),c("text!StyleManager/templates/sector.html",[],function(){return'
\n \n <%= label %>\n
'}),c("StyleManager/view/SectorView",["backbone","./PropertiesView","text!./../templates/sector.html"],function(a,b,c){return a.View.extend({template:_.template(c),events:{},initialize:function(a){this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.target=a.target||{},this.propTarget=a.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.events["click ."+this.pfx+"title"]="toggle",this.delegateEvents()},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 a=this.model.get("open")?0:1;this.model.set("open",a)},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 a=this.model.get("properties");if(a){var c=new b({collection:a,target:this.target,propTarget:this.propTarget,config:this.config});this.$el.append(c.render().el)}}})}),c("StyleManager/view/SectorsView",["backbone","./SectorView"],function(a,b){return a.View.extend({initialize:function(b){this.config=b.config||{},this.pfx=this.config.stylePrefix||"",this.target=b.target||{},this.propTarget={},_.extend(this.propTarget,a.Events),this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render),this.listenTo(this.target,"change:selectedComponent targetClassAdded targetClassRemoved targetClassUpdated targetStateUpdated targetStyleUpdated change:device",this.targetUpdated)},addTo:function(a){this.addToCollection(a)},targetUpdated:function(){var a=this.target.get("selectedComponent");if(a){var b=this.target.get("Config").devicePreviewMode,c=a.get("classes"),d=this.propTarget,e=this.target.getDeviceModel(),f=b?"":a.get("state"),g=e&&!b?e.get("width"):"";if(d.helper=null,c.length){var h=this.target.get("CssComposer"),i=_.filter(c.models,function(a){return a.get("active")}),j=h.get(i,f,g);if(j||(j=h.add(i,f,g),j.set("style",a.get("style")),a.set("style",{})),f){var k=this.target.get("SelectorManager"),l=k.add("hc-state"),m=h.get([l]);m?(h.getAll().remove(m),h.getAll().add(m)):m=h.add([l]),m.set("style",j.get("style")),d.helper=m}return d.model=j,void d.trigger("update")}d.model=a,d.trigger("update")}},addToCollection:function(a,c){var d=c||null,e=b,f=new e({model:a,id:this.pfx+a.get("name").replace(" ","_").toLowerCase(),name:a.get("name"),properties:a.get("properties"),target:this.target,propTarget:this.propTarget,config:this.config}),g=f.render().el;return d?d.appendChild(g):this.$el.append(g),g},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addToCollection(b,a)},this),this.$el.attr("id",this.pfx+"sectors"),this.$el.append(a),this}})}),c("StyleManager/main",["require","./config/config","./model/Sectors","./view/SectorsView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Sectors"),g=a("./view/SectorsView");return{name:"StyleManager",getConfig:function(){return d},init:function(a){d=a||{};for(var h in e)h in d||(d[h]=e[h]);var i=d.pStylePrefix;return i&&(d.stylePrefix=i+d.stylePrefix),b=new f(d.sectors),c=new g({collection:b,target:d.em,config:d}),this},addSector:function(a,c){var d=this.getSector(a);return d||(c.id=a,d=b.add(c)),d},getSector:function(a){var c=b.where({id:a});return c.length?c[0]:null},getSectors:function(){return b},addProperty:function(a,b){var c=null,d=this.getSector(a);return d&&(c=d.get("properties").add(b)),c},getProperty:function(a,b){var c=null,d=this.getSector(a);return d&&(c=d.get("properties").where({property:b}),c=1==c.length?c[0]:c),c},getProperties:function(a){var b=null,c=this.getSector(a);return c&&(b=c.get("properties")),b},getModelToStyle:function(a){var b=a.get("classes");if(d.em&&b&&b.length){var c=d.em.get("Config").devicePreviewMode,e=d.em.getDeviceModel(),f=c?"":a.get("state"),g=e&&!c?e.get("width"):"",h=d.em.get("CssComposer"),i=_.filter(b.models,function(a){return a.get("active")}),j=h.get(i,f,g);if(j)return j}return a},render:function(){return c.render().el}}}}),c("StyleManager",["StyleManager/main"],function(a){return a}),c("AssetManager/model/Asset",["backbone"],function(a){return a.Model.extend({idAttribute:"src",defaults:{type:"",src:""},getFilename:function(){return this.get("src").split("/").pop()},getExtension:function(){return this.getFilename().split(".").pop()}})}),c("AssetManager/model/AssetImage",["backbone","./Asset"],function(a,b){return b.extend({defaults:_.extend({},b.prototype.defaults,{type:"image",unitDim:"px",height:0,width:0})})}),c("AssetManager/model/Assets",["backbone","./Asset","./AssetImage"],function(a,b,c){return a.Collection.extend({model:c,initialize:function(a,b){this.model=function(a,b){var d;switch(a.type){default:d=new c(a,b)}return d}},addImg:function(a,b){return this.add({type:"image",src:a},b),this},add:function(b,c){var d=[];b=b instanceof Array?b:[b];for(var e=0,f=b.length;e\n
\n
\n
\n
\n\t
<%= name %>
\n\t
<%= dim %>
\n
\n
\n
'}),c("AssetManager/view/AssetImageView",["./AssetView","text!./../template/assetImage.html"],function(a,b){return a.extend({events:{click:"handleClick",dblclick:"handleDblClick"},template:_.template(b),initialize:function(b){a.prototype.initialize.apply(this,arguments),this.className+=" "+this.pfx+"asset-image",this.events["click #"+this.pfx+"close"]="removeItem",this.delegateEvents()},handleClick:function(){var a=this.config.onClick,b=this.model;b.collection.trigger("deselectAll"),this.$el.addClass(this.pfx+"highlight"),"function"==typeof a?a(b):this.updateTarget(b.get("src"))},handleDblClick:function(){var a=this.config.onDblClick,b=this.model;"function"==typeof a?a(b):this.updateTarget(b.get("src"));var c=b.collection.onSelect;"function"==typeof c&&c(this.model)},updateTarget:function(a){var b=this.model.collection.target;if(b&&b.set){var c=_.clone(b.get("attributes"));b.set("attributes",c),b.set("src",a)}},removeItem:function(a){a.stopPropagation(),this.model.collection.remove(this.model)},render:function(){var a=this.model.get("name"),b=this.model.get("width")&&this.model.get("height")?this.model.get("width")+" x "+this.model.get("height"):"";return a=a?a:this.model.get("src").split("/").pop(),a=a&&a.length>30?a.substring(0,30)+"...":a,b=b?b+(this.model.get("unitDim")?this.model.get("unitDim"):" px"):"",this.$el.html(this.template({name:a,src:this.model.get("src"),dim:b,pfx:this.pfx,ppfx:this.ppfx})),this.$el.attr("class",this.className),this}})}),c("text!AssetManager/template/fileUploader.html",[],function(){return'
\n\t
<%= title %>
\n\t multiple/>\n\t
\n
'}),c("AssetManager/view/FileUploader",["backbone","text!./../template/fileUploader.html"],function(a,b){return a.View.extend({template:_.template(b),events:{},initialize:function(a){this.options=a||{},this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.target=this.collection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=!this.config.upload,this.events["change #"+this.uploadId]="uploadFile",this.delegateEvents()},uploadFile:function(a){for(var b=a.dataTransfer?a.dataTransfer.files:a.target.files,c=new FormData,d=0;d\n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n
\n
\n'}),c("AssetManager/view/AssetsView",["backbone","./AssetView","./AssetImageView","./FileUploader","text!./../template/assets.html"],function(a,b,c,d,e){return a.View.extend({template:_.template(e),initialize:function(a){this.options=a,this.config=a.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.collection,"add",this.addToAsset),this.listenTo(this.collection,"deselectAll",this.deselectAll),this.className=this.pfx+"assets",this.events={},this.events.submit="addFromStr",this.delegateEvents()},addFromStr:function(a){a.preventDefault();var b=this.getInputUrl(),c=b.value.trim();if(c)return this.collection.addImg(c,{at:0}),this.getAssetsEl().scrollTop=0,b.value="",this},getAssetsEl:function(){return this.assets=this.el.querySelector("."+this.pfx+"assets"),this.assets},getInputUrl:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector("."+this.pfx+"add-asset input")),this.inputUrl},addToAsset:function(a){this.addAsset(a)},addAsset:function(a,d){var e=d||null,f=b;a.get("type").indexOf("image")>-1&&(f=c);var g=new f({model:a,config:this.config}),h=g.render().el;if(e)e.appendChild(h);else{var i=this.getAssetsEl();i&&i.insertBefore(h,i.firstChild)}return h},deselectAll:function(){this.$el.find("."+this.pfx+"highlight").removeClass(this.pfx+"highlight")},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.addAsset(b,a)},this),this.$el.html(this.template({pfx:this.pfx,ppfx:this.ppfx,btnText:this.config.addBtnText})),this.$el.find("."+this.pfx+"assets").append(a),this}})}),c("AssetManager/config/config",[],function(){return{assets:[],stylePrefix:"am-",upload:"http://localhost/assets/upload",uploadText:"Drop files here or click to upload",addBtnText:"Add image"}}),c("AssetManager/main",["require","./model/Assets","./view/AssetsView","./view/FileUploader","./config/config"],function(a){return function(){var b,c,d,e={},f=a("./model/Assets"),g=a("./view/AssetsView"),h=a("./view/FileUploader");return{name:"AssetManager",storageKey:"assets",init:function(i){e=i||{};var j=a("./config/config");for(var k in j)k in e||(e[k]=j[k]);var l=e.pStylePrefix;l&&(e.stylePrefix=l+e.stylePrefix),b=new f(e.assets);var m={collection:b,config:e};return c=new g(m),d=new h(m),this},add:function(a){return b.add(a)},get:function(a){return b.where({src:a})[0]},getAll:function(){return b},remove:function(a){var b=this.get(a);return this.getAll().remove(b),this},store:function(a){var b={},c=JSON.stringify(this.getAll().toJSON());return b[this.storageKey]=c,!a&&e.stm&&e.stm.store(b),b},load:function(a){var b=a||"",c=this.storageKey;!b&&e.stm&&(b=e.stm.load(c));var d=[];try{d=JSON.parse(b[c])}catch(f){}return this.getAll().add(d),d},render:function(a){return this.rendered&&!a||(this.rendered=c.render().$el.add(d.render().$el)),this.rendered},setTarget:function(a){c.collection.target=a},onSelect:function(a){c.collection.onSelect=a},onClick:function(a){e.onClick=a},onDblClick:function(a){e.onDblClick=a}}}}),c("AssetManager",["AssetManager/main"],function(a){return a}),c("CssComposer/config/config",[],function(){return{stylePrefix:"css-",staticRules:"",rules:[]}}),c("CssComposer/model/Selectors",["backbone","require"],function(a,b){return a.Collection.extend({initialize:function(a,c){this.model=function(a,c){var d;return this.ClassTag||(this.ClassTag=b("SelectorManager/model/Selector")),d=new this.ClassTag(a,c)}}})}),c("CssComposer/model/CssRule",["backbone","./Selectors"],function(a,b){return a.Model.extend({defaults:{selectors:{},style:{},maxWidth:"",state:"",stylable:!0},initialize:function(a,c){if(this.config=a||{},this.sm=c?c.sm||{}:{},this.slct=this.config.selectors||[],this.sm.get){for(var d=[],e=0;e=0&&(c.css=d.em.getCss()),e.indexOf("styles")>=0&&(c.styles=JSON.stringify(b)),a||d.stm.store(c),c}},add:function(a,c,d){var e=c||"",g=d||"",h=this.get(a,e,g);return h?h:(h=new f({state:e,maxWidth:g}),h.get("selectors").add(a),b.add(h),h)},get:function(a,c,d){var e=null;return b.each(function(b){e||b.compare(a,c,d)&&(e=b)}),e},getAll:function(){return b},addCollection:function(a){for(var b=[],c=a instanceof Array?a:[a],e=0,f=c.length;e=0&&this.set("void",!0),this.opt=e,this.sm=e?e.sm||{}:{},this.config=a||{},this.defaultC=this.config.components||[],this.defaultCl=this.normalizeClasses(this.get("classes")||this.config.classes||[]),this.components=new b(this.defaultC,e),this.components.parent=this,this.set("components",this.components),this.set("classes",new c(this.defaultCl));var f=new d;f.setTarget(this),f.add(this.get("traits")),this.set("traits",f),this.initToolbar(),this.init()},init:function(){},initToolbar:function(){var a=this;if(!a.get("toolbar")){var b=[];a.get("draggable")&&b.push({attributes:{"class":"fa fa-arrows"},command:"tlb-move"}),a.get("copyable")&&b.push({attributes:{"class":"fa fa-clone"},command:"tlb-clone"}),a.get("removable")&&b.push({attributes:{"class":"fa fa-trash-o"},command:"tlb-delete"}),a.set("toolbar",b)}},loadTraits:function(a){var b=new d;b.setTarget(this),b.add(a),this.set("traits",b)},normalizeClasses:function(a){var b=[];if(this.sm.get){var c=this.sm.get("SelectorManager");if(c)return a.forEach(function(a){var d="";d="string"==typeof a?a:a.name;var e=c.add(d);b.push(e)}),b}},clone:function(){var a=_.clone(this.attributes),b=this.get("components"),c=this.get("traits"),d=this.get("classes");return a.components=[],a.classes=[],a.traits=[],b.length&&b.each(function(b,c){a.components[c]=b.clone()}),c.length&&c.each(function(b,c){a.traits[c]=b.clone()}),d.length&&d.each(function(b,c){a.classes[c]=b.get("name")}),a.status="",a.view="",new this.constructor(a,this.opt)},getName:function(){if(!this.name){var a=(this.cid.replace(/\D/g,""),this.get("type")),b=this.get("tagName");b="div"==b?"box":b,b=a?a:b,this.name=b.charAt(0).toUpperCase()+b.slice(1)}return this.name},toHTML:function(a){var b="",c=this,d=c.get("tagName"),e=c.get("void"),f="",g="",h=this.getAttrToHTML();for(var i in h){var j=h[i];g+=void 0!==typeof j&&""!==j?" "+i+'="'+j+'"':""}var k="";return c.get("classes").each(function(a){k+=" "+a.get("name")}),k=""!==k?' class="'+k.trim()+'"':"",_.isEmpty(c.get("style"))||(f=' id="'+c.cid+'" '),b+="<"+d+k+f+g+(e?"/":"")+">"+c.get("content"),c.get("components").each(function(a){b+=a.toHTML()}),e||(b+=""),b},getAttrToHTML:function(){var a=this.get("attributes")||{};return delete a.style,a}},{isComponent:function(a){return{tagName:a.tagName?a.tagName.toLowerCase():""}}})}),c("DomComponents/view/ComponentsView",["backbone","require"],function(a,b){return a.View.extend({initialize:function(a){this.opts=a||{},this.config=a.config||{},this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset",this.render)},addTo:function(a){var b=this.collection.indexOf(a);this.addToCollection(a,null,b),this.config.em&&this.config.em.trigger("add:component",a)},addToCollection:function(a,c,d){this.compView||(this.compView=b("./ComponentView"));for(var e=c||null,f=this.compView,g=this.opts.defaultTypes,h=this.opts.componentTypes,i=a.get("type"),j=0;j=0&&(b.html=d.em.getHtml()),c.indexOf("components")>=0&&(b.components=JSON.stringify(d.em.getComponents())),a||d.stm.store(b),b}},getComponent:function(){return b},getWrapper:function(){return this.getComponent()},getComponents:function(){return this.getWrapper().get("components")},addComponent:function(a){return this.getComponents().add(a)},render:function(){return c.render().el},clear:function(){for(var a=this.getComponents(),b=0,c=a.length;b div")},render:function(){return this.$el.attr({"class":this.ppfx+"frame"}),this}})}),c("Canvas/view/CanvasView",["backbone","./FrameView"],function(a,b){return a.View.extend({initialize:function(a){_.bindAll(this,"renderBody","onFrameScroll","clearOff"),this.config=a.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 b({model:this.model.get("frame"),config:this.config})},onFrameScroll:function(){var a="px",b=this.frame.el.contentDocument.body;this.toolsEl.style.top="-"+b.scrollTop+a,this.toolsEl.style.left="-"+b.scrollLeft+a,this.em.trigger("canvasScroll")},renderBody:function(){var a=this.model.get("frame").get("wrapper");if(a){var b=this.ppfx,c=this.frame.$el.contents().find("body"),d=this.config.em.get("CssComposer"),e=this.config.em.get("Config");c.append(a.render()).append(d.render());var f=e.protectedCss,g="."+b+"dashed :not([contenteditable]) > *{outline: 1px dashed rgba(170,170,170,0.7); outline-offset: -2px}."+b+"comp-selected{outline: 3px solid #3b97e3 !important}."+b+"no-select{user-select: none; -webkit-user-select:none; -moz-user-select: none}."+b+"freezed{opacity: 0.5; pointer-events: none}."+b+"no-pointer{pointer-events: none}."+b+"plh-image{background:#f5f5f5; border:none; height:50px; width:50px; display:block; outline:3px solid #ffca6f; cursor:pointer}."+b+"grabbing{cursor: grabbing; cursor: -webkit-grabbing}* ::-webkit-scrollbar-track {background: rgba(0, 0, 0, 0.1)}* ::-webkit-scrollbar-thumb {background: rgba(255, 255, 255, 0.2)}* ::-webkit-scrollbar {width: 10px}"+(e.canvasCss||"");f&&c.append(""),this.config.em.trigger("loaded"),this.frame.el.contentWindow.onscroll=this.onFrameScroll,this.frame.udpateOffset();var h=document,i=this.frame.el.contentDocument;i.addEventListener("keydown",function(a){h.dispatchEvent(new KeyboardEvent(a.type,a))}),i.addEventListener("keyup",function(a){h.dispatchEvent(new KeyboardEvent(a.type,a))})}},offset:function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument.body;return{top:b.top+c.scrollTop,left:b.left+c.scrollLeft}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(){return this.frmOff||(this.frmOff=this.offset(this.frame.el)),this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(a){var b=this.getFrameOffset(),c=this.getCanvasOffset(),d=this.offset(a),e=d.top+b.top-c.top,f=d.left+b.left-c.left;return{top:e,left:f,height:a.offsetHeight,width:a.offsetWidth}},getPosition:function(){var a=this.frame.el.contentDocument.body,b=this.getFrameOffset(),c=this.getCanvasOffset();return{top:b.top+a.scrollTop-c.top,left:b.left+a.scrollLeft-c.left}},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 a=this.frame;a.el.onload=this.renderBody}var b=this.ppfx;this.toolsEl=$("
",{id:b+"tools"}).get(0),this.hlEl=$("
",{"class":b+"highlighter"}).get(0),this.badgeEl=$("
",{"class":b+"badge"}).get(0),this.placerEl=$("
",{"class":b+"placeholder"}).get(0),this.placerIntEl=$("
",{"class":b+"placeholder-int"}).get(0),this.ghostEl=$("
",{"class":b+"ghost"}).get(0),this.toolbarEl=$("
",{"class":b+"toolbar"}).get(0),this.resizerEl=$("
",{"class":b+"resizer"}).get(0),this.placerEl.appendChild(this.placerIntEl),this.toolsEl.appendChild(this.hlEl),this.toolsEl.appendChild(this.badgeEl),this.toolsEl.appendChild(this.placerEl),this.toolsEl.appendChild(this.ghostEl),this.toolsEl.appendChild(this.toolbarEl),this.toolsEl.appendChild(this.resizerEl),this.$el.append(this.toolsEl);var c=this.em.get("rte");return c&&this.toolsEl.appendChild(c.render()),this.$el.attr({"class":this.className}),this}})}),c("Canvas/main",["require","./config/config","./model/Canvas","./view/CanvasView"],function(a){return function(){var b,c={},d=a("./config/config"),e=a("./model/Canvas"),f=a("./view/CanvasView");return{getCanvasView:function(){return f},name:"Canvas",init:function(a){c=a||{};for(var g in d)g in c||(c[g]=d[g]);var h=c.pStylePrefix;h&&(c.stylePrefix=h+c.stylePrefix),b=new e(a),f=new f({model:b,config:c});var i=c.em.get("DomComponents");return i&&this.setWrapper(i),this},setWrapper:function(a){b.set("wrapper",a)},getElement:function(){return f.el},getFrameEl:function(){return f.frame.el},getBody:function(){return f.frame.el.contentDocument.body},getWrapperEl:function(){return this.getBody().querySelector("#wrapper")},getToolsEl:function(){return f.toolsEl},getHighlighter:function(){return f.hlEl},getBadgeEl:function(){return f.badgeEl},getPlacerEl:function(){return f.placerEl},getGhostEl:function(){return f.ghostEl},getToolbarEl:function(){return f.toolbarEl},getResizerEl:function(){return f.resizerEl},render:function(){return f.render().el},getOffset:function(){var a=this.offset(this.getFrameEl()),b=this.offset(this.getElement());return{top:a.top-b.top,left:a.left-b.left}},offset:function(a){var b=a.getBoundingClientRect();return{top:b.top+document.body.scrollTop,left:b.left+document.body.scrollLeft}},getTargetToElementDim:function(a,b,d){var e=d||{},g=f.getPosition(),h=f.getElementPos(b),i=d.toRight||0,j=e.targetHeight||a.offsetHeight,k=e.targetWidth||a.offsetWidth,l=e.event||null,m=h.top-j,n=h.left;n+=i?h.width:0,n=i?n-k:n;var o=nh.top+h.height?h.top+h.height:p;var q={top:p,left:o,elementTop:h.top,elementLeft:h.left,elementWidth:h.width,elementHeight:h.height,targetWidth:a.offsetWidth,targetHeight:a.offsetHeight,canvasTop:g.top,canvasLeft:g.left};return l&&c.em&&c.em.trigger(l,q),q},getMouseRelativePos:function(a,b){var c=b||{},d=0,e=0,f=c.subWinOffset,g=a.target.ownerDocument,h=g.defaultView||g.parentWindow,i=h.frameElement,j=f?h.pageYOffset:0,k=f?h.pageXOffset:0;if(i){var l=i.getBoundingClientRect();d=l.top||0,e=l.left||0}return{y:a.clientY+d-j,x:a.clientX+e-k}},getFrameWrapperEl:function(){return f.frame.getWrapper()}}}}),c("Canvas",["Canvas/main"],function(a){return a}),c("Commands/config/config",[],function(){return{ESCAPE_KEY:27,stylePrefix:"com-",defaults:[],em:null,firstCentered:!0,newFixedH:!1,minComponentH:50,minComponentW:50}}),c("Commands/view/CommandAbstract",["backbone"],function(a){return a.View.extend({initialize:function(a){this.config=a||{},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=$(this.getCanvasWrapper()),this.frameEl=this.canvas.getFrameEl(),this.canvasTool=this.getCanvasTools(),this.bodyEl=this.getCanvasBody()),this.init(this.config)},onFrameScroll:function(a){},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(a){var b=a.getBoundingClientRect();return{top:b.top+a.ownerDocument.body.scrollTop,left:b.left+a.ownerDocument.body.scrollLeft}},init:function(a){},run:function(a,b){},stop:function(a,b){}})}),c("Abstract/view/DomainViews",["backbone"],function(a){return a.View.extend({itemView:"",itemsView:"",itemType:"type",initialize:function(a,b){this.config=b||{}},addTo:function(a){this.add(a)},add:function(a,b){var c=b||null,d=this.itemView,e=a.get(this.itemType);this.itemsView&&this.itemsView[e]&&(d=this.itemsView[e]);var f=new d({model:a,config:this.config},this.config),g=f.render().el;c?c.appendChild(g):this.$el.append(g)},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.length&&this.collection.each(function(b){this.add(b,a)},this),this.$el.append(a),this}})}),c("DomComponents/view/ToolbarButtonView",["backbone"],function(a){return a.View.extend({events:{mousedown:"handleClick"},attributes:function(){return this.model.get("attributes")},initialize:function(a){this.editor=a.config.editor},handleClick:function(){var a=this.model.get("command");"function"==typeof a&&a(this.editor),"string"==typeof a&&this.editor.runCommand(a)},render:function(){var a=this.editor.getConfig();return this.el.className+=" "+a.stylePrefix+"toolbar-item",this}})}),c("DomComponents/view/ToolbarView",["backbone","Abstract/view/DomainViews","./ToolbarButtonView"],function(a,b,c){return b.extend({itemView:c,initialize:function(a){this.config={editor:a.editor||""},this.listenTo(this.collection,"reset",this.render)}})}),c("DomComponents/model/ToolbarButton",["backbone"],function(a){return a.Model.extend({defaults:{command:"",attributes:{}}})}),c("DomComponents/model/Toolbar",["backbone","./ToolbarButton"],function(a,b){return a.Collection.extend({model:b})}),c("Commands/view/SelectComponent",["require","DomComponents/view/ToolbarView","DomComponents/model/Toolbar"],function(a){var b=a("DomComponents/view/ToolbarView"),c=a("DomComponents/model/Toolbar");return{init:function(a){_.bindAll(this,"onHover","onOut","onClick","onKeyPress")},enable:function(){_.bindAll(this,"copyComp","pasteComp","onFrameScroll"),this.frameOff=this.canvasOff=this.adjScroll=null;var a=this.config.em.get("Config");this.startSelectComponent(),this.toggleClipboard(a.copyPaste);var b=this.config.em;b.on("change:canvasOffset",this.onFrameScroll),b.on("change:selectedComponent",this.updateToolbar,this)},toggleClipboard:function(a){var b=a||0;b?(key("⌘+c, ctrl+c",this.copyComp),key("⌘+v, ctrl+v",this.pasteComp)):(key.unbind("⌘+c, ctrl+c"),key.unbind("⌘+v, ctrl+v"))},copyComp:function(){var a=this.editorModel.get("selectedComponent");a&&a.get("copyable")&&this.editorModel.set("clipboard",a)},pasteComp:function(){var a=this.editorModel.get("clipboard"),b=this.editorModel.get("selectedComponent");if(a&&b&&b.collection){var c=b.collection.indexOf(b),d=a.clone();b.collection.add(d,{at:c+1})}},startSelectComponent:function(){this.selEl=$(this.getCanvasBody()).find("*"),this.selEl.on("mouseover",this.onHover).on("mouseout",this.onOut).on("click",this.onClick);var a=this.getContentWindow();a.on("scroll",this.onFrameScroll),a.on("keydown",this.onKeyPress)},stopSelectComponent:function(){this.selEl&&this.selEl.trigger("mouseout").off("mouseover",this.onHover).off("mouseout",this.onOut).off("click",this.onClick),this.selEl=null;var a=this.getContentWindow();a.off("scroll",this.onFrameScroll),a.off("keydown",this.onKeyPress)},onKeyPress:function(a){var b=a.which||a.keyCode,c=this.editorModel.get("selectedComponent"),d="BODY"!==this.frameEl.contentDocument.activeElement.tagName;if((8==b||46==b)&&(d||a.preventDefault(),c&&!d)){if(!c.get("removable"))return;c.set("status",""),c.destroy(),this.hideBadge(),this.clean(),this.hideHighlighter(),this.editorModel.set("selectedComponent",null)}},onHover:function(a){a.stopPropagation();var b=a.target;this.adjScroll||(this.adjScroll=1,this.onFrameScroll(a));var c=this.getElementPos(b);this.updateBadge(b,c),this.updateHighlighter(b,c)},onOut:function(a){a.stopPropagation(),this.hideBadge(),this.hideHighlighter()},hideHighlighter:function(){this.canvas.getHighlighter().style.display="none"},onClick:function(a){var b=$(a.target).data("model");if(b){var c=b.get("stylable");(c instanceof Array||c)&&this.onSelect(a,a.target)}},updateBadge:function(a,b){var c=$(a);this.cacheEl=a;var d=c.data("model");if(d&&d.get("badgable")){var e=this.getBadge();e.innerHTML=d.getName();var f=e.style,g="px";f.display="block";var h=this.canvas.getCanvasView().getPosition(),i=e?e.offsetHeight:0,j=e?e.offsetWidth:0,k=b.top-ie.top+e.height?e.top+e.height:k,f.top=k+g,f.left=j+g},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},clean:function(){this.selEl&&this.selEl.removeClass(this.hoverClass)},getBadge:function(){return this.canvas.getBadgeEl()},onFrameScroll:function(a){var b=this.cacheEl;if(b){var c=this.getElementPos(b);this.updateBadge(b,c);var d=this.editorModel.get("selectedComponent"); if(d){var e=d.view;this.updateToolbarPos(e.el)}}},getElementPos:function(a,b){return this.canvas.getCanvasView().getElementPos(a)},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(a){a&&a.set({status:"",state:""})},getContentWindow:function(){return this.contWindow||(this.contWindow=$(this.frameEl.contentWindow)),this.contWindow},run:function(a){a&&a.get&&(this.editor=a.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.canvas.getToolbarEl().style.display="none",this.em.off("change:canvasOffset",this.onFrameScroll),this.em.off("change:selectedComponent",this.updateToolbar,this)}}}),c("Commands/view/SelectPosition",[],function(){return{startSelectPosition:function(a,b){this.isPointed=!1;var c=this.editorModel.get("Utils");c&&!this.sorter&&(this.sorter=new c.Sorter({container:this.getCanvasBody(),placer:this.canvas.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,direction:"a",document:b,wmargin:1,nested:1,em:this.editorModel})),this.sorter.startSort(a)},getOffsetDim:function(){var a=this.offset(this.canvas.getFrameEl()),b=this.offset(this.canvas.getElement()),c=a.top-b.top,d=a.left-b.left;return{top:c,left:d}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex="after"==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&"after"==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?$(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?$(this.cDim[this.posIndex][5]).parent():$(this.outsideElem),this.posTargetModel=this.posTargetEl.data("model"),this.posTargetCollection=this.posTargetEl.data("model-comp"))},enable:function(){this.startSelectPosition()},nearFloat:function(a,b,c){var d=a||0,e=b||"before",f=c.length,g=0!==f&&"after"==e&&d==f;return 0!==f&&(!g&&!c[d][4]||c[d-1]&&!c[d-1][4]||g&&!c[d-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css("cursor",""),this.$wrapper.unbind()}}}),c("Commands/view/CreateComponent",["backbone","./SelectPosition"],function(a,b){return _.extend({},b,{init:function(a){_.bindAll(this,"startDraw","draw","endDraw","rollback"),this.config=a||{},this.hType=this.config.newFixedH?"height":"min-height",this.allowDraw=1},enable:function(){b.enable.apply(this,arguments),this.$wr.css("cursor","crosshair"),this.allowDraw&&this.$wr.on("mousedown",this.startDraw),this.ghost=this.canvas.getGhostEl()},startDraw:function(a){a.preventDefault(),this.stopSelectPosition(),this.ghost.style.display="block",this.frameOff=this.getOffsetDim(),this.startPos={top:a.pageY+this.frameOff.top,left:a.pageX+this.frameOff.left},this.isDragged=!1,this.tempComponent={style:{}},this.beforeDraw(this.tempComponent),this.updateSize(this.startPos.top,this.startPos.left,0,0),this.toggleEvents(1)},toggleEvents:function(a){var b=a?"on":"off";this.$wr[b]("mousemove",this.draw),this.$wr[b]("mouseup",this.endDraw),this.$canvas[b]("mousemove",this.draw),$(document)[b]("mouseup",this.endDraw),$(document)[b]("keypress",this.rollback)},draw:function(a){this.isDragged=!0,this.updateComponentSize(a)},endDraw:function(a){this.toggleEvents();var b={};if(this.isDragged){this.updateComponentSize(a),this.setRequirements(this.tempComponent);var c=this.sorter.lastPos;b=this.create(this.sorter.target,this.tempComponent,c.index,c.method),this.sorter.prevTarget=null}this.ghost.style.display="none",this.startSelectPosition(),this.afterDraw(b)},create:function(a,b,c,d,e){c="after"===d?c+1:c;var f=e||{},g=$(a),h=g.data("model"),i=g.data("collection"),j=h?h.get("droppable"):1;return f.at=c,i&&j?i.add(b,f):void console.warn("Invalid target position")},setRequirements:function(a){var b=this.config,c=a.style;c.width.replace(/\D/g,"")"),e=this.codeMirror.clone().set({label:c,codeName:a,theme:b,input:d[0]}),f=new this.cm.EditorView({model:e,config:this.cm.getConfig()}).render().$el;return e.init(d[0]),{el:e,$el:f}},enable:function(){if(!this.$editors){var a=this.buildEditor("htmlmixed","hopscotch","HTML"),b=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=a.el,this.cssEditor=b.el,this.$editors=$("
",{"class":this.pfx+"export-dl"}),this.$editors.append(a.$el).append(b.$el)}this.modal&&(this.modal.setTitle("Export template"),this.modal.setContent(this.$editors),this.modal.open());var c=this.protCss||"";this.htmlEditor.setContent(this.cm.getCode(this.components,"html",this.cssc)),this.cssEditor.setContent(c+this.cm.getCode(this.wrapper,"css",this.cssc)),this.sender&&this.sender.set("active",!1)},stop:function(){}}}),c("Commands/view/SwitchVisibility",[],function(){return{run:function(a){a.Canvas.getBody().className=this.ppfx+"dashed"},stop:function(a){a.Canvas.getBody().className=""}}}),c("Navigator/config/config",[],function(){return{stylePrefix:"nv-",sortable:1,hidable:1,hideTextnode:1,containerId:"navigator",itemClass:"item",itemsClass:"items"}}),c("text!Navigator/template/item.html",[],function(){return'<% if (hidable) { %>\n\t\n<% } %>\n\n
\n
\n \t\n\t\t\n\t\t\n
\n
\n\n
<%= (count ? count : \'\') %>
\n\n
\n\t\n
\n\n
\n'}),c("Navigator/view/ItemView",["backbone","text!./../template/item.html","require"],function(a,b,c){return a.View.extend({template:_.template(b),initialize:function(a){this.opt=a,this.config=a.config,this.em=a.config.em,this.ppfx=this.em.get("Config").stylePrefix,this.sorter=a.sorter||{},this.pfx=this.config.stylePrefix,"undefined"==typeof this.model.get("open")&&this.model.set("open",!1),this.listenTo(this.model.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.customNameProp="custom-name",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")),a.config.sortable&&(this.events["mousedown > #"+this.pfx+"move"]="startSort"),this.delegateEvents()},handleEdit:function(a){a.stopPropagation();var b=this.getInputName();b.readOnly=!1,b.focus()},handleEditEnd:function(a){a.stopPropagation();var b=this.getInputName();b.readOnly=!0,this.model.set(this.customNameProp,b.value)},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector("."+this.inputNameCls)),this.inputName},updateOpening:function(){var a=this.opt.opened||{},b=this.model;b.get("open")?(this.$el.addClass("open"),this.$caret.addClass("fa-chevron-down"),a[b.cid]=b):(this.$el.removeClass("open"),this.$caret.removeClass("fa-chevron-down"),delete a[b.cid])},toggleOpening:function(a){a.stopPropagation(),this.model.components.length&&this.model.set("open",!this.model.get("open"))},handleSelect:function(a){if(a.stopPropagation(),this.em){var b=this.em.get("selectedComponent");b&&(b.set("status",""),this.model.set("status","selected"),this.em.set("selectedComponent",this.model))}},startSort:function(a){this.sorter&&this.sorter.startSort(a.target)},freeze:function(){this.$el.addClass(this.pfx+"opac50"),this.model.set("open",0)},unfreeze:function(){this.$el.removeClass(this.pfx+"opac50")},updateStatus:function(a){var b=this.model.get("status"),c=this.pfx;switch(b){case"selected":this.$el.addClass(c+"selected");break;case"moving":break;default:this.$el.removeClass(c+"selected")}},toggleVisibility:function(a){this.$eye||(this.$eye=this.$el.find("> #"+this.pfx+"btn-eye"));var b=_.clone(this.model.get("style")),c=this.pfx+"hide";this.isVisible()?(this.$el.addClass(c),this.$eye.addClass("fa-eye-slash"),b.display="none"):(this.$el.removeClass(c),this.$eye.removeClass("fa-eye-slash"),delete b.display),this.model.set("style",b)},isVisible:function(){var a=this.model.get("style"),b=a.display;if(!b||"none"!=b)return 1},checkChildren:function(){var a=this.countChildren(this.model),b=this.pfx,c="> ."+b+"title-c > ."+b+"title";this.$counter||(this.$counter=this.$el.find("> #"+b+"counter")),a?(this.$el.find(c).removeClass(b+"no-chld"),this.$counter.html(a)):(this.$el.find(c).addClass(b+"no-chld"),this.$counter.empty(),this.model.set("open",0))},countChildren:function(a){var b=0;return a.components.each(function(a){var c=this.opt.isCountable,d=this.config.hideTextnode;c&&!c(a,d)||b++},this),b},render:function(){var a=this.pfx,b=this.isVisible(),d=this.countChildren(this.model);return this.$el.html(this.template({title:this.model.get(this.customNameProp)||this.model.getName(),addClass:d?"":a+"no-chld",editBtnCls:this.editBtnCls,inputNameCls:this.inputNameCls,caretCls:this.caretCls,count:d,visible:b,hidable:this.config.hidable,prefix:a,ppfx:this.ppfx})),"undefined"==typeof ItemsView&&(ItemsView=c("./ItemsView")),this.$components=new ItemsView({collection:this.model.components,config:this.config,sorter:this.sorter,opened:this.opt.opened,parent:this.model}).render().$el,this.$el.find("."+a+"children").html(this.$components),this.$caret=this.$el.find("> ."+a+"title-c > ."+a+"title > #"+a+"caret"),this.model.get("draggable")&&this.config.sortable||this.$el.find("> #"+a+"move").detach(),b||(this.className+=" "+a+"hide"),this.$el.attr("class",_.result(this,"className")),this.updateOpening(),this}})}),c("Navigator/view/ItemsView",["backbone","./ItemView"],function(a,b){return a.View.extend({initialize:function(a){if(this.opt=a,this.config=a.config,this.preview=a.preview,this.pfx=a.config.stylePrefix,this.parent=a.parent,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset resetNavigator",this.render),this.className=this.pfx+"items",this.config.sortable&&!this.opt.sorter){var b=this.pfx,c=this.config.em.get("Utils");this.opt.sorter=new c.Sorter({container:this.el,containerSel:"."+b+"items",itemSel:"."+b+"item",pfx:b,nested:1})}this.sorter=this.opt.sorter||"",this.parent||(this.className+=" "+this.pfx+this.config.containerId),this.$el.data("collection",this.collection)},addTo:function(a){var b=this.collection.indexOf(a);this.addToCollection(a,null,b)},addToCollection:function(a,c,d){var e=c||null,f=b,g=new f({model:a,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),h=g.render().el;if(e)e.appendChild(h);else if("undefined"!=typeof d){var i="before";this.$el.children().length==d&&(d--,i="after"),d<0?this.$el.append(h):this.$el.children().eq(d)[i](h)}else this.$el.append(h);return h},isCountable:function(a,b){var c=a.get("type"),d=a.get("tagName");return"textnode"!=c&&"br"!=d||!b},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.isCountable(b,this.config.hideTextnode)&&this.addToCollection(b,a)},this),this.$el.append(a),this.$el.attr("class",_.result(this,"className")),this}})}),c("Navigator/main",["require","./config/config","./view/ItemsView"],function(a){function b(b,c){var d=c,e=a("./config/config"),f=a("./view/ItemsView");for(var g in e)g in d||(d[g]=e[g]);var h={collection:b,config:d,opened:c.opened||{}};this.ItemsView=new f(h)}return b.prototype={render:function(){return this.ItemsView.render().$el}},b}),c("Navigator",["Navigator/main"],function(a){return a}),c("Commands/view/OpenLayers",["Navigator"],function(a){return{run:function(b,c){if(!this.$layers){var d=b.DomComponents.getComponent().get("components"),e=b.getConfig(),f=b.Panels,g=e.layers.stylePrefix||"nv-";e.layers.stylePrefix=e.stylePrefix+g,e.layers.em=b.editor,e.layers.opened=b.editor.get("opened");var h=new a(d,e.layers);this.$layers=h.render(),f.getPanel("views-container")?this.panel=f.getPanel("views-container"):this.panel=f.addPanel({id:"views-container"}),this.panel.set("appendContent",this.$layers).trigger("change:appendContent")}this.$layers.show()},stop:function(){this.$layers&&this.$layers.hide()}}}),c("Commands/view/OpenStyleManager",["StyleManager"],function(a){return{run:function(a,b){if(this.sender=b,!this.$cn){var c=a.getConfig(),d=a.Panels;this.$cn=$("
"),this.$cn2=$("
"),this.$cn.append(this.$cn2);var e=a.DeviceManager;if(e&&c.showDevices){var f=d.addPanel({id:"devices-c"});f.set("appendContent",e.render()).trigger("change:appendContent")}var g=a.SelectorManager;g&&this.$cn2.append(g.render([])),this.$cn2.append(a.StyleManager.render());var h=a.StyleManager.getConfig();this.$header=$("
",{"class":h.stylePrefix+"header",text:h.textNoElement}),this.$cn.append(this.$header),d.getPanel("views-container")?this.panel=d.getPanel("views-container"):this.panel=d.addPanel({id:"views-container"}),this.panel.set("appendContent",this.$cn).trigger("change:appendContent"),this.target=a.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()}}}),c("Commands/view/OpenTraitManager",[],function(){return{run:function(a,b){var c=a.Config,d=c.stylePrefix,e=a.TraitManager;if(!this.obj){var f=e.getTraitsViewer(),g=e.getConfig();this.obj=$("
").append('
'+g.labelContainer+"
").get(0),this.obj.appendChild(f.render().el);var h=a.Panels;h.getPanel("views-container")?panelC=h.getPanel("views-container"):panelC=h.addPanel({id:"views-container"}),panelC.set("appendContent",this.obj).trigger("change:appendContent")}this.obj.style.display="block"},stop:function(){this.obj&&(this.obj.style.display="none")}}}),c("Commands/view/OpenBlocks",[],function(){return{run:function(a,b){var c=a.Config,d=(c.stylePrefix,a.BlockManager);if(!this.blocks){this.blocks=$("
").get(0),this.blocks.appendChild(d.render());var e=a.Panels;e.getPanel("views-container")?panelC=e.getPanel("views-container"):panelC=e.addPanel({id:"views-container"}),panelC.set("appendContent",this.blocks).trigger("change:appendContent")}this.blocks.style.display="block"},stop:function(){this.blocks&&(this.blocks.style.display="none")}}}),c("Commands/view/OpenAssets",[],function(){return{run:function(a,b,c){var d=c||{},e=(a.getConfig(),a.Modal),f=a.AssetManager;f.onClick(d.onClick),f.onDblClick(d.onDblClick),f.setTarget(d.target),f.onSelect(d.onSelect),e&&(e.setTitle(d.modalTitle||"Select image"),e.setContent(""),e.setContent(f.render(1)),e.open())}}}),c("Commands/view/Fullscreen",[],function(){return{isEnabled:function(){var a=document;return a.fullscreenElement||a.webkitFullscreenElement||a.mozFullScreenElement?1:0},enable:function(a){var b="";return a.requestFullscreen?a.requestFullscreen():a.webkitRequestFullscreen?(b="webkit",a.webkitRequestFullscreen()):a.mozRequestFullScreen?(b="moz",a.mozRequestFullScreen()):a.msRequestFullscreen?a.msRequestFullscreen():console.warn("Fullscreen not supported"),b},disable:function(){var a=document;a.exitFullscreen?a.exitFullscreen():a.webkitExitFullscreen?a.webkitExitFullscreen():a.mozCancelFullScreen?a.mozCancelFullScreen():a.msExitFullscreen&&a.msExitFullscreen()},fsChanged:function(a,b){var c=(document,(a||"")+"fullscreenchange");this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(c,this.fsChanged))},run:function(a,b){this.sender=b;var c=this.enable(a.getContainer());this.fsChanged=this.fsChanged.bind(this,c),document.addEventListener(c+"fullscreenchange",this.fsChanged),a&&a.trigger("change:canvasOffset")},stop:function(a,b){b&&b.set&&b.set("active",!1),this.disable(),a&&a.trigger("change:canvasOffset")}}}),c("Commands/view/Preview",[],function(){return{getPanels:function(a){return this.panels||(this.panels=a.Panels.getPanelsEl()),this.panels},tglPointers:function(a,b){var c=a.Canvas.getBody().querySelectorAll("."+this.ppfx+"no-pointer");_.each(c,function(a){a.style.pointerEvents=b?"":"all"})},run:function(a,b){b&&b.set&&b.set("active",!1),a.stopCommand("sw-visibility");var c=this,d=this.getPanels(a),e=a.Canvas.getElement(),f=a.getEl(),g=a.Config.stylePrefix;this.helper||(this.helper=document.createElement("span"),this.helper.className=g+"off-prv fa fa-eye-slash",f.appendChild(this.helper),this.helper.onclick=function(){c.stop(a)}),this.helper.style.display="inline-block",this.tglPointers(a),d.style.display="none";var h=e.style;h.width="100%",h.height="100%",h.top="0",h.left="0",h.padding="0",h.margin="0",a.trigger("change:canvasOffset")},stop:function(a,b){var c=this.getPanels(a);a.runCommand("sw-visibility"),a.getModel().runDefault(),c.style.display="block";var d=a.Canvas.getElement();d.setAttribute("style",""),this.helper&&(this.helper.style.display="none"),a.trigger("change:canvasOffset"),this.tglPointers(a,1)}}}),c("Commands/view/Resize",[],function(){return{run:function(a,b,c){var d=c&&c.el||"",e=a.Canvas,f=this.canvasResizer,g=c.options||{};if(!f){var h=e.getCanvasView();g.ratioDefault=1,g.appendTo=e.getResizerEl(),g.prefix=a.getConfig().stylePrefix,g.posFetcher=h.getElementPos.bind(h),g.mousePosFetcher=e.getMouseRelativePos,this.canvasResizer=a.Utils.Resizer.init(g),f=this.canvasResizer}f.setOptions(g),f.focus(d)},stop:function(){this.canvasResizer&&this.canvasResizer.blur()}}}),c("Commands/main",["require","./config/config","./view/CommandAbstract","./view/SelectComponent","./view/CreateComponent","./view/DeleteComponent","./view/ImageComponent","./view/MoveComponent","./view/TextComponent","./view/InsertCustom","./view/ExportTemplate","./view/SwitchVisibility","./view/OpenLayers","./view/OpenStyleManager","./view/OpenTraitManager","./view/OpenBlocks","./view/OpenAssets","./view/Fullscreen","./view/Preview","./view/Resize"],function(a){return function(){var b={},c={},d={},e=a("./config/config"),f=a("./view/CommandAbstract"),g=function(a,b){return delete b.initialize,c[a]=f.extend(b),this};return{name:"Commands",init:function(c){b=c||{};for(var f in e)f in b||(b[f]=e[f]);var g=b.pStylePrefix;g&&(b.stylePrefix=g+b.stylePrefix);for(var h in b.defaults){var i=b.defaults[h];i.id&&this.add(i.id,i)}return d["select-comp"]=a("./view/SelectComponent"),d["create-comp"]=a("./view/CreateComponent"),d["delete-comp"]=a("./view/DeleteComponent"),d["image-comp"]=a("./view/ImageComponent"),d["move-comp"]=a("./view/MoveComponent"),d["text-comp"]=a("./view/TextComponent"),d["insert-custom"]=a("./view/InsertCustom"),d["export-template"]=a("./view/ExportTemplate"),d["sw-visibility"]=a("./view/SwitchVisibility"),d["open-layers"]=a("./view/OpenLayers"),d["open-sm"]=a("./view/OpenStyleManager"),d["open-tm"]=a("./view/OpenTraitManager"),d["open-blocks"]=a("./view/OpenBlocks"),d["open-assets"]=a("./view/OpenAssets"),d.fullscreen=a("./view/Fullscreen"),d.preview=a("./view/Preview"),d.resize=a("./view/Resize"),d["tlb-delete"]={run:function(a){var b=a.getSelected();return b&&b.get("removable")?(b.collection.remove(b),a.Canvas.getToolbarEl().style.display="none",void a.editor.runDefault()):void console.warn("The element is not removable")}},d["tlb-clone"]={run:function(a){var b=a.getSelected();if(!b||!b.get("copyable"))return void console.warn("The element is not clonable");var c=b.collection,d=c.indexOf(b);c.add(b.clone(),{at:d+1})}},d["tlb-move"]={run:function(a){var b=a.getSelected();if(!b||!b.get("draggable"))return void console.warn("The element is not draggable");var c=a.Canvas.getToolbarEl(),d=(c.style.display,a.Commands.get("move-comp"));d.onEndMoveFromModel=function(){a.editor.runDefault(),a.editor.set("selectedComponent",b)},a.editor.stopDefault(),d.initSorterFromModel(b),b.set("status","selected"),c.style.display="none"}},b.em&&(b.model=b.em.get("Canvas")),this},onLoad:function(){this.loadDefaultCommands()},add:g,get:function(a){var d=c[a];return"function"==typeof d&&(d=new d(b),c[a]=d),d},loadDefaultCommands:function(){for(var a in d)this.add(a,d[a]);return this}}}}),c("Commands",["Commands/main"],function(a){return a}),c("BlockManager/config/config",[],function(){return{blocks:[]}}),c("BlockManager/model/Block",["backbone"],function(a){return a.Model.extend({defaults:{label:"",content:"",attributes:{}}})}),c("BlockManager/model/Blocks",["backbone","./Block"],function(a,b){return a.Collection.extend({model:b})}),c("BlockManager/view/BlockView",["backbone"],function(a){return a.View.extend({events:{mousedown:"onDrag"},initialize:function(a,b){_.bindAll(this,"onDrop"),this.config=b||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.model,"destroy",this.remove),this.doc=$(document)},onDrag:function(a){if(this.config.getSorter){this.config.em.refreshCanvas();var b=this.config.getSorter();b.setDragHelper(this.el,a),b.startSort(this.el),b.setDropContent(this.model.get("content")),this.doc.on("mouseup",this.onDrop)}},onDrop:function(){this.doc.off("mouseup",this.onDrop),this.config.getSorter().endMove()},render:function(){var a=this.ppfx+"block";return this.$el.addClass(a),this.el.innerHTML='
'+this.model.get("label")+"
",this}})}),c("BlockManager/view/BlocksView",["backbone","./BlockView"],function(a,b){return a.View.extend({initialize:function(a,b){_.bindAll(this,"getSorter","onDrag","onDrop"),this.config=b||{},this.ppfx=this.config.pStylePrefix||"",this.listenTo(this.collection,"add",this.addTo),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 a=this.em.get("Utils"),b=this.canvas;this.sorter=new a.Sorter({container:b.getBody(),placer:b.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,document:b.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:this.em})}return this.sorter}},onDrag:function(){this.em.stopDefault(),this.em.get("Canvas").getBody().className+=" "+this.grabbingCls,document.body.className+=" "+this.grabbingCls},onDrop:function(a){this.em.runDefault();var b=this.em.get("Canvas").getBody(),c=document.body;b.className=b.className.replace(this.grabbingCls,""),c.className=c.className.replace(this.grabbingCls,""),a&&a.get&&a.get("activeOnRender")&&(a.trigger("active"),a.set("activeOnRender",0))},addTo:function(a){this.add(a)},add:function(a,c){var d=c||null,e=new b({model:a,attributes:a.get("attributes")},this.config),f=e.render().el;d?d.appendChild(f):this.$el.append(f)},render:function(){var a=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(b){this.add(b,a)},this),this.$el.append(a),this.$el.addClass(this.ppfx+"blocks-c"),this}})}),c("BlockManager/main",["require","./config/config","./model/Blocks","./view/BlocksView"],function(a){return function(){var b,c,d={},e=a("./config/config"),f=a("./model/Blocks"),g=a("./view/BlocksView");return{name:"BlockManager",init:function(a){d=a||{};for(var h in e)h in d||(d[h]=e[h]);return b=new f(d.blocks),c=new g({collection:b},d),this},add:function(a,c){var d=c||{};return d.id=a,b.add(d)},get:function(a){return b.get(a)},getAll:function(){return b},render:function(){return c.render().el}}}}),c("BlockManager",["BlockManager/main"],function(a){return a}),c("TraitManager/config/config",[],function(){return{stylePrefix:"trt-",labelContainer:"Component settings"}}),c("TraitManager/view/TraitView",["backbone"],function(a){return a.View.extend({events:{change:"onChange"},initialize:function(a){var b=this.model;this.config=a.config||{},this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.target=b.target,this.className=this.pfx+"trait",this.labelClass=this.ppfx+"label",this.fieldClass=this.ppfx+"field "+this.ppfx+"field-"+b.get("type"),this.inputhClass=this.ppfx+"input-holder",b.off("change:value",this.onValueChange),this.listenTo(b,"change:value",this.onValueChange),this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().value)},onValueChange:function(){var a=this.model,b=this.target,c=a.get("name"),d=a.get("value");if(a.get("changeProp"))b.set(c,d);else{var e=_.clone(b.get("attributes"));e[c]=d,b.set("attributes",e)}},renderLabel:function(){this.$el.html('
'+this.getLabel()+"
")},getLabel:function(){var a=this.model,b=a.get("label")||a.get("name");return b.charAt(0).toUpperCase()+b.slice(1).replace(/-/g," ")},getInputEl:function(){if(!this.$input){var a=this.model,b=this.target,c=a.get("name"),d={placeholder:a.get("placeholder")||a.get("default"),type:a.get("type")||"text"};if(a.get("changeProp"))d.value=b.get(c);else{var e=b.get("attributes");d.value=a.get("value")||e[c]}a.get("min")&&(d.min=a.get("min")),a.get("max")&&(d.max=a.get("max")),this.$input=$("",d)}return this.$input.get(0)},renderField:function(){if(!this.$input){ this.$el.append(this.tmpl);var a=this.getInputEl();this.$el.find("."+this.inputhClass).prepend(a)}},render:function(){return this.renderLabel(),this.renderField(),this.el.className=this.className,this}})}),c("TraitManager/view/TraitSelectView",["backbone","./TraitView"],function(a,b){return b.extend({initialize:function(a){b.prototype.initialize.apply(this,arguments);var c=this.ppfx;this.tmpl='
'},getInputEl:function(){if(!this.$input){var a=this.model,b=a.get("options")||[];this.input="",this.$input=$(this.input);var c=this.target,d=a.get("name"),e=a.get("value");if(a.get("changeProp"))e=e||c.get(d);else{var f=c.get("attributes");e=f[d]}e&&this.$input.val(e)}return this.$input.get(0)}})}),c("TraitManager/view/TraitCheckboxView",["./TraitView"],function(a){return a.extend({initialize:function(b){a.prototype.initialize.apply(this,arguments);var c=this.ppfx+"chk-icon";this.tmpl='
'},onChange:function(){this.model.set("value",this.getInputEl().checked)},getInputEl:function(){var b;this.$input||(b=1);var c=a.prototype.getInputEl.apply(this,arguments);if(b){var d=this.model,e=d.get("name"),f=this.target;if(d.get("changeProp"))c.checked=f.get(e);else{var g=f.get("attributes");c.checked=!!g[e]}}return c}})}),c("TraitManager/view/TraitsView",["backbone","Abstract/view/DomainViews","./TraitView","./TraitSelectView","./TraitCheckboxView"],function(a,b,c,d,e){return b.extend({itemView:c,itemsView:{text:c,select:d,checkbox:e},initialize:function(a){this.config=a.config||{},this.em=a.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 a=this.em.get("selectedComponent");a&&(this.collection=a.get("traits"),this.render())}})}),c("TraitManager/main",["require","./config/config","./model/Traits","./view/TraitsView"],function(a){return function(){var b,c={},d=a("./config/config"),e=(a("./model/Traits"),a("./view/TraitsView"));return{TraitsView:e,name:"TraitManager",getConfig:function(){return c},init:function(a){c=a||{};for(var f in d)f in c||(c[f]=d[f]);var g=c.pStylePrefix;return g&&(c.stylePrefix=g+c.stylePrefix),b=new e({collection:[],editor:c.em,config:c}),this},getTraitsViewer:function(){return b},addType:function(a,c){var d=b.itemView;b.itemsView[a]=d.extend(c)},getType:function(a){return b.itemsView[a]}}}}),c("TraitManager",["TraitManager/main"],function(a){return a});var d=["Utils","StorageManager","DeviceManager","Parser","SelectorManager","ModalDialog","CodeManager","Panels","RichTextEditor","StyleManager","AssetManager","CssComposer","DomComponents","Canvas","Commands","BlockManager","TraitManager"];return c("editor/model/Editor",["backbone","backboneUndo","keymaster","Utils","StorageManager","DeviceManager","Parser","SelectorManager","ModalDialog","CodeManager","Panels","RichTextEditor","StyleManager","AssetManager","CssComposer","DomComponents","Canvas","Commands","BlockManager","TraitManager"],function(){return Backbone.Model.extend({defaults:{clipboard:null,selectedComponent:null,previousModel:null,changesCount:0,storables:[],toLoad:[],opened:{},device:""},initialize:function(a){this.config=a,this.set("Config",a),a.el&&a.fromElement&&(this.config.components=a.el.innerHTML),d.forEach(function(a){this.loadModule(a)},this),this.get("toLoad").forEach(function(a){a.onLoad()}),this.initUndoManager(),this.on("change:selectedComponent",this.componentSelected,this)},loadModule:function(a){var c=this.config,d=new b(a)(),e=d.name.charAt(0).toLowerCase()+d.name.slice(1),f=c[e]||c[d.name]||{};f.pStylePrefix=c.pStylePrefix||"";var g=this.get("StorageManager");if(d.storageKey&&d.store&&d.load&&g){f.stm=g;var h=this.get("storables");h.push(d),this.set("storables",h)}return f.em=this,d.init(Object.create(f)),d["private"]||this.set(d.name,d),d.onLoad&&this.get("toLoad").push(d),this},init:function(a){this.set("Editor",a)},listenRules:function(a){this.stopListening(a,"add remove",this.listenRule),this.listenTo(a,"add remove",this.listenRule),a.each(function(a){this.listenRule(a)},this)},listenRule:function(a){this.stopListening(a,"change:style",this.ruleUpdated),this.listenTo(a,"change:style",this.ruleUpdated)},ruleUpdated:function(a,b,c){var d=this.get("changesCount")+1,e=c?c.avoidStore:0;this.set("changesCount",d);var f=this.get("StorageManager");f.isAutosave()&&d