{"version":3,"sources":["keditor.js"],"names":["$","flog","KEditor","debug","args","Array","prototype","slice","apply","arguments","unshift","console","log","error","msg","Error","fn","draggable","droppable","sortable","target","options","this","element","extend","DEFAULTS","init","instances","version","niceScrollEnabled","nestedContainerEnabled","btnMoveContainerText","btnMoveComponentText","btnSettingContainerText","btnSettingComponentText","btnDuplicateContainerText","btnDuplicateComponentText","btnDeleteContainerText","btnDeleteComponentText","tabContainersText","tabContainersTitle","tabComponentsText","tabComponentsTitle","confirmDeleteContainerText","confirmDeleteComponentText","tabTooltipEnabled","extraTabs","defaultComponentType","sidebarContainer","snippetsUrl","snippetsTooltipEnabled","snippetsTooltipPosition","snippetsFilterEnabled","snippetsCategoriesSeparator","iframeMode","contentStyles","contentAreasSelector","contentAreasWrapper","containerSettingEnabled","containerSettingInitFunction","containerSettingShowFunction","containerSettingHideFunction","onReady","onInitFrame","frame","frameHead","frameBody","onSidebarToggled","isOpened","onContentChanged","event","contentArea","onBeforeInitContentArea","onInitContentArea","onBeforeInitContainer","container","onInitContainer","onBeforeContainerDeleted","selectedContainer","onContainerDeleted","onContainerChanged","changedContainer","onContainerDuplicated","originalContainer","newContainer","onContainerSelected","onContainerSnippetDropped","droppedSnippet","onComponentReady","component","onBeforeInitComponent","onInitComponent","onBeforeComponentDeleted","selectedComponent","onComponentDeleted","onComponentChanged","changedComponent","onComponentDuplicated","originalComponent","newComponent","onComponentSelected","onComponentSnippetDropped","onBeforeDynamicContentLoad","dynamicElement","onDynamicContentLoaded","response","status","xhr","onDynamicContentError","components","blank","settingEnabled","self","initFrame","window","body","document","is","htmlContent","val","keditorWrapper","after","attr","class","keditorWrapperId","generateId","html","addClass","ajaxRequest","hasClass","snippetsList","find","containerSnippets","componentSnippets","initSidebar","initKEditorClicks","initContentAreas","call","type","timestamp","Date","getTime","random","Math","round","initNiceScroll","niceScroll","cursorcolor","cursorwidth","railpadding","top","right","left","bottom","cursorborder","disablemutationobserver","originalContent","iframe","iframeId","id","iframeDoc","contents","get","open","close","contentWindow","contentDocument","defaultView","iframeHead","iframeBody","styles","each","style","href","isArray","i","idStr","content","append","initSidebarToggler","length","ajax","dataType","url","success","resp","renderSnippets","initSnippets","initTabs","initTabsSwitcher","initSettingPanel","initSnippetsFilter","tooltip","trigger","jqXHR","lowerCaseType","toLowerCase","categories","filterHtml","tab","snippets","prepend","snippet","filterCategories","split","data","txtSearch","cbbFilter","doFilter","selectedCategory","searchText","dataCategories","dataCategoriesString","join","inArray","title","indexOf","removeClass","on","timer","clearTimeout","setTimeout","toggleSidebar","showSidebar","icon","e","preventDefault","snippetsContainerHtml","snippetsComponentHtml","snippetsContentHtml","snippetsContainerCategories","snippetsComponentCategories","trim","previewUrl","snippetHtml","concat","dataAttributes","getDataAttributes","beautifyCategories","newArray","category","push","sort","getConnectedForContainerSnippets","selector","helper","revert","connectToSortable","start","blur","stop","switcherWrapper","tabPaneWrapper","isPlainObject","tabName","tabData","text","switcherLis","tabContent","a","li","parent","activatedLi","filter","activatedPane","targetDiv","getNiceScroll","hide","targetNiceScroll","show","resize","hideSettingPanel","settingForms","form","setSettingContainer","idSettingContainer","removeAttr","getSettingContainer","setSettingComponent","idSettingComponent","getSettingComponent","showSettingPanel","isComponent","activeForm","children","componentType","getComponentType","componentData","settingTitle","settingForm","initSettingForm","loadingText","initFunction","when","done","remove","showSettingForm","activeType","hideSettingForm","getContentAreas","contentAreas","empty","initContentArea","handle","items","connectWith","axis","receive","ui","item","snippetContent","replaceWith","initContainer","over","out","convertToContainer","contentData","isSection","wrapInner","wrap","isNested","closest","settingBtn","containerContents","containerContent","initContainerContent","parents","snippetContentElement","snippetType","initComponent","child","convertToComponent","isExisting","ignoreAttributes","attributes","name","value","replace","componentContent","isSettingEnabled","initDynamicContent","getClickedElement","sidebar","btn","getContainerContent","currentLinkedContainerContents","add","confirm","settingComponent","settingComponentParent","deleteComponent","getComponentContent","destroy","dynamicHref","param","clone","iframeWrapper","unwrap","getContent","tempDiv","containerInner","not","result","initIframeCover","wrapper","cover","setContent","jquery","getOptions","getLatestContent","instanceId","notIframeInstanceCount","keditor","instance","constructor","jQuery"],"mappings":"CAAA,SAAWA,GAEP,GAAIC,GAAO,WACP,GAAyB,mBAAd,UAA6BC,EAAQC,SAAU,EAAM,CAC5D,GAAIC,GAAOC,MAAMC,UAAUC,MAAMC,MAAMC,UACvCL,GAAKM,QAAQ,aAEbC,QAAQC,IAAIJ,MAAMG,QAASP,KAK/BS,EAAQ,SAAUC,GAClB,KAAM,IAAIC,OAAM,aAAeD,GAI9Bd,GAAEgB,GAAGC,WACNJ,EAAM,8GAELb,EAAEgB,GAAGE,WACNL,EAAM,8GAELb,EAAEgB,GAAGG,UACNN,EAAM,2GAIV,IAAIX,GAAU,SAAUkB,EAAQC,GAC5BC,KAAKC,QAAUH,EACfE,KAAKD,QAAUrB,EAAEwB,UAAWtB,EAAQuB,SAAUJ,GAC9CC,KAAKI,KAAKN,GAIdlB,GAAQyB,aAGRzB,EAAQC,OAAQ,EAGhBD,EAAQ0B,QAAU,QAGlB1B,EAAQuB,UACJI,mBAAmB,EACnBC,wBAAwB,EACxBC,qBAAsB,6BACtBC,qBAAsB,+BACtBC,wBAAyB,4BACzBC,wBAAyB,4BACzBC,0BAA2B,gCAC3BC,0BAA2B,gCAC3BC,uBAAwB,8BACxBC,uBAAwB,8BACxBC,kBAAmB,aACnBC,mBAAoB,aACpBC,kBAAmB,aACnBC,mBAAoB,aACpBC,2BAA4B,sFAC5BC,2BAA4B,sFAC5BC,mBAAmB,EACnBC,UAAW,KACXC,qBAAsB,QACtBC,iBAAkB,KAClBC,YAAa,yBACbC,wBAAwB,EACxBC,wBAAyB,OACzBC,uBAAuB,EACvBC,4BAA6B,IAC7BC,YAAY,EACZC,iBACAC,qBAAsB,KACtBC,oBAAqB,+DACrBC,yBAAyB,EACzBC,6BAA8B,KAC9BC,6BAA8B,KAC9BC,6BAA8B,KAC9BC,QAAS,aAETC,YAAa,SAAUC,EAAOC,EAAWC,KAEzCC,iBAAkB,SAAUC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AyBwP,GACtChX,EAAQyB,UAAUuV,GAAcG,EAGpC,MAAOA,GAbP,GAAIA,GAAYA,EAAShW,IAAyC,kBAAtBgW,GAAShW,GACjD,MAAOgW,GAAShW,GAASb,MAAM6W,EAAUhX,MAAMC,UAAUC,MAAMkI,KAAKhI,UAAW,KAgB3FT,EAAEgB,GAAGoW,QAAQE,YAAcpX,EAG3BF,EAAEoX,QAAUlX,GAEbqX","file":"keditor.min.js","sourcesContent":["(function ($) {\r\n // Log function will print log message\r\n var flog = function () {\r\n if (typeof (console) !== 'undefined' && KEditor.debug === true) {\r\n var args = Array.prototype.slice.apply(arguments);\r\n args.unshift('[KEditor]');\r\n\r\n console.log.apply(console, args);\r\n }\r\n };\r\n\r\n // Throw error message\r\n var error = function (msg) {\r\n throw new Error('[KEditor] ' + msg);\r\n };\r\n\r\n // Check dependencies\r\n if (!$.fn.draggable) {\r\n error('$.fn.draggable does not exist. Please import $.fn.draggable into your document for continue using KEditor.');\r\n }\r\n if (!$.fn.droppable) {\r\n error('$.fn.droppable does not exist. Please import $.fn.droppable into your document for continue using KEditor.');\r\n }\r\n if (!$.fn.sortable) {\r\n error('$.fn.sortable does not exist. Please import $.fn.sortable into your document for continue using KEditor.');\r\n }\r\n\r\n // KEditor class\r\n var KEditor = function (target, options) {\r\n this.element = target;\r\n this.options = $.extend({}, KEditor.DEFAULTS, options);\r\n this.init(target);\r\n };\r\n\r\n // KEditor instances\r\n KEditor.instances = {};\r\n\r\n // Turn on/off debug mode\r\n KEditor.debug = true;\r\n\r\n // Version of KEditor\r\n KEditor.version = '1.1.7';\r\n\r\n // Default configuration of KEditor\r\n KEditor.DEFAULTS = {\r\n niceScrollEnabled: true,\r\n nestedContainerEnabled: true,\r\n btnMoveContainerText: '',\r\n btnMoveComponentText: '',\r\n btnSettingContainerText: '',\r\n btnSettingComponentText: '',\r\n btnDuplicateContainerText: '',\r\n btnDuplicateComponentText: '',\r\n btnDeleteContainerText: '',\r\n btnDeleteComponentText: '',\r\n tabContainersText: 'Containers',\r\n tabContainersTitle: 'Containers',\r\n tabComponentsText: 'Components',\r\n tabComponentsTitle: 'Components',\r\n confirmDeleteContainerText: 'Are you sure that you want to delete this container? This action can not be undone!',\r\n confirmDeleteComponentText: 'Are you sure that you want to delete this component? This action can not be undone!',\r\n tabTooltipEnabled: true,\r\n extraTabs: null,\r\n defaultComponentType: 'blank',\r\n sidebarContainer: null,\r\n snippetsUrl: 'snippets/snippets.html',\r\n snippetsTooltipEnabled: true,\r\n snippetsTooltipPosition: 'left',\r\n snippetsFilterEnabled: true,\r\n snippetsCategoriesSeparator: ';',\r\n iframeMode: false,\r\n contentStyles: [],\r\n contentAreasSelector: null,\r\n contentAreasWrapper: '
',\r\n containerSettingEnabled: false,\r\n containerSettingInitFunction: null,\r\n containerSettingShowFunction: null,\r\n containerSettingHideFunction: null,\r\n onReady: function () {\r\n },\r\n onInitFrame: function (frame, frameHead, frameBody) {\r\n },\r\n onSidebarToggled: function (isOpened) {\r\n },\r\n onContentChanged: function (event, contentArea) {\r\n },\r\n\r\n onBeforeInitContentArea: function (contentArea) {\r\n },\r\n onInitContentArea: function (contentArea) {\r\n },\r\n\r\n onBeforeInitContainer: function (container, contentArea) {\r\n },\r\n onInitContainer: function (container, contentArea) {\r\n },\r\n onBeforeContainerDeleted: function (event, selectedContainer, contentArea) {\r\n },\r\n onContainerDeleted: function (event, selectedContainer, contentArea) {\r\n },\r\n onContainerChanged: function (event, changedContainer, contentArea) {\r\n },\r\n onContainerDuplicated: function (event, originalContainer, newContainer, contentArea) {\r\n },\r\n onContainerSelected: function (event, selectedContainer, contentArea) {\r\n },\r\n onContainerSnippetDropped: function (event, newContainer, droppedSnippet, contentArea) {\r\n },\r\n\r\n onComponentReady: function (component) {\r\n },\r\n onBeforeInitComponent: function (component, contentArea) {\r\n },\r\n onInitComponent: function (component, contentArea) {\r\n },\r\n onBeforeComponentDeleted: function (event, selectedComponent, contentArea) {\r\n },\r\n onComponentDeleted: function (event, selectedComponent, contentArea) {\r\n },\r\n onComponentChanged: function (event, changedComponent, contentArea) {\r\n },\r\n onComponentDuplicated: function (event, originalComponent, newComponent, contentArea) {\r\n },\r\n onComponentSelected: function (event, selectedComponent, contentArea) {\r\n },\r\n onComponentSnippetDropped: function (event, newComponent, droppedSnippet, contentArea) {\r\n },\r\n\r\n onBeforeDynamicContentLoad: function (dynamicElement, component, contentArea) {\r\n },\r\n onDynamicContentLoaded: function (dynamicElement, response, status, xhr, contentArea) {\r\n },\r\n onDynamicContentError: function (dynamicElement, response, status, xhr, contentArea) {\r\n }\r\n };\r\n\r\n // Component types\r\n KEditor.components = {\r\n blank: {\r\n settingEnabled: false\r\n }\r\n };\r\n\r\n // Export log methods;\r\n KEditor.log = flog;\r\n KEditor.error = error;\r\n\r\n KEditor.prototype.init = function (target) {\r\n var self = this;\r\n var options = self.options;\r\n\r\n if (options.iframeMode) {\r\n target = self.initFrame(target);\r\n } else {\r\n self.window = window;\r\n self.body = $(document.body);\r\n\r\n if (target.is('textarea')) {\r\n flog('Target is textarea', target);\r\n\r\n var htmlContent = target.val();\r\n var keditorWrapper = $(options.contentAreasWrapper || '
');\r\n target.after(keditorWrapper);\r\n keditorWrapper.attr({\r\n class: 'keditor-ui keditor-wrapper'\r\n });\r\n\r\n var keditorWrapperId = keditorWrapper.attr('id');\r\n if (!keditorWrapperId) {\r\n keditorWrapperId = self.generateId('wrapper');\r\n keditorWrapper.attr('id', keditorWrapperId);\r\n }\r\n\r\n keditorWrapper.html(htmlContent);\r\n target.addClass('keditor-hidden-element');\r\n target.attr('data-keditor-wrapper', '#' + keditorWrapperId);\r\n\r\n target = keditorWrapper;\r\n }\r\n }\r\n\r\n var body = self.body;\r\n var ajaxRequest;\r\n if (body.hasClass('initialized-snippets-list')) {\r\n flog('Snippets list is already initialized!');\r\n var snippetsList = body.find('#keditor-snippets-list');\r\n self.containerSnippets = snippetsList.find('.keditor-snippet[data-type=container]');\r\n self.componentSnippets = snippetsList.find('.keditor-snippet[data-type^=component]');\r\n } else {\r\n ajaxRequest = self.initSidebar();\r\n body.addClass('initialized-snippets-list');\r\n }\r\n if (body.hasClass('initialized-click-event-handlers')) {\r\n flog('CLick event handlers is already initialized!');\r\n } else {\r\n self.initKEditorClicks();\r\n body.addClass('initialized-click-event-handlers');\r\n }\r\n\r\n self.initContentAreas(target);\r\n\r\n if (!ajaxRequest && typeof options.onReady === 'function') {\r\n options.onReady.call(self);\r\n }\r\n };\r\n\r\n KEditor.prototype.generateId = function (type) {\r\n var timestamp = (new Date()).getTime();\r\n var random = Math.round(Math.random() * 9876543210);\r\n return 'keditor-' + type + '-' + timestamp + random;\r\n };\r\n\r\n KEditor.prototype.initNiceScroll = function (target) {\r\n flog('initNiceScroll', target);\r\n\r\n if ($.fn.niceScroll && this.options.niceScrollEnabled) {\r\n flog('Initialize $.fn.niceScroll');\r\n target.niceScroll({\r\n cursorcolor: '#999',\r\n cursorwidth: 6,\r\n railpadding: {\r\n top: 0,\r\n right: 0,\r\n left: 0,\r\n bottom: 0\r\n },\r\n cursorborder: '',\r\n disablemutationobserver: true\r\n });\r\n } else {\r\n flog('$.fn.niceScroll does not exist. Use default sidebar.');\r\n }\r\n };\r\n\r\n KEditor.prototype.initFrame = function (target) {\r\n flog('initFrame', target);\r\n\r\n var self = this;\r\n var options = self.options;\r\n var originalContent = target.is('textarea') ? target.val() : target.html();\r\n var iframe = $('