From 02c2beaef0352687747cba1a33b1313e1d0b34a5 Mon Sep 17 00:00:00 2001 From: Nicolas Bevacqua Date: Mon, 4 Apr 2016 10:16:44 -0300 Subject: [PATCH] Rebuilt distribution files --- dist/taggy.js | 70 +++++++++++++++++++++++++++++----------------- dist/taggy.min.css | 1 + dist/taggy.min.js | 3 +- 3 files changed, 48 insertions(+), 26 deletions(-) create mode 100644 dist/taggy.min.css diff --git a/dist/taggy.js b/dist/taggy.js index 7411652..92b34d0 100644 --- a/dist/taggy.js +++ b/dist/taggy.js @@ -1696,6 +1696,7 @@ function autocomplete(el, options) { ranchorright = new RegExp(o.anchor + '$'); } + var hasItems = false; var api = { anchor: o.anchor, clear: clear, @@ -1749,27 +1750,33 @@ function autocomplete(el, options) { } function loading(forceShow) { - if (typeof suggestions === 'function') { - _crossvent2.default.remove(attachment, 'focus', loading); - var query = readInput(); - if (query !== state.query) { - (function () { - state.counter++; - state.query = query; - - var counter = state.counter; - suggestions({ query: query, limit: limit }, function (s) { - if (state.counter === counter) { - loaded(s, forceShow); - } - }); - })(); - } + if (typeof suggestions !== 'function') { + return; + } + _crossvent2.default.remove(attachment, 'focus', loading); + var query = readInput(); + if (query === state.query) { + return; } + hasItems = false; + state.query = query; + + var counter = ++state.counter; + + suggestions({ query: query, limit: limit }, function (err, result, blankQuery) { + if (state.counter !== counter) { + return; + } + loaded(result, forceShow); + if (err || blankQuery) { + hasItems = false; + } + }); } function loaded(categories, forceShow) { clear(); + hasItems = true; api.suggestions = []; categories.forEach(function (cat) { return cat.list.forEach(function (suggestion) { @@ -1788,6 +1795,7 @@ function autocomplete(el, options) { categories.removeChild(categories.lastChild); } categoryMap = Object.create(null); + hasItems = false; } function readInput() { @@ -2110,9 +2118,9 @@ function autocomplete(el, options) { } function show() { + eye.refresh(); if (!visible()) { container.className += ' tac-show'; - eye.refresh(); _crossvent2.default.fabricate(attachment, 'autocomplete-show'); } } @@ -2245,6 +2253,14 @@ function autocomplete(el, options) { e.preventDefault(); } + function showNoResults() { + noneMatch.classList.remove('tac-hide'); + } + + function hideNoResults() { + noneMatch.classList.add('tac-hide'); + } + function filtering() { if (!visible()) { return; @@ -2252,12 +2268,15 @@ function autocomplete(el, options) { debouncedLoading(true); _crossvent2.default.fabricate(attachment, 'autocomplete-filter'); var value = readInput(); + if (!o.blankSearch && !value) { + hide();return; + } var nomatch = noMatches({ query: value }); var count = walkCategories(); - if (count === 0 && nomatch) { - noneMatch.classList.remove('tac-hide'); + if (count === 0 && nomatch && hasItems) { + showNoResults(); } else { - noneMatch.classList.add('tac-hide'); + hideNoResults(); } if (!selection) { move(); @@ -2961,6 +2980,7 @@ module.exports = function taggy(el, options) { predictNextSearch: predictNextSearch, noMatches: noMatches, noMatchesText: config.noMatches, + blankSearch: config.blankSearch, debounce: config.debounce, set: function set(s) { el.value = ''; @@ -2989,7 +3009,7 @@ module.exports = function taggy(el, options) { var limit = data.limit; if (!config.blankSearch && query.length === 0) { - done([]);return; + done(null, [], true);return; } api.emit('autocomplete.beforeUpdate'); var hash = (0, _hashSum2.default)(query); // fast, case insensitive, prevents collisions @@ -3001,7 +3021,7 @@ module.exports = function taggy(el, options) { var diff = duration * 1000; var fresh = new Date(start + diff) > new Date(); if (fresh) { - done(entry.items.slice());return; + done(null, entry.items.slice());return; } } } @@ -3019,10 +3039,10 @@ module.exports = function taggy(el, options) { cache[hash] = { created: new Date(), items: items }; } previousSuggestions = items; - done(items.slice()); + done(null, items.slice()); }).catch(function (error) { console.log('Autocomplete suggestions promise rejected', error, el); - done([]); + done(error, []); }); } } @@ -3293,4 +3313,4 @@ function text(el, value) { },{}]},{},[32])(32) }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJub2RlX21vZHVsZXMvYnVsbHNleWUvYnVsbHNleWUuanMiLCJub2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0cmFpbGluZyAmJiAodGltZW91dElkIHx8ICFsZWFkaW5nKTtcblxuICAgIGlmIChtYXhXYWl0ID09PSBmYWxzZSkge1xuICAgICAgdmFyIGxlYWRpbmdDYWxsID0gbGVhZGluZyAmJiAhdGltZW91dElkO1xuICAgIH0gZWxzZSB7XG4gICAgICBpZiAoIW1heFRpbWVvdXRJZCAmJiAhbGVhZGluZykge1xuICAgICAgICBsYXN0Q2FsbGVkID0gc3RhbXA7XG4gICAgICB9XG4gICAgICB2YXIgcmVtYWluaW5nID0gbWF4V2FpdCAtIChzdGFtcCAtIGxhc3RDYWxsZWQpLFxuICAgICAgICAgIGlzQ2FsbGVkID0gcmVtYWluaW5nIDw9IDAgfHwgcmVtYWluaW5nID4gbWF4V2FpdDtcblxuICAgICAgaWYgKGlzQ2FsbGVkKSB7XG4gICAgICAgIGlmIChtYXhUaW1lb3V0SWQpIHtcbiAgICAgICAgICBtYXhUaW1lb3V0SWQgPSBjbGVhclRpbWVvdXQobWF4VGltZW91dElkKTtcbiAgICAgICAgfVxuICAgICAgICBsYXN0Q2FsbGVkID0gc3RhbXA7XG4gICAgICAgIHJlc3VsdCA9IGZ1bmMuYXBwbHkodGhpc0FyZywgYXJncyk7XG4gICAgICB9XG4gICAgICBlbHNlIGlmICghbWF4VGltZW91dElkKSB7XG4gICAgICAgIG1heFRpbWVvdXRJZCA9IHNldFRpbWVvdXQobWF4RGVsYXllZCwgcmVtYWluaW5nKTtcbiAgICAgIH1cbiAgICB9XG4gICAgaWYgKGlzQ2FsbGVkICYmIHRpbWVvdXRJZCkge1xuICAgICAgdGltZW91dElkID0gY2xlYXJUaW1lb3V0KHRpbWVvdXRJZCk7XG4gICAgfVxuICAgIGVsc2UgaWYgKCF0aW1lb3V0SWQgJiYgd2FpdCAhPT0gbWF4V2FpdCkge1xuICAgICAgdGltZW91dElkID0gc2V0VGltZW91dChkZWxheWVkLCB3YWl0KTtcbiAgICB9XG4gICAgaWYgKGxlYWRpbmdDYWxsKSB7XG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mRleE9mKGNoYXIsIHByZXZJbmRleCArIDEpO1xuICAgICAgICAgICAgY29uc3QgZmFpbCA9IGkgPT09IC0xIHx8ICghaW5pdCAmJiBwcmV2SW5kZXggKyAxICE9PSBpKTtcbiAgICAgICAgICAgIGlmIChpbml0KSB7XG4gICAgICAgICAgICAgIGluaXQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgdGVtcEluZGV4ID0gaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChmYWlsKSB7XG4gICAgICAgICAgICAgIGNvbnRpbnVlIHJldHJ5O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcHJldkluZGV4ID0gaTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZm9yIChsZXQgZWwgb2YgZWxlbXMuc3BsaWNlKHRlbXBJbmRleCwgMSArIHByZXZJbmRleCAtIHRlbXBJbmRleCkpIHtcbiAgICAgICAgICAgIG9uKGVsKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYmFsYW5jZSgpO1xuICAgICAgICAgIG5lZWRsZSA9IG5lZWRsZS5yZXBsYWNlKHdvcmQsICcnKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGZ1enp5ICgpIHtcbiAgICAgIGZvciAobGV0IGlucHV0IG9mIG5lZWRsZSkge1xuICAgICAgICB3aGlsZSAoZWxlbXMubGVuZ3RoKSB7XG4gICAgICAgICAgbGV0IGVsID0gZWxlbXMuc2hpZnQoKTtcbiAgICAgICAgICBpZiAoKGVsLmlubmVyVGV4dCB8fCBlbC50ZXh0Q29udGVudCkgPT09IGlucHV0KSB7XG4gICAgICAgICAgICBvbihlbCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb2ZmKGVsKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiB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C5mYWJyaWNhdGUoYXR0YWNobWVudCwgJ2F1dG9jb21wbGV0ZS1oaWRlJyk7XG4gICAgaWYgKGVsLnZhbHVlID09PSBsYXN0UHJlZml4KSB7XG4gICAgICBlbC52YWx1ZSA9ICcnO1xuICAgIH1cbiAgfVxuXG4gIGZ1bmN0aW9uIGtleWRvd24gKGUpIHtcbiAgICBjb25zdCBzaG93biA9IHZpc2libGUoKTtcbiAgICBjb25zdCB3aGljaCA9IGUud2hpY2ggfHwgZS5rZXlDb2RlO1xuICAgIGlmICh3aGljaCA9PT0gS0VZX0RPV04pIHtcbiAgICAgIGlmIChhbnlJbnB1dCAmJiBvLmF1dG9TaG93T25VcERvd24pIHtcbiAgICAgICAgc2hvdygpO1xuICAgICAgfVxuICAgICAgaWYgKHNob3duKSB7XG4gICAgICAgIG1vdmUoKTtcbiAgICAgICAgc3RvcChlKTtcbiAgICAgIH1cbiAgICB9IGVsc2UgaWYgKHdoaWNoID09PSBLRVlfVVApIHtcbiAgICAgIGlmIChhbnlJbnB1dCAmJiBvLmF1dG9TaG93T25VcERvd24pIHtcbiAgICAgICAgc2hvdygpO1xuICAgICAgfVxuICAgICAgaWYgKHNob3duKSB7XG4gICAgICAgIG1vdmUodHJ1ZSk7XG4gICAgICAgIHN0b3AoZSk7XG4gICAgICB9XG4gICAgfSBlbHNlIGlmICh3aGljaCA9PT0gS0VZX0JBQ0tTUEFDRSkge1xuICAgICAgaWYgKGFueUlucHV0ICYmIG8uYXV0b1Nob3dPblVwRG93bikge1xuICAgICAgICBzaG93KCk7XG4gICAgICB9XG4gICAgfSBlbHNlIGlmIChzaG93bikge1xuICAgICAgaWYgKHdoaWNoID09PSBLRVlfRU5URVIpIHtcbiAgICAgICAgaWYgKHNlbGVjdGlvbikge1xuICAgICAgICAgIGNyb3NzdmVudC5mYWJyaWNhdGUoc2VsZWN0aW9uLCAnY2xpY2snKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBoaWRlKCk7XG4gICAgICAg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5pbmRleE9mKGNoYXIsIHByZXZJbmRleCArIDEpO1xuICAgICAgICAgICAgY29uc3QgZmFpbCA9IGkgPT09IC0xIHx8ICghaW5pdCAmJiBwcmV2SW5kZXggKyAxICE9PSBpKTtcbiAgICAgICAgICAgIGlmIChpbml0KSB7XG4gICAgICAgICAgICAgIGluaXQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgdGVtcEluZGV4ID0gaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChmYWlsKSB7XG4gICAgICAgICAgICAgIGNvbnRpbnVlIHJldHJ5O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcHJldkluZGV4ID0gaTtcbiAgICAgICAgICB9XG4gICAgICAgICAgZm9yIChsZXQgZWwgb2YgZWxlbXMuc3BsaWNlKHRlbXBJbmRleCwgMSArIHByZXZJbmRleCAtIHRlbXBJbmRleCkpIHtcbiAgICAgICAgICAgIG9uKGVsKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgYmFsYW5jZSgpO1xuICAgICAgICAgIG5lZWRsZSA9IG5lZWRsZS5yZXBsYWNlKHdvcmQsICcnKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGZ1enp5ICgpIHtcbiAgICAgIGZvciAobGV0IGlucHV0IG9mIG5lZWRsZSkge1xuICAgICAgICB3aGlsZSAoZWxlbXMubGVuZ3RoKSB7XG4gICAgICAgICAgbGV0IGVsID0gZWxlbXMuc2hpZnQoKTtcbiAgICAgICAgICBpZiAoKGVsLmlubmVyVGV4dCB8fCBlbC50ZXh0Q29udGVudCkgPT09IGlucHV0KSB7XG4gICAgICAgICAgICBvbihlbCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb2ZmKGVsKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlv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ljYXRlKGF0dGFjaG1lbnQsICdhdXRvY29tcGxldGUtaGlkZScpO1xuICAgIGlmIChlbC52YWx1ZSA9PT0gbGFzdFByZWZpeCkge1xuICAgICAgZWwudmFsdWUgPSAnJztcbiAgICB9XG4gIH1cblxuICBmdW5jdGlvbiBrZXlkb3duIChlKSB7XG4gICAgY29uc3Qgc2hvd24gPSB2aXNpYmxlKCk7XG4gICAgY29uc3Qgd2hpY2ggPSBlLndoaWNoIHx8IGUua2V5Q29kZTtcbiAgICBpZiAod2hpY2ggPT09IEtFWV9ET1dOKSB7XG4gICAgICBpZiAoYW55SW5wdXQgJiYgby5hdXRvU2hvd09uVXBEb3duKSB7XG4gICAgICAgIHNob3coKTtcbiAgICAgIH1cbiAgICAgIGlmIChzaG93bikge1xuICAgICAgICBtb3ZlKCk7XG4gICAgICAgIHN0b3AoZSk7XG4gICAgICB9XG4gICAgfSBlbHNlIGlmICh3aGljaCA9PT0gS0VZX1VQKSB7XG4gICAgICBpZiAoYW55SW5wdXQgJiYgby5hdXRvU2hvd09uVXBEb3duKSB7XG4gICAgICAgIHNob3coKTtcbiAgICAgIH1cbiAgICAgIGlmIChzaG93bikge1xuICAgICAgICBtb3ZlKHRydWUpO1xuICAgICAgICBzdG9wKGUpO1xuICAgICAgfVxuICAgIH0gZWxzZSBpZiAod2hpY2ggPT09IEtFWV9CQUNLU1BBQ0UpIHtcbiAgICAgIGlmIChhbnlJbnB1dCAmJiBvLmF1dG9TaG93T25VcERvd24pIHtcbiAgICAgICAgc2hvdygpO1xuICAgICAgfVxuICAgIH0gZWxzZSBpZiAoc2hvd24pIHtcbiAgICAgIGlmICh3aGljaCA9PT0gS0VZX0VOVEVSKSB7XG4gICAgICAgIGlmIChzZWxlY3Rpb24pIHtcbiAgICAgICAgICBjcm9zc3ZlbnQuZmFicmljYXRlKHNlbGVjdGlvbiwgJ2NsaWNrJyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaGlkZSgpO1xuICAgICAgICB9X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dhdXRvY29tcGxldGUtZmlsdGVyJyk7XG4gICAgICAgICAgaWYgKGxpLmNsYXNzTmFtZS5pbmRleE9mKCd0YWMtaGlkZScpID09PSAtMSkge1xuICAgICAgICAgICAgY291bnQrKztcbiAgICAgICAgICAgIGlmIChoaWdobGlnaHRlcikge1xuICAgICAgICAgICAgICBoaWdobGlnaHQobGksIHZhbHVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgbGkgPSBsaS5uZXh0U2libGluZztcbiAgICAgIH1cbiAgICAgIHJldHVybiBjb3VudDtcbiAgICB9XG4gIH1cblxuICBmdW5jdGlvbiBkZWZlcnJlZEZpbHRlcmluZ05vRW50ZXIgKGUpIHtcbiAgICBjb25zdCB3aGljaCA9IGUud2hpY2ggfHwgZS5rZXlDb2RlO1xuICAgIGlmICh3aGljaCA9PT0gS0VZX0VOVEVSKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGRlZmVycmVkRmlsdGVyaW5nKCk7XG4gIH1cblxuICBmdW5jdGlvbiBkZWZlcnJlZFNob3cgKGUpIHtcbiAgICBjb25zdCB3aGljaCA9IGUud2hpY2ggfHwgZS5rZXlDb2RlO1xuICAgIGlmICh3aGljaCA9PT0gS0VZX0VOVEVSIHx8IHdoaWNoID09PSBLRVlfVEFCKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIHNldFRpbWVvdXQoc2hvdywgMCk7XG4gIH1cblxuICBmdW5jdGlvbiBhdXRvY29tcGxldGVFdmVudFRhcmdldCAoZSkge1xuICAgIGxldCB0YXJnZXQgPSBlLnRhcmdldDtcbiAgICBpZiAodGFyZ2V0ID09PSBhdHRhY2htZW50KSB7XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgd2hpbGUgKHRhcmdldCkge1xuICAgICAgaWYgKHRhcmdldCA9PT0gY29udGFpbmVyIHx8IHRhcmdldCA9PT0gYXR0YWNobWVudCkge1xuICAgICAgIC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0gbnVsbDtcbiAgfVxufTtcbiIsIid1c2Ugc3RyaWN0JztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gdGV4dCAoZWwsIHZhbHVlKSB7XG4gIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAyKSB7XG4gICAgZWwuaW5uZXJUZXh0ID0gZWwudGV4dENvbnRlbnQgPSB2YWx1ZTtcbiAgfVxuICBpZiAodHlwZW9mIGVsLmlubmVyVGV4dCA9PT0gJ3N0cmluZycpIHtcbiAgICByZXR1cm4gZWwuaW5uZXJUZXh0O1xuICB9XG4gIHJldHVybiBlbC50ZXh0Q29udGVudDtcbn1cbiJdfQ== diff --git a/dist/taggy.min.css b/dist/taggy.min.css new file mode 100644 index 0000000..31b5662 --- /dev/null +++ b/dist/taggy.min.css @@ -0,0 +1 @@ +.tay-editor{padding:10px;cursor:text}.tay-tags-before{margin-left:-5px}.tay-tag{display:inline-block;border:1px solid #666;padding:3px;margin:4px}.tay-invalid{border-color:#c00}.tay-tag-remove:after{margin-left:4px;padding:0 4px;content:'x';background-color:#ccc;cursor:pointer}.tay-input{padding:3px 3px 3px 8px;margin:5px 0}.tay-input[placeholder]{min-width:100%}.tac-container{display:none;position:absolute;-webkit-box-shadow:1px 2px 6px;box-shadow:1px 2px 6px;background-color:#fff;color:#333;-webkit-transition:left .1s ease-in-out;-moz-transition:left .1s ease-in-out;-o-transition:left .1s ease-in-out;-ms-transition:left .1s ease-in-out;transition:left .1s ease-in-out}.tac-list{padding:0;margin:0;list-style-type:none}.tac-show{display:block}.tac-hide{display:none}.tac-empty{cursor:default;padding:7px}.tac-item{cursor:pointer;overflow:hidden;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis;padding:7px}.tac-item:hover{background-color:#444;color:#fff}.tac-selected{background-color:#333;color:#fff}.tac-char-highlight{font-weight:700}.tac-category-id{background-color:#eee;color:#aaa;text-align:right;text-transform:capitalize;font-style:italic;font-size:12px;-webkit-box-shadow:1px 0 1px;box-shadow:1px 0 1px;padding:7px} \ No newline at end of file diff --git a/dist/taggy.min.js b/dist/taggy.min.js index eb21ded..d28b489 100644 --- a/dist/taggy.min.js +++ b/dist/taggy.min.js @@ -1 +1,2 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.taggy=e()}}(function(){return function e(t,n,r){function o(i,u){if(!n[i]){if(!t[i]){var c="function"==typeof require&&require;if(!u&&c)return c(i,!0);if(a)return a(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var l=n[i]={exports:{}};t[i][0].call(l.exports,function(e){var n=t[i][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;io;++o){n=s(t[o]);try{r.add(n)}catch(i){throw new Error("setRanges(): Element could not be added to control selection")}}r.select(),d(e)}function a(e,t){var n=e.getAllRanges();e.removeAllRanges();for(var r=0,o=n.length;o>r;++r)g(t,n[r])||e.addRange(n[r]);e.rangeCount||u(e)}function i(e,t){var n="start",r="end";e.anchorNode=t[n+"Container"],e.anchorOffset=t[n+"Offset"],e.focusNode=t[r+"Container"],e.focusOffset=t[r+"Offset"]}function u(e){e.anchorNode=e.focusNode=null,e.anchorOffset=e.focusOffset=0,e.rangeCount=0,e.isCollapsed=!0,e._ranges.length=0}function c(e){if(!e.length||1!==e[0].nodeType)return!1;for(var t=1,n=e.length;n>t;++t)if(!h(e[0],e[t]))return!1;return!0}function s(e){var t=e.getNodes();if(!c(t))throw new Error("getSingleElementFromRange(): range did not consist of a single element");return t[0]}function l(e){return e&&void 0!==e.text}function f(e,t){e._ranges=[t],i(e,t,!1),e.rangeCount=1,e.isCollapsed=t.collapsed}function d(e){if(e._ranges.length=0,"None"===e._selection.type)u(e);else{var t=e._selection.createRange();if(l(t))f(e,t);else{e.rangeCount=t.length;for(var n,r=0;ra;++a)o.add(n.item(a));try{o.add(r)}catch(u){throw new Error("addRange(): Element could not be added to control selection")}o.select(),d(e)}function g(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}function h(e,t){for(var n=t;n.parentNode;){if(n.parentNode===e)return!0;n=n.parentNode}return!1}function v(){return new r(n.document.selection)}var m=e("./rangeToTextRange"),y=n.document,w=y.body,b=r.prototype;b.removeAllRanges=function(){var e;try{this._selection.empty(),"None"!==this._selection.type&&(e=w.createTextRange(),e.select(),this._selection.empty())}catch(t){}u(this)},b.addRange=function(e){"Control"===this._selection.type?p(this,e):(m(e).select(),this._ranges[0]=e,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,i(this,e,!1))},b.setRanges=function(e){this.removeAllRanges();var t=e.length;t>1?o(this,e):t&&this.addRange(e[0])},b.getRangeAt=function(e){if(0>e||e>=this.rangeCount)throw new Error("getRangeAt(): index out of bounds");return this._ranges[e].cloneRange()},b.removeRange=function(e){if("Control"!==this._selection.type)return void a(this,e);for(var t,n=this._selection.createRange(),r=s(e),o=w.createControlRange(),i=!1,u=0,c=n.length;c>u;++u)t=n.item(u),t!==r||i?o.add(n.item(u)):i=!0;o.select(),d(this)},b.eachRange=function(e,t){var n=0,r=this._ranges.length;for(n=0;r>n;++n)if(e(this.getRangeAt(n)))return t},b.getAllRanges=function(){var e=[];return this.eachRange(function(t){e.push(t)}),e},b.setSingleRange=function(e){this.removeAllRanges(),this.addRange(e)},t.exports=v}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./rangeToTextRange":7}],6:[function(e,t,n){"use strict";function r(e,t){var n=typeof e[t];return"function"===n||!("object"!==n||!e[t])||"unknown"===n}function o(e,t){return"undefined"!=typeof e[t]}function a(e){return function(t,n){for(var r=n.length;r--;)if(!e(t,n[r]))return!1;return!0}}t.exports={method:r,methods:a(r),property:o,properties:a(o)}},{}],7:[function(e,t,n){(function(e){"use strict";function n(e){if(e.collapsed)return o({node:e.startContainer,offset:e.startOffset},!0);var t=o({node:e.startContainer,offset:e.startOffset},!0),n=o({node:e.endContainer,offset:e.endOffset},!1),r=i.createTextRange();return r.setEndPoint("StartToStart",t),r.setEndPoint("EndToEnd",n),r}function r(e){var t=e.nodeType;return 3===t||4===t||8===t}function o(e,t){var n,o,u,c,s=e.offset,l=i.createTextRange(),f=r(e.node);return f?(n=e.node,o=n.parentNode):(c=e.node.childNodes,n=s0)return{x:r[0].left,y:r[0].top,absolute:!0}}}return{x:0,y:0}}function h(t,n){var r=f.createElement("span"),o=t.mirror,a=t.computed;return y(o,v(e).substring(0,n)),"INPUT"===e.tagName&&(o.textContent=o.textContent.replace(/\s/g," ")),y(r,v(e).substring(n)||"."),o.appendChild(r),{x:r.offsetLeft+parseInt(a.borderLeftWidth),y:r.offsetTop+parseInt(a.borderTopWidth)}}function v(e){return C?e.value:e.innerHTML}function m(){function t(e){o[e]=n[e]}var n=l.getComputedStyle?getComputedStyle(e):e.currentStyle,r=f.createElement("div"),o=r.style;return f.body.appendChild(r),"INPUT"!==e.tagName&&(o.wordWrap="break-word"),o.whiteSpace="pre-wrap",o.position="absolute",o.visibility="hidden",s.forEach(t),d?(o.width=parseInt(n.width)-2+"px",e.scrollHeight>parseInt(n.height)&&(o.overflowY="scroll")):o.overflow="hidden",{mirror:r,computed:n}}function y(e,t){C?e.textContent=t:e.innerHTML=t}function w(t){var n=t?"remove":"add";a[n](e,"keydown",x),a[n](e,"keyup",x),a[n](e,"input",x),a[n](e,"paste",x),a[n](e,"change",x)}function b(){w(!0)}var C="INPUT"===e.tagName||"TEXTAREA"===e.tagName,x=u(i,30),E=t||{};return w(),{read:r,refresh:x,destroy:b}}var o=e("sell"),a=e("crossvent"),i=e("seleccion"),u=e("./throttle"),c=i.get,s=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing"],l=n,f=document,d=null!==l.mozInnerScreenX&&void 0!==l.mozInnerScreenX;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./throttle":11,crossvent:13,seleccion:8,sell:16}],11:[function(e,t,n){"use strict";function r(e,t){var n,r=-(1/0);return function(){function o(){clearTimeout(n),n=null;var a=r+t,i=Date.now();i>a?(r=i,e()):n=setTimeout(o,a-i)}n||o()}}t.exports=r},{}],12:[function(e,t,n){(function(e){function n(){try{var e=new r("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(t){}return!1}var r=e.CustomEvent;t.exports=n()?r:"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){return e.addEventListener(t,n,r)}function o(e,t,n){return e.attachEvent("on"+t,s(e,t,n))}function a(e,t,n,r){return e.removeEventListener(t,n,r)}function i(e,t,n){var r=l(e,t,n);return r?e.detachEvent("on"+t,r):void 0}function u(e,t,n){function r(){var e;return g.createEvent?(e=g.createEvent("Event"),e.initEvent(t,!0,!0)):g.createEventObject&&(e=g.createEventObject()),e}function o(){return new d(t,{detail:n})}var a=-1===p.indexOf(t)?o():r();e.dispatchEvent?e.dispatchEvent(a):e.fireEvent("on"+t,a)}function c(e,t,r){return function(t){var o=t||n.event;o.target=o.target||o.srcElement,o.preventDefault=o.preventDefault||function(){o.returnValue=!1},o.stopPropagation=o.stopPropagation||function(){o.cancelBubble=!0},o.which=o.which||o.keyCode,r.call(e,o)}}function s(e,t,n){var r=l(e,t,n)||c(e,t,n);return m.push({wrapper:r,element:e,type:t,fn:n}),r}function l(e,t,n){var r=f(e,t,n);if(r){var o=m[r].wrapper;return m.splice(r,1),o}}function f(e,t,n){var r,o;for(r=0;rn)return!1;if(r===n)return e===t;e:for(var o=0,a=0;r>o;o++){for(var i=e.charCodeAt(o);n>a;)if(t.charCodeAt(a++)===i)continue e;return!1}return!0}t.exports=r},{}],16:[function(e,t,n){"use strict";function r(e){return{start:e.selectionStart,end:e.selectionEnd}}function o(e){function t(t,r){return n!==e&&(n?n.focus():e.blur()),{start:t,end:r}}var n=document.activeElement;n!==e&&e.focus();var r=document.selection.createRange(),o=r.getBookmark(),u=e.value,c=a(u),s=r.parentElement();if(null===s||!i(s))return t(0,0);r.text=c+r.text+c;var l=e.value;return e.value=u,r.moveToBookmark(o),r.select(),t(l.indexOf(c),l.lastIndexOf(c)-c.length)}function a(e){var t;do t="@@marker."+Math.random()*new Date;while(-1!==e.indexOf(t));return t}function i(e){return"INPUT"===e.tagName&&"text"===e.type||"TEXTAREA"===e.tagName}function u(e,t){e.selectionStart=s(e,t.start),e.selectionEnd=s(e,t.end)}function c(e,t){var n=e.createTextRange();"end"===t.start&&"end"===t.end?(n.collapse(!1),n.select()):(n.collapse(!0),n.moveEnd("character",s(e,t.end)),n.moveStart("character",s(e,t.start)),n.select())}function s(e,t){return"end"===t?e.value.length:t||0}function l(e,t){return 2===arguments.length&&d(e,t),f(e)}var f=r,d=u;document.selection&&document.selection.createRange&&(f=o,d=c),t.exports=l},{}],17:[function(e,t,n){"use strict";function r(e,t){function n(e){F(!0),ye=be.attachment=e,te="INPUT"===ye.tagName||"TEXTAREA"===ye.tagName,ne=te||u(ye),F()}function r(){ee&&ee.refresh()}function b(t){if("function"==typeof fe){s.remove(ye,"focus",b);var n=te?e.value:e.innerHTML;if(n!==we.value){we.counter++,we.value=n;var r=we.counter;fe(n,function(e){we.counter===r&&C(e,t)})}}}function C(e,t){x(),e.forEach(E),be.suggestions=e,t&&k(),P()}function x(){for(L();he.lastChild;)he.removeChild(he.lastChild)}function E(t){function n(){var e=se(t);T(e),B(),ye.focus(),s.fabricate(ye,"autocomplete-selected",e)}function r(){var n=te?e.value:e.innerHTML;N(n,t)?i.className=i.className.replace(/ tac-hide/g,""):s.fabricate(i,"autocomplete-hide")}function o(){O(i)||(i.className+=" tac-hide",ve===i&&L())}var i=a("li","tac-item");return ue(i,t),s.add(i,"click",n),s.add(i,"autocomplete-filter",r),s.add(i,"autocomplete-hide",o),he.appendChild(i),be.suggestions.push(t),i}function T(e){return ae.anchor?(R()?be.appendText:be.appendHTML)(e):void ge(e)}function N(e,t){if(ae.anchor){var n=(R()?be.filterAnchoredText:be.filterAnchoredHTML)(e,t);return n?pe(n.input,n.suggestion):!1}return pe(e,t)}function R(){return o(ye)}function S(){return-1!==he.className.indexOf("tac-show")}function O(e){return-1!==e.className.indexOf("tac-hide")}function k(){S()||(he.className+=" tac-show",ee.refresh(),s.fabricate(ye,"autocomplete-show"))}function A(e){var t=1===e.which&&!e.metaKey&&!e.ctrlKey;t!==!1&&_()}function _(){S()?B():k()}function I(e){L(),e&&(ve=e,ve.className+=" tac-selected")}function L(){ve&&(ve.className=ve.className.replace(/ tac-selected/g,""),ve=null)}function H(e,t){var n=he.children.length;if(t>n)return void L();if(0!==n){var r=e?"lastChild":"firstChild",o=e?"previousSibling":"nextSibling",a=ve&&ve[o]||he[r];I(a),O(a)&&H(e,t?t+1:1)}}function B(){ee.sleep(),he.className=he.className.replace(/ tac-show/g,""),L(),s.fabricate(ye,"autocomplete-hide")}function z(e){var t=S(),n=e.which||e.keyCode;n===v?(ne&&ae.autoShowOnUpDown&&k(),t&&(H(),D(e))):n===h?(ne&&ae.autoShowOnUpDown&&k(),t&&(H(!0),D(e))):n===d?ne&&ae.autoShowOnUpDown&&k():t&&(n===p?(ve?s.fabricate(ve,"click"):B(),D(e)):n===g&&(B(),D(e)))}function D(e){e.stopPropagation(),e.preventDefault()}function P(){if(S()){b(!0),s.fabricate(ye,"autocomplete-filter");for(var e=he.firstChild,t=0;e;)t>=de&&s.fabricate(e,"autocomplete-hide"),de>t&&(s.fabricate(e,"autocomplete-filter"),-1===e.className.indexOf("tac-hide")&&t++),e=e.nextSibling;ve||H(),ve||B()}}function U(e){var t=e.which||e.keyCode;t!==p&&me()}function M(e){var t=e.which||e.keyCode;t!==p&&setTimeout(k,0)}function W(e){var t=e.target;if(t===ye)return!0;for(;t;){if(t===he||t===ye)return!0;t=t.parentNode}}function j(e){var t=e.which||e.keyCode;t===m&&B()}function X(e){W(e)||B()}function F(e){var t=e?"remove":"add";ee&&(ee.destroy(),ee=null),e||(ee=l(he,ye,{caret:ne&&"INPUT"!==ye.tagName}),S()||ee.sleep()),e||ne&&y.activeElement!==ye?s[t](ye,"focus",b):b(),ne?(s[t](ye,"keypress",M),s[t](ye,"keypress",me),s[t](ye,"keydown",U),s[t](ye,"paste",me),s[t](ye,"keydown",z),ae.autoHideOnBlur&&s[t](ye,"keydown",j)):(s[t](ye,"click",A),s[t](w,"keydown",z)),ae.autoHideOnClick&&s[t](y,"click",X),le&&s[t](le,"submit",B)}function V(){F(!0),ie.contains(he)&&ie.removeChild(he)}function q(t){te?e.value=t:e.innerHTML=t}function K(e,t){e.innerText=e.textContent=ce(t)}function Y(e,t){var n=e.toLowerCase(),r=ce(t)||"";if(f(n,r.toLowerCase()))return!0;var o=se(t)||"";return"string"!=typeof o?!1:f(n,o.toLowerCase())}function $(e,t){for(var n="",r=!1,o=t.start;r===!1&&o>=0;)n=e.substr(o-1,t.start-o+1),r=re.test(n),o--;return{text:r?n:null,start:o}}function G(t,n){var r=c(e),o=$(t,r).text;return o?{input:o,suggestion:n}:void 0}function J(t){var n=e.value,r=c(e),o=$(n,r),a=n.substr(0,o.start),i=n.substr(o.start+o.text.length+(r.end-r.start)),u=a+t+" ";e.value=u+i,c(e,{start:u.length,end:u.length})}function Q(){throw new Error("Anchoring in editable elements is disabled by default.")}function Z(){throw new Error("Anchoring in editable elements is disabled by default.")}var ee,te,ne,re,oe,ae=t||{},ie=ae.appendTo||y.body,ue=ae.render||K,ce=ae.getText,se=ae.getValue,le=ae.form,fe=ae.suggestions,de="number"==typeof ae.limit?ae.limit:1/0,pe=ae.filter||Y,ge=ae.set||q,he=a("ul","tac-list"),ve=null,me=i(P),ye=e,we={counter:0,value:null};void 0===ae.autoHideOnBlur&&(ae.autoHideOnBlur=!0),void 0===ae.autoHideOnClick&&(ae.autoHideOnClick=!0),void 0===ae.autoShowOnUpDown&&(ae.autoShowOnUpDown="INPUT"===e.tagName),ae.anchor&&(re=new RegExp("^"+ae.anchor),oe=new RegExp(ae.anchor+"$"));var be={add:E,anchor:ae.anchor,clear:x,show:k,hide:B,toggle:_,destroy:V,refreshPosition:r,appendText:J,appendHTML:Z,filterAnchoredText:G,filterAnchoredHTML:Q,defaultAppendText:J,defaultFilter:Y,defaultRenderer:K,defaultSetter:q,retarget:n,attachment:ye,list:he,suggestions:[]};return n(e),ie.appendChild(he),e.setAttribute("autocomplete","off"),Array.isArray(fe)&&C(fe,!1),be}function o(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function a(e,t){var n=y.createElement(e);return n.className=t,n}function i(e){return function(){setTimeout(e,0)}}function u(e){var t=e.getAttribute("contentEditable");return"false"===t?!1:"true"===t?!0:e.parentElement?u(e.parentElement):!1}var c=e("sell"),s=e("crossvent"),l=e("bullseye"),f=e("fuzzysearch"),d=8,p=13,g=27,h=38,v=40,m=9,y=document,w=y.documentElement;t.exports=r},{bullseye:1,crossvent:13,fuzzysearch:15,sell:16}],18:[function(e,t,n){"use strict";var r=e("crossvent"),o=e("./dom"),a=e("./text"),i=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","webkitBoxSizing","mozBoxSizing","boxSizing","padding","border"],u=20;t.exports=function(e){function t(){var e,t,n=l();for(t=0;to;++o){n=c(t[o]);try{r.add(n)}catch(a){throw new Error("setRanges(): Element could not be added to control selection")}}r.select(),d(e)}function i(e,t){var n=e.getAllRanges();e.removeAllRanges();for(var r=0,o=n.length;o>r;++r)v(t,n[r])||e.addRange(n[r]);e.rangeCount||u(e)}function a(e,t){var n="start",r="end";e.anchorNode=t[n+"Container"],e.anchorOffset=t[n+"Offset"],e.focusNode=t[r+"Container"],e.focusOffset=t[r+"Offset"]}function u(e){e.anchorNode=e.focusNode=null,e.anchorOffset=e.focusOffset=0,e.rangeCount=0,e.isCollapsed=!0,e._ranges.length=0}function l(e){if(!e.length||1!==e[0].nodeType)return!1;for(var t=1,n=e.length;n>t;++t)if(!h(e[0],e[t]))return!1;return!0}function c(e){var t=e.getNodes();if(!l(t))throw new Error("getSingleElementFromRange(): range did not consist of a single element");return t[0]}function f(e){return e&&void 0!==e.text}function s(e,t){e._ranges=[t],a(e,t,!1),e.rangeCount=1,e.isCollapsed=t.collapsed}function d(e){if(e._ranges.length=0,"None"===e._selection.type)u(e);else{var t=e._selection.createRange();if(f(t))s(e,t);else{e.rangeCount=t.length;for(var n,r=0;ri;++i)o.add(n.item(i));try{o.add(r)}catch(u){throw new Error("addRange(): Element could not be added to control selection")}o.select(),d(e)}function v(e,t){return e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset}function h(e,t){for(var n=t;n.parentNode;){if(n.parentNode===e)return!0;n=n.parentNode}return!1}function g(){return new r(n.document.selection)}var m=e("./rangeToTextRange"),y=n.document,b=y.body,w=r.prototype;w.removeAllRanges=function(){var e;try{this._selection.empty(),"None"!==this._selection.type&&(e=b.createTextRange(),e.select(),this._selection.empty())}catch(t){}u(this)},w.addRange=function(e){"Control"===this._selection.type?p(this,e):(m(e).select(),this._ranges[0]=e,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,a(this,e,!1))},w.setRanges=function(e){this.removeAllRanges();var t=e.length;t>1?o(this,e):t&&this.addRange(e[0])},w.getRangeAt=function(e){if(0>e||e>=this.rangeCount)throw new Error("getRangeAt(): index out of bounds");return this._ranges[e].cloneRange()},w.removeRange=function(e){if("Control"!==this._selection.type)return void i(this,e);for(var t,n=this._selection.createRange(),r=c(e),o=b.createControlRange(),a=!1,u=0,l=n.length;l>u;++u)t=n.item(u),t!==r||a?o.add(n.item(u)):a=!0;o.select(),d(this)},w.eachRange=function(e,t){var n=0,r=this._ranges.length;for(n=0;r>n;++n)if(e(this.getRangeAt(n)))return t},w.getAllRanges=function(){var e=[];return this.eachRange(function(t){e.push(t)}),e},w.setSingleRange=function(e){this.removeAllRanges(),this.addRange(e)},t.exports=g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./rangeToTextRange":7}],6:[function(e,t,n){"use strict";function r(e,t){var n=typeof e[t];return"function"===n||!("object"!==n||!e[t])||"unknown"===n}function o(e,t){return"undefined"!=typeof e[t]}function i(e){return function(t,n){for(var r=n.length;r--;)if(!e(t,n[r]))return!1;return!0}}t.exports={method:r,methods:i(r),property:o,properties:i(o)}},{}],7:[function(e,t,n){(function(e){"use strict";function n(e){if(e.collapsed)return o({node:e.startContainer,offset:e.startOffset},!0);var t=o({node:e.startContainer,offset:e.startOffset},!0),n=o({node:e.endContainer,offset:e.endOffset},!1),r=a.createTextRange();return r.setEndPoint("StartToStart",t),r.setEndPoint("EndToEnd",n),r}function r(e){var t=e.nodeType;return 3===t||4===t||8===t}function o(e,t){var n,o,u,l,c=e.offset,f=a.createTextRange(),s=r(e.node);return s?(n=e.node,o=n.parentNode):(l=e.node.childNodes,n=c0)return{x:r[0].left,y:r[0].top,absolute:!0}}}return{x:0,y:0}}function h(t,n){var r=s.createElement("span"),o=t.mirror,i=t.computed;return y(o,g(e).substring(0,n)),"INPUT"===e.tagName&&(o.textContent=o.textContent.replace(/\s/g," ")),y(r,g(e).substring(n)||"."),o.appendChild(r),{x:r.offsetLeft+parseInt(i.borderLeftWidth),y:r.offsetTop+parseInt(i.borderTopWidth)}}function g(e){return x?e.value:e.innerHTML}function m(){function t(e){o[e]=n[e]}var n=f.getComputedStyle?getComputedStyle(e):e.currentStyle,r=s.createElement("div"),o=r.style;return s.body.appendChild(r),"INPUT"!==e.tagName&&(o.wordWrap="break-word"),o.whiteSpace="pre-wrap",o.position="absolute",o.visibility="hidden",c.forEach(t),d?(o.width=parseInt(n.width)-2+"px",e.scrollHeight>parseInt(n.height)&&(o.overflowY="scroll")):o.overflow="hidden",{mirror:r,computed:n}}function y(e,t){x?e.textContent=t:e.innerHTML=t}function b(t){var n=t?"remove":"add";i[n](e,"keydown",C),i[n](e,"keyup",C),i[n](e,"input",C),i[n](e,"paste",C),i[n](e,"change",C)}function w(){b(!0)}var x="INPUT"===e.tagName||"TEXTAREA"===e.tagName,C=u(a,30),E=t||{};return b(),{read:r,refresh:C,destroy:w}}var o=e("sell"),i=e("crossvent"),a=e("seleccion"),u=e("./throttle"),l=a.get,c=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing"],f=n,s=document,d=null!==f.mozInnerScreenX&&void 0!==f.mozInnerScreenX;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./throttle":11,crossvent:17,seleccion:8,sell:27}],11:[function(e,t,n){"use strict";function r(e,t){var n,r=-(1/0);return function(){function o(){clearTimeout(n),n=null;var i=r+t,a=Date.now();a>i?(r=a,e()):n=setTimeout(o,i-a)}n||o()}}t.exports=r},{}],12:[function(e,t,n){"use strict";var r=e("ticky");t.exports=function(e,t,n){e&&r(function(){e.apply(n||null,t||[])})}},{ticky:15}],13:[function(e,t,n){"use strict";var r=e("atoa"),o=e("./debounce");t.exports=function(e,t){var n=t||{},i={};return void 0===e&&(e={}),e.on=function(t,n){return i[t]?i[t].push(n):i[t]=[n],e},e.once=function(t,n){return n._once=!0,e.on(t,n),e},e.off=function(t,n){var r=arguments.length;if(1===r)delete i[t];else if(0===r)i={};else{var o=i[t];if(!o)return e;o.splice(o.indexOf(n),1)}return e},e.emit=function(){var t=r(arguments);return e.emitterSnapshot(t.shift()).apply(this,t)},e.emitterSnapshot=function(t){var a=(i[t]||[]).slice(0);return function(){var i=r(arguments),u=this||e;if("error"===t&&n["throws"]!==!1&&!a.length)throw 1===i.length?i[0]:i;return a.forEach(function(r){n.async?o(r,i,u):r.apply(u,i),r._once&&e.off(t,r)}),e}},e}},{"./debounce":12,atoa:14}],14:[function(e,t,n){t.exports=function(e,t){return Array.prototype.slice.call(e,t)}},{}],15:[function(e,t,n){var r,o="function"==typeof setImmediate;r=o?function(e){setImmediate(e)}:function(e){setTimeout(e,0)},t.exports=r},{}],16:[function(e,t,n){(function(e){function n(){try{var e=new r("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(t){}return!1}var r=e.CustomEvent;t.exports=n()?r:"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){return e.addEventListener(t,n,r)}function o(e,t,n){return e.attachEvent("on"+t,c(e,t,n))}function i(e,t,n,r){return e.removeEventListener(t,n,r)}function a(e,t,n){var r=f(e,t,n);return r?e.detachEvent("on"+t,r):void 0}function u(e,t,n){function r(){var e;return v.createEvent?(e=v.createEvent("Event"),e.initEvent(t,!0,!0)):v.createEventObject&&(e=v.createEventObject()),e}function o(){return new d(t,{detail:n})}var i=-1===p.indexOf(t)?o():r();e.dispatchEvent?e.dispatchEvent(i):e.fireEvent("on"+t,i)}function l(e,t,r){return function(t){var o=t||n.event;o.target=o.target||o.srcElement,o.preventDefault=o.preventDefault||function(){o.returnValue=!1},o.stopPropagation=o.stopPropagation||function(){o.cancelBubble=!0},o.which=o.which||o.keyCode,r.call(e,o)}}function c(e,t,n){var r=f(e,t,n)||l(e,t,n);return m.push({wrapper:r,element:e,type:t,fn:n}),r}function f(e,t,n){var r=s(e,t,n);if(r){var o=m[r].wrapper;return m.splice(r,1),o}}function s(e,t,n){var r,o;for(r=0;rn)return!1;if(r===n)return e===t;e:for(var o=0,i=0;r>o;o++){for(var a=e.charCodeAt(o);n>i;)if(t.charCodeAt(i++)===a)continue e;return!1}return!0}t.exports=r},{}],20:[function(e,t,n){"use strict";function r(e,t){for(;e.lengthn;n++)r=t.charCodeAt(n),e=(e<<5)-e+r,e|=0;return 0>e?-2*e:e}function i(e,t,n){function r(e,r){return a(e,t[r],r,n)}return Object.keys(t).sort().reduce(r,e)}function a(e,t,n,r){var a=o(o(o(e,n),u(t)),typeof t);return null===t?o(a,"null"):void 0===t?o(a,"undefined"):"object"==typeof t?-1!==r.indexOf(t)?o(a,"[Circular]"+n):(r.push(t),i(a,t,r)):o(a,t.toString())}function u(e){return Object.prototype.toString.call(e)}function l(e){return r(a(0,e,"",[]).toString(16),8)}t.exports=l},{}],21:[function(e,t,n){function r(e,t,n){function r(){b&&clearTimeout(b),h&&clearTimeout(h),x=0,v=h=y=b=w=void 0}function c(t,n){n&&clearTimeout(n),h=b=w=void 0,t&&(x=i(),g=e.apply(y,v),b||h||(v=y=void 0))}function f(){var e=t-(i()-m);0>=e||e>t?c(w,h):b=setTimeout(f,e)}function s(){return(b&&w||h&&T)&&(g=e.apply(y,v)),r(),g}function d(){c(T,b)}function p(){if(v=arguments,m=i(),y=this,w=T&&(b||!C),E===!1)var n=C&&!b;else{h||C||(x=m);var r=E-(m-x),o=0>=r||r>E;o?(h&&(h=clearTimeout(h)),x=m,g=e.apply(y,v)):h||(h=setTimeout(d,r))}return o&&b?b=clearTimeout(b):b||t===E||(b=setTimeout(f,t)),n&&(o=!0,g=e.apply(y,v)),!o||b||h||(v=y=void 0),g}var v,h,g,m,y,b,w,x=0,C=!1,E=!1,T=!0;if("function"!=typeof e)throw new TypeError(u);return t=a(t)||0,o(n)&&(C=!!n.leading,E="maxWait"in n&&l(a(n.maxWait)||0,t),T="trailing"in n?!!n.trailing:T),p.cancel=r,p.flush=s,p}var o=e("./isObject"),i=e("./now"),a=e("./toNumber"),u="Expected a function",l=Math.max;t.exports=r},{"./isObject":23,"./now":24,"./toNumber":25}],22:[function(e,t,n){(function(n){function r(e){var t=o(e)?l.call(e):"";return t==i||t==a}var o=e("./isObject"),i="[object Function]",a="[object GeneratorFunction]",u=n.Object.prototype,l=u.toString;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./isObject":23}],23:[function(e,t,n){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=r},{}],24:[function(e,t,n){var r=Date.now;t.exports=r},{}],25:[function(e,t,n){function r(e){if(i(e)){var t=o(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(u,"");var n=c.test(e);return n||f.test(e)?s(e.slice(2),n?2:8):l.test(e)?a:+e}var o=e("./isFunction"),i=e("./isObject"),a=NaN,u=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,f=/^0o[0-7]+$/i,s=parseInt;t.exports=r},{"./isFunction":22,"./isObject":23}],26:[function(e,t,n){(function(e){"use strict";function n(e,t){var n,r,o,i,a,f=t!==c;f&&(n=t.getAttribute("id"),r=n||u,o="#"+r+" ",i=o+e.replace(/,/g,","+o),a=l.test(e)&&t.parentNode,n||t.setAttribute("id",r));try{return(a||t).querySelectorAll(i||e)}catch(s){return[]}finally{null===n&&t.removeAttribute("id")}}function r(e,t,r,o){var a,u=t||c,l=r||[],f=0;if("string"!=typeof e)return l;if(1!==u.nodeType&&9!==u.nodeType)return[];if(o)for(;a=o[f++];)i(a,e)&&l.push(a);else l.push.apply(l,n(e,u));return l}function o(e,t){return r(e,null,null,t)}function i(e,t){return s.call(e,t)}function a(){return!1}var u="sektor-"+Date.now(),l=/[+~]/,c=e.document,f=c.documentElement||{},s=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector||a;t.exports=r,r.matches=o,r.matchesSelector=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,t,n){"use strict";function r(e){return{start:e.selectionStart,end:e.selectionEnd}}function o(e){function t(t,r){return n!==e&&(n?n.focus():e.blur()),{start:t,end:r}}var n=document.activeElement;n!==e&&e.focus();var r=document.selection.createRange(),o=r.getBookmark(),u=e.value,l=i(u),c=r.parentElement();if(null===c||!a(c))return t(0,0);r.text=l+r.text+l;var f=e.value;return e.value=u,r.moveToBookmark(o),r.select(),t(f.indexOf(l),f.lastIndexOf(l)-l.length)}function i(e){var t;do t="@@marker."+Math.random()*new Date;while(-1!==e.indexOf(t));return t}function a(e){return"INPUT"===e.tagName&&"text"===e.type||"TEXTAREA"===e.tagName}function u(e,t){e.selectionStart=c(e,t.start),e.selectionEnd=c(e,t.end)}function l(e,t){var n=e.createTextRange();"end"===t.start&&"end"===t.end?(n.collapse(!1),n.select()):(n.collapse(!0),n.moveEnd("character",c(e,t.end)),n.moveStart("character",c(e,t.start)),n.select())}function c(e,t){return"end"===t?e.value.length:t||0}function f(e,t){return 2===arguments.length&&d(e,t),s(e)}var s=r,d=u;document.selection&&document.selection.createRange&&(s=o,d=l),t.exports=f},{}],28:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);to)return void W();var i=n(He)||Le.firstChild,a=e?"lastChild":"firstChild",u=e?"previousSibling":"nextSibling",l=r();U(l),D(l)&&q(e,t?t+1:1)}}function F(){Pe.sleep(),Me.className=Me.className.replace(/ tac-show/g,""),W(),y["default"].fabricate(ze,"autocomplete-hide"),e.value===Ve&&(e.value="")}function X(e){var t=B(),n=e.which||e.keyCode;n===O?(qe&&pe.autoShowOnUpDown&&H(),t&&(q(),V(e))):n===N?(qe&&pe.autoShowOnUpDown&&H(),t&&(q(!0),V(e))):n===E?qe&&pe.autoShowOnUpDown&&H():t&&(n===T?(He?y["default"].fabricate(He,"click"):F(),V(e)):n===S&&(F(),V(e)))}function V(e){e.stopPropagation(),e.preventDefault()}function $(){Ue.classList.remove("tac-hide")}function K(){Ue.classList.add("tac-hide")}function Y(){function e(){for(var e=Le.firstChild,n=0;e;){var r=de(e),o=t(r);0===o?e.classList.add("tac-hide"):e.classList.remove("tac-hide"),n+=o,e=e.nextSibling}return n}function t(e){for(var t=e.firstChild,r=0;t;)r>=Ae?y["default"].fabricate(t,"autocomplete-hide"):(y["default"].fabricate(t,"autocomplete-filter"),-1===t.className.indexOf("tac-hide")&&(r++,Oe&&_(t,n))),t=t.nextSibling;return r}if(B()){Ke(!0),y["default"].fabricate(ze,"autocomplete-filter");var n=h();if(!pe.blankSearch&&!n)return void F();var r=Te({query:n}),o=e();0===o&&r&&Ye?$():K(),He||q(),He||r||F()}}function G(e){var t=e.which||e.keyCode;t!==T&&je()}function J(e){var t=e.which||e.keyCode;t!==T&&t!==R&&setTimeout(H,0)}function Q(e){var t=e.target;if(t===ze)return!0;for(;t;){if(t===Me||t===ze)return!0;t=t.parentNode}}function Z(e){var t=e.which||e.keyCode;t===R&&F()}function ee(e){Q(e)||F()}function te(e){var t=e?"remove":"add";Pe&&(Pe.destroy(),Pe=null),e||(Pe=(0,g["default"])(Me,ze,{caret:qe&&"INPUT"!==ze.tagName}),B()||Pe.sleep()),e||qe&&k.activeElement!==ze?y["default"][t](ze,"focus",i):i(),qe?(y["default"][t](ze,"keypress",J),y["default"][t](ze,"keypress",je),y["default"][t](ze,"keydown",G),y["default"][t](ze,"paste",je),y["default"][t](ze,"keydown",X),pe.autoHideOnBlur&&y["default"][t](ze,"keydown",Z)):(y["default"][t](ze,"click",P),y["default"][t](A,"keydown",X)),pe.autoHideOnClick&&y["default"][t](k,"click",ee),Ce&&y["default"][t](Ce,"submit",F)}function ne(){te(!0),ve.contains(Me)&&ve.removeChild(Me)}function re(t){We?e.value=t:e.innerHTML=t}function oe(e,t){c(e,we(t))}function ie(e,t){if("default"!==t.id){var n=u("div","tac-category-id");e.appendChild(n),c(n,t.id)}}function ae(e,t){var n=e.toLowerCase(),r=we(t)||"";if((0,w["default"])(n,r.toLowerCase()))return!0;var o=xe(t)||"";return"string"!=typeof o?!1:(0,w["default"])(n,o.toLowerCase())}function ue(e,t){for(var n="",r=!1,o=t.start;r===!1&&o>=0;)n=e.substr(o-1,t.start-o+1),r=Fe.test(n),o--;return{text:r?n:null,start:o}}function le(t,n){var r=(0,d["default"])(e),o=ue(t,r).text;return o?{input:o,suggestion:n}:void 0}function ce(t){var n=e.value,r=(0,d["default"])(e),o=ue(n,r),i=n.substr(0,o.start),a=n.substr(o.start+o.text.length+(r.end-r.start)),u=i+t+" ";e.value=u+a,(0,d["default"])(e,{start:u.length,end:u.length})}function fe(){throw new Error("Anchoring in editable elements is disabled by default.")}function se(){throw new Error("Anchoring in editable elements is disabled by default.")}function de(e){return(0,v["default"])(".tac-list",e)[0]}var pe=t||{},ve=pe.appendTo||k.body,he={o:pe},ge=he.renderItem,me=void 0===ge?oe:ge,ye=he.renderCategory,be=void 0===ye?ie:ye,we=pe.getText,xe=pe.getValue,Ce=pe.form,Ee=pe.suggestions,Te=pe.noMatches,Se=pe.noMatchesText,Ne=pe.highlighter,Oe=void 0===Ne?!0:Ne,Re=pe.highlightCompleteWords,ke=void 0===Re?!0:Re,Ae="number"==typeof pe.limit?pe.limit:1/0,_e=pe.filter||ae,Ie=pe.set||re,Le=u("div","tac-categories"),Me=u("div","tac-container"),je=l(Y),Be={counter:0,query:null},De=Object.create(null),He=null,Pe=void 0,ze=e,Ue=void 0,We=void 0,qe=void 0,Fe=void 0,Xe=void 0,Ve="",$e=pe.debounce||300,Ke=(0,C["default"])(i,$e);void 0===pe.autoHideOnBlur&&(pe.autoHideOnBlur=!0),void 0===pe.autoHideOnClick&&(pe.autoHideOnClick=!0),void 0===pe.autoShowOnUpDown&&(pe.autoShowOnUpDown="INPUT"===e.tagName),pe.anchor&&(Fe=new RegExp("^"+pe.anchor),Xe=new RegExp(pe.anchor+"$"));var Ye=!1,Ge={anchor:pe.anchor,clear:p,show:H,hide:F,toggle:z,destroy:ne,refreshPosition:r,appendText:ce,appendHTML:se,filterAnchoredText:le,filterAnchoredHTML:fe,defaultAppendText:ce,defaultFilter:ae,defaultItemRenderer:oe,defaultCategoryRenderer:ie,defaultSetter:re,retarget:n,attachment:ze,suggestions:[]};return n(e),Me.appendChild(Le),Te&&Se&&(Ue=u("div","tac-empty tac-hide"),c(Ue,Se),Me.appendChild(Ue)),ve.appendChild(Me),e.setAttribute("autocomplete","off"),Array.isArray(Ee)&&s(Ee,!1),Ge}function a(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function u(e,t){var n=k.createElement(e);return n.className=t,n}function l(e){return function(){setTimeout(e,0)}}function c(e,t){e.innerText=e.textContent=t}function f(e){var t=e.getAttribute("contentEditable");return"false"===t?!1:"true"===t?!0:e.parentElement?f(e.parentElement):!1}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=i;var s=e("sell"),d=r(s),p=e("sektor"),v=r(p),h=e("bullseye"),g=r(h),m=e("crossvent"),y=r(m),b=e("fuzzysearch"),w=r(b),x=e("lodash/debounce"),C=r(x),E=8,T=13,S=27,N=38,O=40,R=9,k=document,A=k.documentElement},{bullseye:1,crossvent:17,fuzzysearch:19,"lodash/debounce":21,sektor:26,sell:27}],29:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){function t(){for(var e=i(),t=void 0,n=0;nnew Date;if(g)return void n(null,l.items.slice())}}i.suggestions({previousSuggestions:be.slice(),previousSelection:we,values:j(),input:r,renderItem:s,renderCategory:d,limit:o}).then(function(e){var t=Array.isArray(e)?e:[];p&&(c[u]={created:new Date,items:t}),be=t,n(null,t.slice())})["catch"](function(t){console.log("Autocomplete suggestions promise rejected",t,e),n(t,[])})}var i=oe.autocomplete,u=i.suggestions,l=i.cache,c=void 0===l?{}:l,f=i.predictNextSearch,s=i.renderItem,d=i.renderCategory,p=i.cache!==!1;if(u){var v=Number(i.limit)||1/0,h=(0,w["default"])(e,{suggestions:o,limit:v,getText:ve,getValue:he,predictNextSearch:f,noMatches:t,noMatchesText:i.noMatches,blankSearch:i.blankSearch,debounce:i.debounce,set:function(t){e.value="",we=t,r(t)},filter:function(e,t){return i.duplicates!==!0&&n(t)?!1:i.filter?i.filter(e,t):h.defaultFilter(e,t)}});return h}}function D(t){var n=ye.querySelector(".tay-tag");n||Se?n&&Se&&(e.removeAttribute("placeholder"),Se=!1):(e.setAttribute("placeholder",Te),Se=!0)}function H(t){var n=t?"remove":"add",r=t?"off":"on";l["default"][n](e,"keydown",X),l["default"][n](e,"keypress",V),l["default"][n](e,"paste",$),l["default"][n](ye,"click",U),fe&&l["default"][n](document.documentElement,"blur",z,!0),Te&&(Ee[r]("add",D),Ee[r]("remove",D),l["default"][n](e,"keydown",D),l["default"][n](e,"keypress",D),l["default"][n](e,"paste",D),l["default"][n](ye,"click",D),D())}function P(){return H(!0),Ce&&Ce.destroy(),e.value="",e.className=e.className.replace(I,""),ye.className=ye.className.replace(_,""),ge.parentElement&&ge.parentElement.removeChild(ge),me.parentElement&&me.parentElement.removeChild(me),xe.destroy(),Ee.destroyed=!0,Ee.destroy=Ee.addItem=Ee.removeItem=function(){return Ee},Ee.tags=Ee.value=function(){return null},Ee}function z(t){t.target===e&&q(!0)}function U(t){var n=t.target;if(A.test(n.className))return Z(n.parentElement,{start:"end",end:"end",remove:!0}),void W();for(var r=n,o=k.test(r.className);o===!1&&r.parentElement;)r=r.parentElement,o=k.test(r.className);o&&ue?Z(r,L):n!==e&&(W(),e.focus())}function W(){Z(me.lastChild,L),Y([ie],!0)}function q(e){return(e?K:Y)([ie],e),e&&te(me,F),Ee}function F(e,t){ge.appendChild(t)}function X(t){var n=(0,g["default"])(e),r=t.which||t.keyCode||t.charCode,o=0===n.start&&0===n.end&&ge.lastChild,i=n.start===e.value.length&&n.end===e.value.length&&me.firstChild;if(ue)if(r===S)ge.firstChild?Z(ge.firstChild,{}):(0,g["default"])(e,{start:0,end:0});else if(r===T)me.lastChild?Z(me.lastChild,L):(0,g["default"])(e,L);else if(r===E&&o)Z(ge.lastChild,L);else if(r===O&&i)Z(me.firstChild,{});else{if(r!==N||!o)return;Z(ge.lastChild,L)}else{if(r===E&&o)s(ge.lastChild);else if(r===O&&i)ge.appendChild(me.firstChild);else if(r===N&&o)me.insertBefore(ge.lastChild,me.firstChild);else if(-1===R.indexOf(r))return;Ce&&Ce.refreshPosition()}return t.preventDefault(),!1}function V(e){var t=e.which||e.keyCode||e.charCode;return String.fromCharCode(t)===ie?(q(),e.preventDefault(),!1):void 0}function $(){setTimeout(function(){return Y()},0)}function K(e,t){G(e,t)}function Y(t,n){G(t,n,(0,g["default"])(e))}function G(t,n,o){function i(){o&&(o.start-=c,o.end-=c,(0,g["default"])(e,o))}var a=n||!o?1/0:o.start,u=e.value.slice(0,a).concat(t||[]).split(ie);if(!(u.length<1)&&ue){var l=u.pop()+e.value.slice(a),c=u.join(ie).length;u.forEach(function(e){return r(se(e))}),e.value=l,i(),xe.refresh()}}function J(e,t){(0,v["default"])(e,ve(t.data))}function Q(e){return(0,v["default"])(e)}function Z(t,n){if(t){Y([ie],!0);var r=t.parentElement;if(r===ge)for(;r.lastChild!==t;)me.insertBefore(r.lastChild,me.firstChild);else for(;r.firstChild!==t;)ge.appendChild(r.firstChild);var o=n.remove?"":Q(t);s(t),e.value=o,e.focus(),(0,g["default"])(e,n),xe.refresh()}}function ee(){var t=e.parentElement.children;return[].concat(o(t)).some(function(t){return t!==e&&t.nodeType===C})}function te(e,t){[].concat(o(e.children)).forEach(function(e,n){return t(Q(e),e,n)})}function ne(e){return null===n(e)}var re=[],oe=t||{},ie=oe.delimiter||M;if(1!==ie.length)throw new Error("taggy expected a single-character delimiter string");var ae=ee(e);if(ae||!x.test(e.tagName))throw new Error("taggy expected an input element without any siblings");var ue=oe.free!==!1,le=oe.validate||ne,ce=oe.render||J,fe=oe.convertOnBlur!==!1,se=b,de=oe.parseText,pe=oe.parseValue,ve="string"==typeof de?function(e){return e[de]}:"function"==typeof de?de:function(e){return e.toString()},he="string"==typeof pe?function(e){return e[pe]}:"function"==typeof pe?pe:function(e){return e},ge=(0,d["default"])("span","tay-tags tay-tags-before"),me=(0,d["default"])("span","tay-tags tay-tags-after"),ye=e.parentElement,be=[],we=null;e.className+=" tay-input",ye.className+=" tay-editor",ye.insertBefore(ge,e),ye.insertBefore(me,e.nextSibling);var xe=(0,y["default"])(e),Ce=oe.autocomplete?B():null,Ee=(0,f["default"])({addItem:r,findItem:function(e){return n(e)},findItemByElement:function(e){return n(e,"el")},removeItem:c,removeItemByElement:s,value:j,destroy:P}),Te=e.getAttribute("placeholder"),Se=!0;return H(),(document.activeElement===e?Y:K)([ie],!0),Ee}},{"./autocomplete":28,"./autosize":29,"./dom":30,"./selection":31,"./text":33,"contra/emitter":13,crossvent:17,"hash-sum":20}],33:[function(e,t,n){"use strict";function r(e,t){return 2===arguments.length&&(e.innerText=e.textContent=t),"string"==typeof e.innerText?e.innerText:e.textContent}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=r},{}]},{},[32])(32)}); \ No newline at end of file