5 lines
13 KiB
JavaScript
5 lines
13 KiB
JavaScript
/*!
|
|
* Creative Elements - live Theme & Page Builder
|
|
* Copyright 2019-2022 WebshopWorks.com & Elementor.com
|
|
*/
|
|
!function(n){var o={};function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=204)}({12:function(e,t,n){"use strict";var o=Marionette.Behavior.extend({onRenderCollection:function(){this.handleInnerTabs(this.view)},handleInnerTabs:function(r){var e=r.children.filter(function(e){return"tabs"===e.model.get("type")});_.each(e,function(i){i.$el.find(".elementor-control-content").remove();var t=i.model.get("name"),e=r.children.filter(function(e){return"tab"===e.model.get("type")&&e.model.get("tabs_wrapper")===t});_.each(e,function(e,t){i._addChildView(e);var n=e.model.get("name"),o=r.children.filter(function(e){return n===e.model.get("inner_tab")});0===t?e.$el.addClass("elementor-tab-active"):_.each(o,function(e){e.$el.addClass("elementor-tab-close")})})})},onChildviewControlTabClicked:function(t){var n="elementor-tab-close",o="elementor-tab-active",i=t.model.get("name"),e=this.view.children.filter(function(e){return"tab"!==e.model.get("type")&&t.model.get("tabs_wrapper")===e.model.get("tabs_wrapper")}),r=this.view.children.filter(function(e){return"tab"===e.model.get("type")&&t.model.get("tabs_wrapper")===e.model.get("tabs_wrapper")});_.each(r,function(e){e.$el.removeClass(o)}),t.$el.addClass(o),_.each(e,function(e){e.model.get("inner_tab")===i?e.$el.removeClass(n):e.$el.addClass(n)}),elementor.getPanelView().updateScrollbar()}});e.exports=o},204:function(e,t,n){"use strict";var o=l(n(205)),i=l(n(206)),r=l(n(207)),n=l(n(208));function l(e){return e&&e.__esModule?e:{default:e}}elementorModules.editor={elements:{models:{BaseSettings:n.default}},utils:{Module:o.default,Introduction:i.default},views:{ControlsStack:r.default}}},205:function(e,t,n){"use strict";var o=elementorModules.Module.extend({onInit:function(){jQuery(window).on("elementor:init",this.onElementorReady)},getEditorControlView:function(e){return elementor.getPanelView().getCurrentPageView().children.findByModelCid(this.getEditorControlModel(e).cid)},getEditorControlModel:function(e){return elementor.getPanelView().getCurrentPageView().collection.findWhere({name:e})},onElementorReady:function(){this.onElementorInit(),elementor.on("frontend:init",this.onElementorFrontendInit.bind(this)).on("preview:loaded",this.onElementorPreviewLoaded.bind(this))}});o.prototype.onElementorInit=function(){},o.prototype.onElementorPreviewLoaded=function(){},o.prototype.onElementorFrontendInit=function(){},e.exports=o},206:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r=function(e){var t=r;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function r(){var e=this,t=r;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];t=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(o)));return t.initDialog(),t}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),o(r,[{key:"getDefaultSettings",value:function(){return{dialogType:"buttons",dialogOptions:{effects:{hide:"hide",show:"show"},hide:{onBackgroundClick:!1}}}}},{key:"initDialog",value:function(){var t=this,n=void 0;this.getDialog=function(){var e;return n||(e=t.getSettings(),n=elementorCommon.dialogsManager.createWidget(e.dialogType,e.dialogOptions),e.onDialogInitCallback&&e.onDialogInitCallback.call(t,n)),n}}},{key:"show",value:function(e){var t;this.introductionViewed||(t=this.getDialog(),e&&t.setSettings("position",{of:e}),t.show())}},{key:"setViewed",value:function(){this.introductionViewed=!0,elementorCommon.ajax.addRequest("introduction_viewed",{data:{introductionKey:this.getSettings("introductionKey")}})}}]),r}(elementorModules.Module);t.default=r},207:function(e,t,n){"use strict";n=Marionette.CompositeView.extend({classes:{popover:"elementor-controls-popover"},activeTab:null,activeSection:null,className:function(){return"elementor-controls-stack"},templateHelpers:function(){return{elementData:elementor.getElementData(this.model)}},childViewOptions:function(){return{elementSettingsModel:this.model}},ui:function(){return{tabs:".elementor-panel-navigation-tab",reloadButton:".elementor-update-preview-button"}},events:function(){return{"click @ui.tabs":"onClickTabControl","click @ui.reloadButton":"onReloadButtonClick"}},modelEvents:{destroy:"onModelDestroy"},behaviors:{HandleInnerTabs:{behaviorClass:n(12)}},initialize:function(){this.initCollection(),this.listenTo(elementor.channels.deviceMode,"change",this.onDeviceModeChange)},initCollection:function(){this.collection=new Backbone.Collection(_.values(elementor.mergeControlsSettings(this.getOption("controls"))))},filter:function(e){if(e.get("tab")!==this.activeTab)return!1;if("section"===e.get("type"))return!0;e=e.get("section");return!e||e===this.activeSection},getControlViewByModel:function(e){return this.children.findByModelCid(e.cid)},getControlViewByName:function(e){return this.getControlViewByModel(this.getControlModel(e))},getControlModel:function(e){return this.collection.findWhere({name:e})},isVisibleSectionControl:function(e){return this.activeTab===e.get("tab")},activateTab:function(e){this.activeTab=e,this.ui.tabs.removeClass("elementor-active").filter('[data-tab="'+e+'"]').addClass("elementor-active"),this.activateFirstSection()},activateSection:function(e){this.activeSection=e},activateFirstSection:function(){var t=this,e=t.collection.filter(function(e){return"section"===e.get("type")&&t.isVisibleSectionControl(e)});e[0]&&!e.filter(function(e){return t.activeSection===e.get("name")})[0]&&t.activateSection(e[0].get("name"))},getChildView:function(e){e=e.get("type");return elementor.getControlView(e)},handlePopovers:function(){var n,o=this,i=!1;o.removePopovers(),o.children.each(function(e){i&&n.append(e.$el);var t=e.model.get("popover");t&&(t.start&&(i=!0,n=jQuery("<div>",{class:o.classes.popover}),e.$el.before(n),n.append(e.$el)),t.end&&(i=!1))})},removePopovers:function(){this.$el.find("."+this.classes.popover).remove()},getNamespaceArray:function(){return[elementor.getPanelView().getCurrentPageName()]},openActiveSection:function(){var t=this.activeSection,e=this.children.filter(function(e){return t===e.model.get("name")});e[0]&&(e[0].$el.addClass("elementor-open"),(e=this.getNamespaceArray()).push(t,"activated"),elementor.channels.editor.trigger(e.join(":"),this))},onRenderCollection:function(){this.openActiveSection(),this.handlePopovers()},onRenderTemplate:function(){this.activateTab(this.activeTab||this.ui.tabs.eq(0).data("tab"))},onModelDestroy:function(){this.destroy()},onClickTabControl:function(e){e.preventDefault();e=this.$(e.currentTarget).data("tab");this.activeTab!==e&&(this.activateTab(e),this._renderChildren())},onReloadButtonClick:function(){elementor.reloadPreview()},onDeviceModeChange:function(){"desktop"===elementor.channels.deviceMode.request("currentMode")&&this.$el.removeClass("elementor-responsive-switchers-open")},onChildviewControlSectionClicked:function(e){var t=e.$el.hasClass("elementor-open");this.activateSection(t?null:e.model.get("name")),this._renderChildren()},onChildviewResponsiveSwitcherClick:function(e,t){"desktop"===t&&this.$el.toggleClass("elementor-responsive-switchers-open")}});e.exports=n},208:function(e,t,n){"use strict";var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=Backbone.Model.extend({options:{},initialize:function(e,t){var i,r,l=this;l.options=t,l.controls=elementor.mergeControlsSettings(t.controls),l.validators={},l.controls&&(i=e||{},r={},_.each(l.controls,function(e){var t,n,o;-1===e.features.indexOf("ui")&&(t=e.name,"object"===a(e.default)?r[t]=elementorCommon.helpers.cloneObject(e.default):r[t]=e.default,n=(o=e.dynamic&&e.dynamic.active)&&i.__dynamic__&&i.__dynamic__[t],o&&!n&&e.dynamic.default&&(i.__dynamic__||(i.__dynamic__={}),i.__dynamic__[t]=e.dynamic.default,n=!0),o=jQuery.isPlainObject(e.default),void 0===i[t]||!o||_.isObject(i[t])||n||(elementor.debug.addCustomError(new TypeError("An invalid argument supplied as multiple control value"),"InvalidElementData","Element `"+(l.get("widgetType")||l.get("elType"))+"` got <"+i[t]+"> as `"+t+"` value. Expected array or object."),delete i[t]),void 0===i[t]&&(i[t]=r[t]))}),l.defaults=r,l.handleRepeaterData(i),l.set(i))},handleRepeaterData:function(e){_.each(this.controls,function(n){!n.is_repeater||e[n.name]instanceof Backbone.Collection||(e[n.name]=new Backbone.Collection(e[n.name],{model:function(e,t){return(t=t||{}).controls=n.fields,e._id||(e._id=elementor.helpers.getUniqueID()),new o(e,t)}}))})},getFontControls:function(){return _.filter(this.getActiveControls(),function(e){return"font"===e.type})},getStyleControls:function(o,e){var i=this,r=(o=elementorCommon.helpers.cloneObject(i.getActiveControls(o,e)),[]);return jQuery.each(o,function(){var t,n=this,e=elementor.config.controls[n.type];(n=jQuery.extend({},e,n)).fields&&(t=[],i.attributes[n.name].each(function(e){t.push(i.getStyleControls(n.fields,e.attributes))}),n.styleFields=t),(n.fields||n.dynamic&&n.dynamic.active||i.isStyleControl(n.name,o))&&r.push(n)}),r},isStyleControl:function(t,e){e=e||this.controls;e=_.find(e,function(e){return t===e.name});return e&&!_.isEmpty(e.selectors)},getClassControls:function(e){return e=e||this.controls,_.filter(e,function(e){return!_.isUndefined(e.prefix_class)})},isClassControl:function(t){var e=_.find(this.controls,function(e){return t===e.name});return e&&!_.isUndefined(e.prefix_class)},getControl:function(t){return _.find(this.controls,function(e){return t===e.name})},getActiveControls:function(e,n){var o={};return e=e||this.controls,n=n||this.attributes,_.each(e,function(e,t){elementor.helpers.isActiveControl(e,n)&&(o[t]=e)}),o},clone:function(){return new o(elementorCommon.helpers.cloneObject(this.attributes),elementorCommon.helpers.cloneObject(this.options))},setExternalChange:function(e,t){var n,o=this;"object"===(void 0===e?"undefined":a(e))?n=e:(n={})[e]=t,o.set(n),jQuery.each(n,function(e,t){o.trigger("change:external:"+e,t)})},parseDynamicSettings:function(i,r,e){var l=this;return i=elementorCommon.helpers.cloneObject(i||l.attributes),r=r||{},e=e||this.controls,jQuery.each(e,function(){var n,o=this;if("repeater"===o.type)(n=i[o.name]).forEach(function(e,t){n[t]=l.parseDynamicSettings(e,r,o.fields)});else if(n=i.__dynamic__&&i.__dynamic__[o.name]){var t,e=o.dynamic;if((e=void 0===e?elementor.config.controls[o.type].dynamic:e)&&e.active){try{t=elementor.dynamicTags.parseTagsText(n,e,elementor.dynamicTags.getTagDataContent)}catch(e){if(elementor.dynamicTags.CACHE_KEY_NOT_FOUND_ERROR!==e.message)throw e;t="",r.onServerRequestStart&&r.onServerRequestStart(),elementor.dynamicTags.refreshCacheFromServer(function(){r.onServerRequestEnd&&r.onServerRequestEnd()})}e.property?i[o.name][e.property]=t:i[o.name]=t}}}),i},toJSON:function(e){var o,i=Backbone.Model.prototype.toJSON.call(this);return e=e||{},delete i.widgetType,delete i.elType,delete i.isInner,_.each(i,function(e,t){e&&e.toJSON&&(i[t]=e.toJSON())}),(e.remove&&-1!==e.remove.indexOf("default")||e.removeDefault)&&(o=this.controls,_.each(i,function(e,t){var n=o[t];!n||n.save_default||("text"===n.type||"textarea"===n.type)&&i[t]||_.isEqual(i[t],n.default)&&delete i[t]})),elementorCommon.helpers.cloneObject(i)}});e.exports=o}}); |