From 19105658749b2b06e7e17e3bfb002ab0074373c4 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Wed, 31 Aug 2016 16:15:45 -0700 Subject: [PATCH] 1.0.5 --- dist/accordion.js | 25 ++++++++++++++----------- package.json | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/dist/accordion.js b/dist/accordion.js index 45e23ea..4c5eb5c 100644 --- a/dist/accordion.js +++ b/dist/accordion.js @@ -177,9 +177,8 @@ angular.module('ayAccordion', []) if ($element[0] === $element[0].parentNode.lastElementChild) { $element[0].scrollIntoView(); } - $scope.$applyAsync(function () { - self.isOpen = true; - }); + self.isOpen = true; + $scope.$applyAsync(); self['onToggle']({ state: true }); if (!self.rootCtrl.multiple) { self.rootCtrl.curPanel = self; @@ -188,9 +187,8 @@ angular.module('ayAccordion', []) self.close = function () { $element.removeClass('open'); $element[0].removeAttribute('open'); - $scope.$applyAsync(function () { - self.isOpen = false; - }); + self.isOpen = false; + $scope.$applyAsync(); self['onToggle']({ state: false }); if (self.rootCtrl.curPanel === self) { self.rootCtrl.curPanel = null; @@ -200,8 +198,13 @@ angular.module('ayAccordion', []) if (self.rootCtrl.blockClicks) { return; } - var fn = self.isOpen ? self.close : self.open; - self.rootCtrl.run(fn, function () { + var fn = function () { + if (self.isOpen) { + self.close(); + } + else { + self.open(); + } Array.prototype.forEach.call($element.children(), function (el) { if (el.hasAttribute('ay-accordion-header')) { return; @@ -213,8 +216,8 @@ angular.module('ayAccordion', []) el.setAttribute('hidden', 'hidden'); } }); - cb(); - }); + }; + self.rootCtrl.run(fn, cb); }; }, link: function ($scope, $element, $attrs, $ctrls) { @@ -284,4 +287,4 @@ angular.module('ayAccordion', []) } }; }); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FjY29yZGlvbi50cyJdLCJuYW1lcyI6W10sIm1h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bWVuc2lvbnMubGVmdCAtIGVsRGltZW5zaW9ucy5sZWZ0LFxuICAgICAgICAgICAgICAgIHk6IG0ubmV3RGltZW5zaW9ucy50b3AgIC0gZWxEaW1lbnNpb25zLnRvcFxuICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgIHZhciBvcmlnaW4gPSBvZmZzZXRGcm9tUGFyZW50LnggKyAncHggJztcbiAgICAgICAgICAgICAgb3JpZ2luICs9IG9mZnNldEZyb21QYXJlbnQueSArICdweCc7XG5cbiAgICAgICAgICAgICAgc3R5bGUoZWwsICd0cmFuc2Zvcm0tb3JpZ2luJywgb3JpZ2luKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgdmFyIGR1cmF0aW9uID0gMTAwOyAvLyBJbiBtaWxsaXNlY29uZHNcbiAgICAgICAgdmFyIHQgPSAxO1xuXG4gICAgICAgIGZ1bmN0aW9uIHR3ZWVuKCkge1xuICAgICAgICAgIGZvckVhY2guY2FsbChtZWFzdXJlbWVudHMsIGZ1bmN0aW9uKG0pIHtcbiAgICAgICAgICAgIGlmIChtLmluaXRpYWxEaW1lbnNpb25zLmhlaWdodCA9PT0gbS5uZXdEaW1lbnNpb25zLmhlaWdodCAmJlxuICAgICAgICAgICAgICAgIG0uaW5pdGlhbERpbWVuc2lvbnMud2lkdGggID09PSBtLm5ld0RpbWVuc2lvbnMud2lkdGggICYmXG4gICAgICAgICAgICAgICAgbS5pbml0aWFsRGltZW5zaW9ucy5sZWZ0ICAgPT09IG0ubmV3RGltZW5zaW9ucy5sZWZ0ICAgJiZcbiAgICAgICAgICAgICAgICBtLmluaXRpYWxEaW1lbnNpb25zLnRvcCAgICA9PT0gbS5uZXdEaW1lbnNpb25zLnRvcCkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHRTY2FsZVggICA9IDEgKyAobS5uZXdTY2FsZS54IC0gMSkgKiB0O1xuICAgICAgICAgICAgdmFyIHRTY2FsZVkgICA9IDEgKyAobS5uZXdTY2FsZS55IC0gMSkgKiB0O1xuICAgICAgICAgICAgdmFyIHRPZmZzZXRYICA9IG0ubmV3T2Zmc2V0LnggKiB0O1xuICAgICAgICAgICAgdmFyIHRPZmZzZXRZICA9IG0ubmV3T2Zmc2V0LnkgKiB0O1xuXG4gICAgICAgICAgICB2YXIgdHJhbnNmb3JtID0gJ3RyYW5zbGF0ZSgnO1xuICAgICAgICAgICAgdHJhbnNmb3JtICs9IHRPZmZzZXRYICsgJ3B4LCAnO1xuICAgICAgICAgICAgdHJhbnNmb3JtICs9IHRPZmZzZXRZICsgJ3B4KSAnO1xuICAgICAgICAgICAgdHJhbnNmb3JtICs9ICdzY2FsZSgnICsgdFNjYWxlWCArICcsJyArIHRTY2FsZVkgKyAnKSAnO1xuICAgICAgICAgICAgdHJhbnNmb3JtICs9IG0uaW5pdGlhbFRyYW5zZm9ybTtcblxuICAgICAgICAgICAgc3R5bGUobS5lbCwgJ3RyYW5zZm9ybScsIHRyYW5zZm9ybSk7XG5cbiAgICAgICAgICAgIGZvckVhY2guY2FsbChtLmNoaWxkcmVuLCBmdW5jdGlvbihlbCkge1xuICAgICAgICAgICAgICB2YXIgc2NhbGUgPSAnc2NhbGUoJyArICgxL3RTY2FsZVgpICsgJywnICsgKDEvdFNjYWxlWSkgKyAnKSc7XG5cbiAgICAgICAgICAgICAgc3R5bGUoZWwsICd0cmFuc2Zvcm0nLCBzY2FsZSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIHQgLT0gKDE2IC8gZHVyYXRpb24pO1xuXG4gICAgICAgICAgaWYgKHQgPiAwKSB7XG4gICAgICAgICAgICByZXF1ZXN0QW5pbWF0aW9uRnJhbWUodHdlZW4pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjbGVhbnVwKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHR3ZWVuKCk7XG5cbiAgICAgICAgZnVuY3Rpb24gY2xlYW51cCgpIHtcbiAgICAgICAgICBmb3JFYWNoLmNhbGwobWVhc3VyZW1lbnRzLCBmdW5jdGlvbihtKSB7XG4gICAgICAgICAgICBzdHlsZShtLmVsLCAndHJhbnNmb3JtLW9yaWdpbicsICcnKTtcbiAgICAgICAgICAgIHN0eWxlKG0uZWwsICd0cmFuc2Zvcm0nLCBtLmluaXRpYWxUcmFuc2Zvcm0pO1xuXG4gICAgICAgICAgICBmb3JFYWNoLmNhbGwobS5jaGlsZHJlbiwgZnVuY3Rpb24oZWwpIHtcbiAgICAgICAgICAgICAgc3R5bGUoZWwsICd0cmFuc2Zvcm0tb3JpZ2luJywgJycpO1xuICAgICAgICAgICAgICBzdHlsZShlbCwgJ3RyYW5zZm9ybScsICcnKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgc2VsZi5ibG9ja0NsaWNrcyA9IGZhbHNlO1xuICAgICAgICAgIHNlbGYucm9vdC5zdHlsZS5taW5IZWlnaHQgPSBudWxsO1xuXG4gICAgICAgICAgLyogSW52b2tlIG91ciBjYWxsYmFjayBmdW5jdGlvbiB3aGVuIGRvbmUgKi9cbiAgICAgICAgICAkc2NvcGUuJGFwcGx5QXN5bmMoKCkgPT4ge1xuICAgICAgICAgICAgY2IoKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9XG4gIH07XG59KVxuXG4uZGlyZWN0aXZlKCdheUFjY29yZGlvbicsIGZ1bmN0aW9uKCkge1xuICByZXR1cm4ge1xuICAgIHJlc3RyaWN0OiAnQScsXG4gICAgcmVxdWlyZTogWydheUFjY29yZGlvbicsICdeYXlBY2NvcmRpb25Sb290J10sXG4gICAgY29udHJvbGxlckFzOiAnYWNjb3JkaW9uJyxcbiAgICBiaW5kVG9Db250cm9sbGVyOiB7XG4gICAgICBvblRvZ2dsZTogJyY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AgICAgIH0pO1xuICAgICAgICBzZWxmWydvblRvZ2dsZSddKHtzdGF0ZTogZmFsc2V9KTtcblxuXG4gICAgICAgIGlmIChzZWxmLnJvb3RDdHJsLmN1clBhbmVsID09PSBzZWxmKSB7XG4gICAgICAgICAgc2VsZi5yb290Q3RybC5jdXJQYW5lbCA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgIH07XG5cblxuICAgICAgc2VsZi50b2dnbGUgPSBmdW5jdGlvbihjYikge1xuICAgICAgICBpZiAoc2VsZi5yb290Q3RybC5ibG9ja0NsaWNrcykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBmbiA9IHNlbGYuaXNPcGVuID8gc2VsZi5jbG9zZSA6IHNlbGYub3BlbjtcblxuICAgICAgICBzZWxmLnJvb3RDdHJsLnJ1bihmbiwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgQXJyYXkucHJvdG90eXBlLmZvckVhY2guY2FsbCgkZWxlbWVudC5jaGlsZHJlbigpLCBmdW5jdGlvbihlbCkge1xuICAgICAgICAgICAgaWYgKGVsLmhhc0F0dHJpYnV0ZSgnYXktYWNjb3JkaW9uLWhlYWRlcicpKSB7XG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNlbGYuaXNPcGVuKSB7XG4gICAgICAgICAgICAgIGVsLnJlbW92ZUF0dHJpYnV0ZSgnaGlkZGVuJyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGUoJ2hpZGRlbicsICdoaWRkZW4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIGNiKCk7XG4gICAgICAgIH0pO1xuICAgICAgfTtcbiAgICB9LFxuICAgIGxpbms6IGZ1bmN0aW9uKCRzY29wZSwgJGVsZW1lbnQsICRhdHRycywgJGN0cmxzKSB7XG4gICAgICB2YXI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udC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG5cbiAgICAgICRzY29wZS4kd2F0Y2goKCkgPT4gJGN0cmwuaXNPcGVuLCAoKSA9PiB1cGRhdGVTdGF0ZSgpKTtcblxuICAgICAgJGVsZW1lbnQub24oJ2NsaWNrJywgZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICRlbGVtZW50WzBdLmJsdXIoKTtcbiAgICAgICAgcmV0dXJuIGFjdGl2YXRlKCRldmVudCk7XG4gICAgICB9KTtcblxuICAgICAgJGVsZW1lbnQub24oJ2tleWRvd24nLCBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgaWYgKCRldmVudC5rZXlDb2RlID09PSAzMiB8fCAkZXZlbnQua2V5Q29kZSA9PT0gMTMpIHtcbiAgICAgICAgICByZXR1cm4gYWN0aXZhdGUoJGV2ZW50KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9O1xufSk7XG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3JkaW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FjY29yZGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQW1CRztBQWlCSCxPQUFPLENBQUMsTUFBTSxDQUFDLGFBQWEsRUFBRSxFQUFFLENBQUM7S0FDaEMsU0FBUyxDQUFDLGlCQUFpQixFQUFFO0lBQzVCLE1BQU0sQ0FBQztRQUNMLFFBQVEsRUFBRSxHQUFHO1FBQ2IsVUFBVSxFQUFFLFVBQVMsTUFBTSxFQUFFLFFBQVEsRUFBRSxNQUFNO1lBQzNDLFVBQVUsQ0FBQztZQUVYLHdFQUF3RTtZQUN4RSxJQUFJLE1BQU0sR0FBSSxLQUFLLENBQUMs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2lvbnMudG9wXG4gICAgICAgICAgfTtcblxuICAgICAgICAgIHN0eWxlKG0uZWwsICd0cmFuc2Zvcm0tb3JpZ2luJywgJzAgMCcpO1xuXG5cbiAgICAgICAgICBtLmNoaWxkcmVuID0gW107XG5cbiAgICAgICAgICAvKiBTZXQgdGhlIGdyYW5kY2hpbGRyZW4gdG8gdGhlIGludmVyc2UgdHJhbnNmb3JtICovXG4gICAgICAgICAgaWYgKG0uaW5pdGlhbERpbWVuc2lvbnMuaGVpZ2h0ICE9PSBtLm5ld0RpbWVuc2lvbnMuaGVpZ2h0IHx8XG4gICAgICAgICAgICAgIG0uaW5pdGlhbERpbWVuc2lvbnMud2lkdGggICE9PSBtLm5ld0RpbWVuc2lvbnMud2lkdGgpIHtcblxuICAgICAgICAgICAgbS5jaGlsZHJlbiA9IGZpbHRlci5jYWxsKG0uZWwuY2hpbGROb2RlcywgZnVuY3Rpb24oZWwpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGVsLm5vZGVUeXBlID09PSAxO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGZvckVhY2guY2FsbChtLmNoaWxkcmVuLCBmdW5jdGlvbihlbCkge1xuICAgICAgICAgICAgICB2YXIgZWxEaW1lbnNpb25zID0gZWwuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG4gICAgICAgICAgICAgIHZhciBvZmZzZXRGcm9tUGFyZW50ID0ge1xuICAgICAgICAgICAgICAgIHg6IG0ubmV3RGltZW5zaW9ucy5sZWZ0IC0gZWxEaW1lbnNpb25zLmxlZnQsXG4gICAgICAgICAgICAgICAgeTogbS5uZXdEaW1lbnNpb25zLnRvcCAgLSBlbERpbWVuc2lvbnMudG9wXG4gICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgdmFyIG9yaWdpbiA9IG9mZnNldEZyb21QYXJlbnQueCArICdweCAnO1xuICAgICAgICAgICAgICBvcmlnaW4gKz0gb2Zmc2V0RnJvbVBhcmVudC55ICsgJ3B4JztcblxuICAgICAgICAgICAgICBzdHlsZShlbCwgJ3RyYW5zZm9ybS1vcmlnaW4nLCBvcmlnaW4pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICB2YXIgZHVyYXRpb24gPSAxMDA7IC8vIEluIG1pbGxpc2Vjb25kc1xuICAgICAgICB2YXIgdCA9IDE7XG5cbiAgICAgICAgZnVuY3Rpb24gdHdlZW4oKSB7XG4gICAgICAgICAgZm9yRWFjaC5jYWxsKG1lYXN1cmVtZW50cywgZnVuY3Rpb24obSkge1xuICAgICAgICAgICAgaWYgKG0uaW5pdGlhbERpbWVuc2lvbnMuaGVpZ2h0ID09PSBtLm5ld0RpbWVuc2lvbnMuaGVpZ2h0ICYmXG4gICAgICAgICAgICAgICAgbS5pbml0aWFsRGltZW5zaW9ucy53aWR0aCAgPT09IG0ubmV3RGltZW5zaW9ucy53aWR0aCAgJiZcbiAgICAgICAgICAgICAgICBtLmluaXRpYWxEaW1lbnNpb25zLmxlZnQgICA9PT0gbS5uZXdEaW1lbnNpb25zLmxlZnQgICAmJlxuICAgICAgICAgICAgICAgIG0uaW5pdGlhbERpbWVuc2lvbnMudG9wICAgID09PSBtLm5ld0RpbWVuc2lvbnMudG9wKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgdFNjYWxlWCAgID0gMSArIChtLm5ld1NjYWxlLnggLSAxKSAqIHQ7XG4gICAgICAgICAgICB2YXIgdFNjYWxlWSAgID0gMSArIChtLm5ld1NjYWxlLnkgLSAxKSAqIHQ7XG4gICAgICAgICAgICB2YXIgdE9mZnNldFggID0gbS5uZXdPZmZzZXQueCAqIHQ7XG4gICAgICAgICAgICB2YXIgdE9mZnNldFkgID0gbS5uZXdPZmZzZXQueSAqIHQ7XG5cbiAgICAgICAgICAgIHZhciB0cmFuc2Zvcm0gPSAndHJhbnNsYXRlKCc7XG4gICAgICAgICAgICB0cmFuc2Zvcm0gKz0gdE9mZnNldFggKyAncHgsICc7XG4gICAgICAgICAgICB0cmFuc2Zvcm0gKz0gdE9mZnNldFkgKyAncHgpICc7XG4gICAgICAgICAgICB0cmFuc2Zvcm0gKz0gJ3NjYWxlKCcgKyB0U2NhbGVYICsgJywnICsgdFNjYWxlWSArICcpICc7XG4gICAgICAgICAgICB0cmFuc2Zvcm0gKz0gbS5pbml0aWFsVHJhbnNmb3JtO1xuXG4gICAgICAgICAgICBzdHlsZShtLmVsLCAndHJhbnNmb3JtJywgdHJhbnNmb3JtKTtcblxuICAgICAgICAgICAgZm9yRWFjaC5jYWxsKG0uY2hpbGRyZW4sIGZ1bmN0aW9uKGVsKSB7XG4gICAgICAgICAgICAgIHZhciBzY2FsZSA9ICdzY2FsZSgnICsgKDEvdFNjYWxlWCkgKyAnLCcgKyAoMS90U2NhbGVZKSArICcpJztcblxuICAgICAgICAgICAgICBzdHlsZShlbCwgJ3RyYW5zZm9ybScsIHNjYWxlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgdCAtPSAoMTYgLyBkdXJhdGlvbik7XG5cbiAgICAgICAgICBpZiAodCA+IDApIHtcbiAgICAgICAgICAgIHJlcXVlc3RBbmltYXRpb25GcmFtZSh0d2Vlbik7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNsZWFudXAoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdHdlZW4oKTtcblxuICAgICAgICBmdW5jdGlvbiBjbGVhbnVwKCkge1xuICAgICAgICAgIGZvckVhY2guY2FsbChtZWFzdXJlbWVudHMsIGZ1bmN0aW9uKG0pIHtcbiAgICAgICAgICAgIHN0eWxlKG0uZWwsICd0cmFuc2Zvcm0tb3JpZ2luJywgJycpO1xuICAgICAgICAgICAgc3R5bGUobS5lbCwgJ3RyYW5zZm9ybScsIG0uaW5pdGlhbFRyYW5zZm9ybSk7XG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cbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgZm4gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICBpZiAoc2VsZi5pc09wZW4pIHtcbiAgICAgICAgICAgIHNlbGYuY2xvc2UoKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc2VsZi5vcGVuKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgQXJyYXkucHJvdG90eXBlLmZvckVhY2guY2FsbCgkZWxlbWVudC5jaGlsZHJlbigpLCBmdW5jdGlvbihlbCkge1xuICAgICAgICAgICAgaWYgKGVsLmhhc0F0dHJpYnV0ZSgnYXktYWNjb3JkaW9uLWhlYWRlcicpKSB7XG4gICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNlbGYuaXNPcGVuKSB7XG4gICAgICAgICAgICAgIGVsLnJlbW92ZUF0dHJpYnV0ZSgnaGlkZGVuJyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBlbC5zZXRBdHRyaWJ1dGUoJ2hpZGRlbicsICdoaWRkZW4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfTtcblxuICAgICAgICBzZWxmLnJvb3RDdHJsLnJ1bihmbiwgY2IpO1xuICAgICAgfTtcbiAgICB9LFxuICAgIGxpbms6IGZ1bmN0aW9uKCRzY29wZSwgJGVsZW1lbnQsICRhdHRycywgJGN0cmxzKSB7XG4gICAgICB2YXIgc2VsZkN0cmwgPSAkY3RybHNbMF07XG4gICAgICB2YXIgcm9vdEN0cmwgPSAkY3RybHNbMV07XG5cbiAgICAgIHNlbGZDdHJsLnJvb3RDdHJsID0gcm9vdEN0cmw7XG5cbiAgICAgIHZhciBjaGlsZENhbGxiYWNrID0gZnVuY3Rpb24oZWwpIHtcbiAgICAgICAgaWYgKGVsLmhhc0F0dHJpYnV0ZSgnYXktYWNjb3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GVtZW50WzBdLmJsdXIoKTtcbiAgICAgICAgcmV0dXJuIGFjdGl2YXRlKCRldmVudCk7XG4gICAgICB9KTtcblxuICAgICAgJGVsZW1lbnQub24oJ2tleWRvd24nLCBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgaWYgKCRldmVudC5rZXlDb2RlID09PSAzMiB8fCAkZXZlbnQua2V5Q29kZSA9PT0gMTMpIHtcbiAgICAgICAgICByZXR1cm4gYWN0aXZhdGUoJGV2ZW50KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfVxuICB9O1xufSk7XG4iXX0= \ No newline at end of file diff --git a/package.json b/package.json index e4b5420..0e9e438 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ay-accordion", - "version": "1.0.4", + "version": "1.0.5", "copyright": "Copyright 2016 Ayogo Health Inc.", "license": "MIT", "homepage": "http://ayogo.com",