!function(o){"use strict";function c(t,i){this.$el=t,this.$currenSection=null,this.ACTIVE_CLASS="active",this.defaults={speed:300},this.settings=o.extend({},this.defaults,i),this.triggerMethod=(t,i)=>{"function"==typeof this[t]&&this[t](i)},this.setOptions=function(t){this.settings=o.extend({},this.settings,t=t||{})},this.getOptions=function(){return this.settings},this.update=function(t){this.setOptions(t)},this.init=function(){var n=this;n.$el.children(".accordion-section.active").children(".accordion-content").css("display","block"),n.$el.on("click",".accordion-header",function(t){(t=t||window.event).preventDefault(),t.stopPropagation();var i,t=o(this).parent(".accordion-section");n.$currenSection=t,o(document).trigger("MinimogAccordionBeforeChange",[n.$el,n.$currenSection]),n.$el.trigger("MinimogAccordionBeforeChange",[n.$el,n.$currenSection]),t.hasClass(n.ACTIVE_CLASS)?(t.removeClass(n.ACTIVE_CLASS),t.children(".accordion-content").slideUp(n.settings.speed,function(){n.change()})):((i=t.parent(".minimog-accordion").first()).data("multi-open")||i.children("."+n.ACTIVE_CLASS).removeClass(n.ACTIVE_CLASS).children(".accordion-content").slideUp(n.settings.speed),t.addClass(n.ACTIVE_CLASS),t.children(".accordion-content").slideDown(n.settings.speed,function(){n.change()}))})},this.change=function(){var t=this;o(document).trigger("MinimogAccordionChange",[t.$el,t.$currenSection]),t.$el.trigger("MinimogAccordionChange",[t.$el,t.$currenSection])},this.init()}const s="minimogAccordion";o.fn.extend({MinimogAccordion:function(n,e){return this.length?"options"===n?o.data(this.get(0),s).getOptions():this.each(function(){var t=o(this);let i=o.data(this,s);i?i.triggerMethod(n,e):(i=new c(t,n),o.data(this,s,i))}):this}})}(jQuery);