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M,aAAa,KAC1B,GACJ,KAIA,KAAK,SAAS,MAAK,WACf,EAAG,MAAM,QAAQ,KAAM,EAAW,GAAG,yBAAyB,KAAK,WAC/D,EAAG,EAAE,MAAM,YAAY,EAAM,QAAQ,KAAK,IAAI,qBAAsB,IACpE,EAAG,MAAM,aAAa,KAC1B,EAAE,KAAK,MACX,GAGR,MACI,KAAK,SAAS,YAAY,KAAK,QAAQ,KACvC,EAAG,MAAM,aAAa,KAAK,UAG/B,KAAK,YAzC2B,CA2CpC,EAEA,WAAY,WACR,KAAK,SAAW,KAAK,QAAQ,OAAS,EAAG,EAAE,KAAK,QAAQ,QAAQ,GAChE,KAAK,YACT,EAEA,WAAY,WACJ,KAAK,MAAQ,KAAK,SAAS,QAC3B,KAAK,SAAS,MAAK,WACf,EAAG,EAAE,MAAM,KAAK,cAAe,EAAG,EAAE,MAAM,SAAS,aACvD,GAER,GAGP,CAnHD,CAmHG","file":"/wp/plugins/virtuous/trunk/assets/js/core/toggle.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /wp/plugins/virtuous/trunk/assets/js/core/toggle.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */\n(function(UI){\n\n    \"use strict\";\n\n    var toggles = [];\n\n    UI.component('toggle', {\n\n        defaults: {\n            target    : false,\n            cls       : 'uk-hidden',\n            animation : false,\n            duration  : 200\n        },\n\n        boot: function(){\n\n            // init code\n            UI.ready(function(context) {\n\n                UI.$(\"[data-uk-toggle]\", context).each(function() {\n                    var ele = UI.$(this);\n\n                    if (!ele.data(\"toggle\")) {\n                        var obj = UI.toggle(ele, UI.Utils.options(ele.attr(\"data-uk-toggle\")));\n                    }\n                });\n\n                setTimeout(function(){\n\n                    toggles.forEach(function(toggle){\n                        toggle.getToggles();\n                    });\n\n                }, 0);\n            });\n        },\n\n        init: function() {\n\n            var $this = this;\n\n            this.aria = (this.options.cls.indexOf('uk-hidden') !== -1);\n\n            this.getToggles();\n\n            this.on(\"click\", function(e) {\n                if ($this.element.is('a[href=\"#\"]')) e.preventDefault();\n                $this.toggle();\n            });\n\n            toggles.push(this);\n        },\n\n        toggle: function() {\n\n            if(!this.totoggle.length) return;\n\n            if (this.options.animation && UI.support.animation) {\n\n                var $this = this, animations = this.options.animation.split(',');\n\n                if (animations.length == 1) {\n                    animations[1] = animations[0];\n                }\n\n                animations[0] = animations[0].trim();\n                animations[1] = animations[1].trim();\n\n                this.totoggle.css('animation-duration', this.options.duration+'ms');\n\n                if (this.totoggle.hasClass(this.options.cls)) {\n\n                    this.totoggle.toggleClass(this.options.cls);\n\n                    this.totoggle.each(function(){\n                        UI.Utils.animate(this, animations[0]).then(function(){\n                            UI.$(this).css('animation-duration', '');\n                            UI.Utils.checkDisplay(this);\n                        });\n                    });\n\n                } else {\n\n                    this.totoggle.each(function(){\n                        UI.Utils.animate(this, animations[1]+' uk-animation-reverse').then(function(){\n                            UI.$(this).toggleClass($this.options.cls).css('animation-duration', '');\n                            UI.Utils.checkDisplay(this);\n                        }.bind(this));\n                    });\n                }\n\n            } else {\n                this.totoggle.toggleClass(this.options.cls);\n                UI.Utils.checkDisplay(this.totoggle);\n            }\n\n            this.updateAria();\n\n        },\n\n        getToggles: function() {\n            this.totoggle = this.options.target ? UI.$(this.options.target):[];\n            this.updateAria();\n        },\n\n        updateAria: function() {\n            if (this.aria && this.totoggle.length) {\n                this.totoggle.each(function(){\n                    UI.$(this).attr('aria-hidden', UI.$(this).hasClass('uk-hidden'));\n                });\n            }\n        }\n    });\n\n})(UIkit);\n"]}