@yaireo/tagify
Advanced tools
Comparing version 4.22.2 to 4.23.0
/* | ||
Tagify v4.22.2 - tags input component | ||
Tagify v4.23.0 - tags input component | ||
By: Yair Even-Or <vsync.design@gmail.com> | ||
@@ -28,669 +28,3 @@ https://github.com/yairEO/tagify | ||
(function (factory) { | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
factory(); | ||
})((function () { 'use strict'; | ||
// 1. String.prototype.trim polyfill | ||
if (!"".trim) String.prototype.trim = function () { | ||
return this.replace(/^[\s]+|[\s]+$/g, ''); | ||
}; | ||
if (window.NodeList && !NodeList.prototype.forEach) { | ||
NodeList.prototype.forEach = Array.prototype.forEach; | ||
} | ||
if (!Array.prototype.findIndex) { | ||
Object.defineProperty(Array.prototype, 'findIndex', { | ||
value: function (predicate) { | ||
if (this == null) throw new TypeError('"this" is null or not defined'); | ||
var o = Object(this), | ||
len = o.length >>> 0; | ||
if (typeof predicate !== 'function') { | ||
throw new TypeError('predicate must be a function'); | ||
} | ||
var thisArg = arguments[1], | ||
k = 0; | ||
while (k < len) { | ||
var kValue = o[k]; | ||
if (predicate.call(thisArg, kValue, k, o)) { | ||
return k; | ||
} | ||
k++; | ||
} | ||
return -1; | ||
}, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} | ||
if (!Array.prototype.includes) { | ||
Array.prototype.includes = function (search) { | ||
return !!~this.indexOf(search); | ||
}; | ||
} | ||
// Production steps of ECMA-262, Edition 5, 15.4.4.17 | ||
// Reference: http://es5.github.io/#x15.4.4.17 | ||
if (!Array.prototype.some) { | ||
Array.prototype.some = function (fun, thisArg) { | ||
if (this == null) { | ||
throw new TypeError('Array.prototype.some called on null or undefined'); | ||
} | ||
if (typeof fun !== 'function') { | ||
throw new TypeError(); | ||
} | ||
var t = Object(this); | ||
var len = t.length >>> 0; | ||
for (var i = 0; i < len; i++) { | ||
if (i in t && fun.call(thisArg, t[i], i, t)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
}; | ||
} | ||
if (!String.prototype.includes) { | ||
String.prototype.includes = function (search, start) { | ||
if (typeof start !== 'number') start = 0; | ||
if (start + search.length > this.length) return false;else return this.indexOf(search, start) !== -1; | ||
}; | ||
} | ||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill | ||
// | ||
if (typeof Object.assign != 'function') { | ||
// Must be writable: true, enumerable: false, configurable: true | ||
Object.defineProperty(Object, "assign", { | ||
value: function assign(target, varArgs) { | ||
// .length of function is 2 | ||
if (target == null) { | ||
// TypeError if undefined or null | ||
throw new TypeError('Cannot convert undefined or null to object'); | ||
} | ||
var to = Object(target); | ||
for (var index = 1; index < arguments.length; index++) { | ||
var nextSource = arguments[index]; | ||
if (nextSource != null) { | ||
// Skip over if undefined or null | ||
for (var nextKey in nextSource) { | ||
// Avoid bugs when hasOwnProperty is shadowed | ||
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { | ||
to[nextKey] = nextSource[nextKey]; | ||
} | ||
} | ||
} | ||
} | ||
return to; | ||
}, | ||
writable: true, | ||
configurable: true | ||
}); | ||
} | ||
// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill | ||
function CustomEventPolyfill(event, params) { | ||
params = params || { | ||
bubbles: false, | ||
cancelable: false, | ||
detail: undefined | ||
}; | ||
var evt = document.createEvent('CustomEvent'); | ||
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); | ||
return evt; | ||
} | ||
CustomEventPolyfill.prototype = window.Event.prototype; | ||
if (typeof window.CustomEvent !== "function") { | ||
window.CustomEvent = CustomEventPolyfill; | ||
} | ||
// https://developer.mozilla.org/en-US/docs/Web/API/Element/closest | ||
if (!Element.prototype.matches) Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; | ||
if (!Element.prototype.closest) { | ||
Element.prototype.closest = function (s) { | ||
var el = this; | ||
if (!document.documentElement.contains(el)) return null; | ||
do { | ||
if (el.matches(s)) return el; | ||
el = el.parentElement || el.parentNode; | ||
} while (el !== null && el.nodeType === 1); | ||
return null; | ||
}; | ||
} | ||
// Avoid transformation text to link ie contentEditable mode | ||
// https://stackoverflow.com/q/7556007/104380 | ||
document.execCommand("AutoUrlDetect", false, false); | ||
/* | ||
* classList.js: Cross-browser full element.classList implementation. | ||
* 1.2.20171210 | ||
* | ||
* By Eli Grey, http://eligrey.com | ||
* License: Dedicated to the public domain. | ||
* See https://github.com/eligrey/classList.js/blob/master/LICENSE.md | ||
*/ | ||
/*global self, document, DOMException */ | ||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */ | ||
if ("document" in self) { | ||
// Full polyfill for browsers with no classList support | ||
// Including IE < Edge missing SVGElement.classList | ||
if (!("classList" in document.createElement("_")) || document.createElementNS && !("classList" in document.createElementNS("http://www.w3.org/2000/svg", "g"))) { | ||
(function (view) { | ||
if (!('Element' in view)) return; | ||
var classListProp = "classList", | ||
protoProp = "prototype", | ||
elemCtrProto = view.Element[protoProp], | ||
objCtr = Object, | ||
strTrim = String[protoProp].trim || function () { | ||
return this.replace(/^\s+|\s+$/g, ""); | ||
}, | ||
arrIndexOf = Array[protoProp].indexOf || function (item) { | ||
var i = 0, | ||
len = this.length; | ||
for (; i < len; i++) { | ||
if (i in this && this[i] === item) { | ||
return i; | ||
} | ||
} | ||
return -1; | ||
} | ||
// Vendors: please allow content code to instantiate DOMExceptions | ||
, | ||
DOMEx = function (type, message) { | ||
this.name = type; | ||
this.code = DOMException[type]; | ||
this.message = message; | ||
}, | ||
checkTokenAndGetIndex = function (classList, token) { | ||
if (token === "") { | ||
throw new DOMEx("SYNTAX_ERR", "The token must not be empty."); | ||
} | ||
if (/\s/.test(token)) { | ||
throw new DOMEx("INVALID_CHARACTER_ERR", "The token must not contain space characters."); | ||
} | ||
return arrIndexOf.call(classList, token); | ||
}, | ||
ClassList = function (elem) { | ||
var trimmedClasses = strTrim.call(elem.getAttribute("class") || ""), | ||
classes = trimmedClasses ? trimmedClasses.split(/\s+/) : [], | ||
i = 0, | ||
len = classes.length; | ||
for (; i < len; i++) { | ||
this.push(classes[i]); | ||
} | ||
this._updateClassName = function () { | ||
elem.setAttribute("class", this.toString()); | ||
}; | ||
}, | ||
classListProto = ClassList[protoProp] = [], | ||
classListGetter = function () { | ||
return new ClassList(this); | ||
}; | ||
// Most DOMException implementations don't allow calling DOMException's toString() | ||
// on non-DOMExceptions. Error's toString() is sufficient here. | ||
DOMEx[protoProp] = Error[protoProp]; | ||
classListProto.item = function (i) { | ||
return this[i] || null; | ||
}; | ||
classListProto.contains = function (token) { | ||
return ~checkTokenAndGetIndex(this, token + ""); | ||
}; | ||
classListProto.add = function () { | ||
var tokens = arguments, | ||
i = 0, | ||
l = tokens.length, | ||
token, | ||
updated = false; | ||
do { | ||
token = tokens[i] + ""; | ||
if (!~checkTokenAndGetIndex(this, token)) { | ||
this.push(token); | ||
updated = true; | ||
} | ||
} while (++i < l); | ||
if (updated) { | ||
this._updateClassName(); | ||
} | ||
}; | ||
classListProto.remove = function () { | ||
var tokens = arguments, | ||
i = 0, | ||
l = tokens.length, | ||
token, | ||
updated = false, | ||
index; | ||
do { | ||
token = tokens[i] + ""; | ||
index = checkTokenAndGetIndex(this, token); | ||
while (~index) { | ||
this.splice(index, 1); | ||
updated = true; | ||
index = checkTokenAndGetIndex(this, token); | ||
} | ||
} while (++i < l); | ||
if (updated) { | ||
this._updateClassName(); | ||
} | ||
}; | ||
classListProto.toggle = function (token, force) { | ||
var result = this.contains(token), | ||
method = result ? force !== true && "remove" : force !== false && "add"; | ||
if (method) { | ||
this[method](token); | ||
} | ||
if (force === true || force === false) { | ||
return force; | ||
} else { | ||
return !result; | ||
} | ||
}; | ||
classListProto.replace = function (token, replacement_token) { | ||
var index = checkTokenAndGetIndex(token + ""); | ||
if (~index) { | ||
this.splice(index, 1, replacement_token); | ||
this._updateClassName(); | ||
} | ||
}; | ||
classListProto.toString = function () { | ||
return this.join(" "); | ||
}; | ||
if (objCtr.defineProperty) { | ||
var classListPropDesc = { | ||
get: classListGetter, | ||
enumerable: true, | ||
configurable: true | ||
}; | ||
try { | ||
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc); | ||
} catch (ex) { | ||
// IE 8 doesn't support enumerable:true | ||
// adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36 | ||
// modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected | ||
if (ex.number === undefined || ex.number === -0x7FF5EC54) { | ||
classListPropDesc.enumerable = false; | ||
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc); | ||
} | ||
} | ||
} else if (objCtr[protoProp].__defineGetter__) { | ||
elemCtrProto.__defineGetter__(classListProp, classListGetter); | ||
} | ||
})(self); | ||
} | ||
// There is full or partial native classList support, so just check if we need | ||
// to normalize the add/remove and toggle APIs. | ||
(function () { | ||
var testElement = document.createElement("_"); | ||
testElement.classList.add("c1", "c2"); | ||
// Polyfill for IE 10/11 and Firefox <26, where classList.add and | ||
// classList.remove exist but support only one argument at a time. | ||
if (!testElement.classList.contains("c2")) { | ||
var createMethod = function (method) { | ||
var original = DOMTokenList.prototype[method]; | ||
DOMTokenList.prototype[method] = function (token) { | ||
var i, | ||
len = arguments.length; | ||
for (i = 0; i < len; i++) { | ||
token = arguments[i]; | ||
original.call(this, token); | ||
} | ||
}; | ||
}; | ||
createMethod('add'); | ||
createMethod('remove'); | ||
} | ||
testElement.classList.toggle("c3", false); | ||
// Polyfill for IE 10 and Firefox <24, where classList.toggle does not | ||
// support the second argument. | ||
if (testElement.classList.contains("c3")) { | ||
var _toggle = DOMTokenList.prototype.toggle; | ||
DOMTokenList.prototype.toggle = function (token, force) { | ||
if (1 in arguments && !this.contains(token) === !force) { | ||
return force; | ||
} else { | ||
return _toggle.call(this, token); | ||
} | ||
}; | ||
} | ||
// replace() polyfill | ||
if (!("replace" in document.createElement("_").classList)) { | ||
DOMTokenList.prototype.replace = function (token, replacement_token) { | ||
var tokens = this.toString().split(" "), | ||
index = tokens.indexOf(token + ""); | ||
if (~index) { | ||
tokens = tokens.slice(index); | ||
this.remove.apply(this, tokens); | ||
this.add(replacement_token); | ||
this.add.apply(this, tokens.slice(1)); | ||
} | ||
}; | ||
} | ||
testElement = null; | ||
})(); | ||
} | ||
// https://github.com/taylorhakes/promise-polyfill | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : typeof define === 'function' && define.amd ? define(factory) : factory(); | ||
})(undefined, function () { | ||
/** | ||
* @this {Promise} | ||
*/ | ||
function finallyConstructor(callback) { | ||
var constructor = this.constructor; | ||
return this.then(function (value) { | ||
// @ts-ignore | ||
return constructor.resolve(callback()).then(function () { | ||
return value; | ||
}); | ||
}, function (reason) { | ||
// @ts-ignore | ||
return constructor.resolve(callback()).then(function () { | ||
// @ts-ignore | ||
return constructor.reject(reason); | ||
}); | ||
}); | ||
} | ||
function allSettled(arr) { | ||
var P = this; | ||
return new P(function (resolve, reject) { | ||
if (!(arr && typeof arr.length !== 'undefined')) { | ||
return reject(new TypeError(typeof arr + ' ' + arr + ' is not iterable(cannot read property Symbol(Symbol.iterator))')); | ||
} | ||
var args = Array.prototype.slice.call(arr); | ||
if (args.length === 0) return resolve([]); | ||
var remaining = args.length; | ||
function res(i, val) { | ||
if (val && (typeof val === 'object' || typeof val === 'function')) { | ||
var then = val.then; | ||
if (typeof then === 'function') { | ||
then.call(val, function (val) { | ||
res(i, val); | ||
}, function (e) { | ||
args[i] = { | ||
status: 'rejected', | ||
reason: e | ||
}; | ||
if (--remaining === 0) { | ||
resolve(args); | ||
} | ||
}); | ||
return; | ||
} | ||
} | ||
args[i] = { | ||
status: 'fulfilled', | ||
value: val | ||
}; | ||
if (--remaining === 0) { | ||
resolve(args); | ||
} | ||
} | ||
for (var i = 0; i < args.length; i++) { | ||
res(i, args[i]); | ||
} | ||
}); | ||
} | ||
// Store setTimeout reference so promise-polyfill will be unaffected by | ||
// other code modifying setTimeout (like sinon.useFakeTimers()) | ||
var setTimeoutFunc = setTimeout; | ||
function isArray(x) { | ||
return Boolean(x && typeof x.length !== 'undefined'); | ||
} | ||
function noop() {} | ||
// Polyfill for Function.prototype.bind | ||
function bind(fn, thisArg) { | ||
return function () { | ||
fn.apply(thisArg, arguments); | ||
}; | ||
} | ||
/** | ||
* @constructor | ||
* @param {Function} fn | ||
*/ | ||
function Promise(fn) { | ||
if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new'); | ||
if (typeof fn !== 'function') throw new TypeError('not a function'); | ||
/** @type {!number} */ | ||
this._state = 0; | ||
/** @type {!boolean} */ | ||
this._handled = false; | ||
/** @type {Promise|undefined} */ | ||
this._value = undefined; | ||
/** @type {!Array<!Function>} */ | ||
this._deferreds = []; | ||
doResolve(fn, this); | ||
} | ||
function handle(self, deferred) { | ||
while (self._state === 3) { | ||
self = self._value; | ||
} | ||
if (self._state === 0) { | ||
self._deferreds.push(deferred); | ||
return; | ||
} | ||
self._handled = true; | ||
Promise._immediateFn(function () { | ||
var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected; | ||
if (cb === null) { | ||
(self._state === 1 ? resolve : reject)(deferred.promise, self._value); | ||
return; | ||
} | ||
var ret; | ||
try { | ||
ret = cb(self._value); | ||
} catch (e) { | ||
reject(deferred.promise, e); | ||
return; | ||
} | ||
resolve(deferred.promise, ret); | ||
}); | ||
} | ||
function resolve(self, newValue) { | ||
try { | ||
// Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure | ||
if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.'); | ||
if (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) { | ||
var then = newValue.then; | ||
if (newValue instanceof Promise) { | ||
self._state = 3; | ||
self._value = newValue; | ||
finale(self); | ||
return; | ||
} else if (typeof then === 'function') { | ||
doResolve(bind(then, newValue), self); | ||
return; | ||
} | ||
} | ||
self._state = 1; | ||
self._value = newValue; | ||
finale(self); | ||
} catch (e) { | ||
reject(self, e); | ||
} | ||
} | ||
function reject(self, newValue) { | ||
self._state = 2; | ||
self._value = newValue; | ||
finale(self); | ||
} | ||
function finale(self) { | ||
if (self._state === 2 && self._deferreds.length === 0) { | ||
Promise._immediateFn(function () { | ||
if (!self._handled) { | ||
Promise._unhandledRejectionFn(self._value); | ||
} | ||
}); | ||
} | ||
for (var i = 0, len = self._deferreds.length; i < len; i++) { | ||
handle(self, self._deferreds[i]); | ||
} | ||
self._deferreds = null; | ||
} | ||
/** | ||
* @constructor | ||
*/ | ||
function Handler(onFulfilled, onRejected, promise) { | ||
this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null; | ||
this.onRejected = typeof onRejected === 'function' ? onRejected : null; | ||
this.promise = promise; | ||
} | ||
/** | ||
* Take a potentially misbehaving resolver function and make sure | ||
* onFulfilled and onRejected are only called once. | ||
* | ||
* Makes no guarantees about asynchrony. | ||
*/ | ||
function doResolve(fn, self) { | ||
var done = false; | ||
try { | ||
fn(function (value) { | ||
if (done) return; | ||
done = true; | ||
resolve(self, value); | ||
}, function (reason) { | ||
if (done) return; | ||
done = true; | ||
reject(self, reason); | ||
}); | ||
} catch (ex) { | ||
if (done) return; | ||
done = true; | ||
reject(self, ex); | ||
} | ||
} | ||
Promise.prototype['catch'] = function (onRejected) { | ||
return this.then(null, onRejected); | ||
}; | ||
Promise.prototype.then = function (onFulfilled, onRejected) { | ||
// @ts-ignore | ||
var prom = new this.constructor(noop); | ||
handle(this, new Handler(onFulfilled, onRejected, prom)); | ||
return prom; | ||
}; | ||
Promise.prototype['finally'] = finallyConstructor; | ||
Promise.all = function (arr) { | ||
return new Promise(function (resolve, reject) { | ||
if (!isArray(arr)) { | ||
return reject(new TypeError('Promise.all accepts an array')); | ||
} | ||
var args = Array.prototype.slice.call(arr); | ||
if (args.length === 0) return resolve([]); | ||
var remaining = args.length; | ||
function res(i, val) { | ||
try { | ||
if (val && (typeof val === 'object' || typeof val === 'function')) { | ||
var then = val.then; | ||
if (typeof then === 'function') { | ||
then.call(val, function (val) { | ||
res(i, val); | ||
}, reject); | ||
return; | ||
} | ||
} | ||
args[i] = val; | ||
if (--remaining === 0) { | ||
resolve(args); | ||
} | ||
} catch (ex) { | ||
reject(ex); | ||
} | ||
} | ||
for (var i = 0; i < args.length; i++) { | ||
res(i, args[i]); | ||
} | ||
}); | ||
}; | ||
Promise.allSettled = allSettled; | ||
Promise.resolve = function (value) { | ||
if (value && typeof value === 'object' && value.constructor === Promise) { | ||
return value; | ||
} | ||
return new Promise(function (resolve) { | ||
resolve(value); | ||
}); | ||
}; | ||
Promise.reject = function (value) { | ||
return new Promise(function (resolve, reject) { | ||
reject(value); | ||
}); | ||
}; | ||
Promise.race = function (arr) { | ||
return new Promise(function (resolve, reject) { | ||
if (!isArray(arr)) { | ||
return reject(new TypeError('Promise.race accepts an array')); | ||
} | ||
for (var i = 0, len = arr.length; i < len; i++) { | ||
Promise.resolve(arr[i]).then(resolve, reject); | ||
} | ||
}); | ||
}; | ||
// Use polyfill for setImmediate for performance gains | ||
Promise._immediateFn = | ||
// @ts-ignore | ||
typeof setImmediate === 'function' && function (fn) { | ||
// @ts-ignore | ||
setImmediate(fn); | ||
} || function (fn) { | ||
setTimeoutFunc(fn, 0); | ||
}; | ||
Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) { | ||
if (typeof console !== 'undefined' && console) { | ||
console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console | ||
} | ||
}; | ||
/** @suppress {undefinedVars} */ | ||
var globalNS = function () { | ||
// the only reliable means to get the global object is | ||
// `Function('return this')()` | ||
// However, this causes CSP violations in Chrome apps. | ||
if (typeof self !== 'undefined') { | ||
return self; | ||
} | ||
if (typeof window !== 'undefined') { | ||
return window; | ||
} | ||
if (typeof global !== 'undefined') { | ||
return global; | ||
} | ||
throw new Error('unable to locate global object'); | ||
}(); | ||
// Expose the polyfill if Promise is undefined or set to a | ||
// non-function value. The latter can be due to a named HTMLElement | ||
// being exposed by browsers for legacy reasons. | ||
// https://github.com/taylorhakes/promise-polyfill/issues/114 | ||
if (typeof globalNS['Promise'] !== 'function') { | ||
globalNS['Promise'] = Promise; | ||
} else if (!globalNS.Promise.prototype['finally']) { | ||
globalNS.Promise.prototype['finally'] = finallyConstructor; | ||
} else if (!globalNS.Promise.allSettled) { | ||
globalNS.Promise.allSettled = allSettled; | ||
} | ||
}); | ||
})); | ||
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}function e(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var n;"".trim||(String.prototype.trim=function(){return this.replace(/^[\s]+|[\s]+$/g,"")}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var o=arguments[1],r=0;r<n;){var i=e[r];if(t.call(o,i,r,e))return r;r++}return-1},configurable:!0,writable:!0}),Array.prototype.includes||(Array.prototype.includes=function(t){return!!~this.indexOf(t)}),Array.prototype.some||(Array.prototype.some=function(t,e){if(null==this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof t)throw new TypeError;for(var n=Object(this),o=n.length>>>0,r=0;r<o;r++)if(r in n&&t.call(e,n[r],r,n))return!0;return!1}),String.prototype.includes||(String.prototype.includes=function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),o=1;o<arguments.length;o++){var r=arguments[o];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}return n},writable:!0,configurable:!0}),t.prototype=window.Event.prototype,"function"!=typeof window.CustomEvent&&(window.CustomEvent=t),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}),document.execCommand("AutoUrlDetect",!1,!1),/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(t){if("Element"in t){var e="classList",n="prototype",o=t.Element[n],r=Object,i=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[n].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},s=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},l=function(t,e){if(""===e)throw new s("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new s("INVALID_CHARACTER_ERR","The token must not contain space characters.");return c.call(t,e)},u=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],o=0,r=n.length;o<r;o++)this.push(n[o]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},a=u[n]=[],f=function(){return new u(this)};if(s[n]=Error[n],a.item=function(t){return this[t]||null},a.contains=function(t){return~l(this,t+"")},a.add=function(){var t,e=arguments,n=0,o=e.length,r=!1;do{~l(this,t=e[n]+"")||(this.push(t),r=!0)}while(++n<o);r&&this._updateClassName()},a.remove=function(){var t,e,n=arguments,o=0,r=n.length,i=!1;do{for(e=l(this,t=n[o]+"");~e;)this.splice(e,1),i=!0,e=l(this,t)}while(++o<r);i&&this._updateClassName()},a.toggle=function(t,e){var n=this.contains(t),o=n?!0!==e&&"remove":!1!==e&&"add";return o&&this[o](t),!0===e||!1===e?e:!n},a.replace=function(t,e){var n=l(t+"");~n&&(this.splice(n,1,e),this._updateClassName())},a.toString=function(){return this.join(" ")},r.defineProperty){var p={get:f,enumerable:!0,configurable:!0};try{r.defineProperty(o,e,p)}catch(t){void 0!==t.number&&-2146823252!==t.number||(p.enumerable=!1,r.defineProperty(o,e,p))}}else r[n].__defineGetter__&&o.__defineGetter__(e,f)}}(self),function(){var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,o=arguments.length;for(n=0;n<o;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var n=this.toString().split(" "),o=n.indexOf(t+"");~o&&(n=n.slice(o),this.remove.apply(this,n),this.add(e),this.add.apply(this,n.slice(1)))}),t=null}()),globalThis,n=function(){function t(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}function n(t){return new this((function(e,n){if(!t||void 0===t.length)return n(new TypeError((void 0===t?"undefined":(o=t)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var o,r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var i=r.length;function c(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if("function"==typeof o)return void o.call(n,(function(e){c(t,e)}),(function(n){r[t]={status:"rejected",reason:n},0==--i&&e(r)}))}r[t]={status:"fulfilled",value:n},0==--i&&e(r)}for(var s=0;s<r.length;s++)c(s,r[s])}))}var o=setTimeout;function r(t){return Boolean(t&&void 0!==t.length)}function i(){}function c(t){if(!e(this,c))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(t,this)}function s(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,c._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var o;try{o=n(t._value)}catch(t){return void u(e.promise,t)}l(e.promise,o)}else(1===t._state?l:u)(e.promise,t._value)}))):t._deferreds.push(e)}function l(t,n){try{if(n===t)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if(e(n,c))return t._state=3,t._value=n,void a(t);if("function"==typeof o)return void p((r=o,i=n,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=n,a(t)}catch(e){u(t,e)}var r,i}function u(t,e){t._state=2,t._value=e,a(t)}function a(t){2===t._state&&0===t._deferreds.length&&c._immediateFn((function(){t._handled||c._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)s(t,t._deferreds[e]);t._deferreds=null}function f(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function p(t,e){var n=!1;try{t((function(t){n||(n=!0,l(e,t))}),(function(t){n||(n=!0,u(e,t))}))}catch(t){if(n)return;n=!0,u(e,t)}}c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){var n=new this.constructor(i);return s(this,new f(t,e,n)),n},c.prototype.finally=t,c.all=function(t){return new c((function(e,n){if(!r(t))return n(new TypeError("Promise.all accepts an array"));var o=Array.prototype.slice.call(t);if(0===o.length)return e([]);var i=o.length;function c(t,r){try{if(r&&("object"==typeof r||"function"==typeof r)){var s=r.then;if("function"==typeof s)return void s.call(r,(function(e){c(t,e)}),n)}o[t]=r,0==--i&&e(o)}catch(t){n(t)}}for(var s=0;s<o.length;s++)c(s,o[s])}))},c.allSettled=n,c.resolve=function(t){return t&&"object"==typeof t&&t.constructor===c?t:new c((function(e){e(t)}))},c.reject=function(t){return new c((function(e,n){n(t)}))},c.race=function(t){return new c((function(e,n){if(!r(t))return n(new TypeError("Promise.race accepts an array"));for(var o=0,i=t.length;o<i;o++)c.resolve(t[o]).then(e,n)}))},c._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){o(t,0)},c._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};var d=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"function"!=typeof d.Promise?d.Promise=c:d.Promise.prototype.finally?d.Promise.allSettled||(d.Promise.allSettled=n):d.Promise.prototype.finally=t},"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()})); | ||
//# sourceMappingURL=tagify.polyfills.min.js.map |
184
package.json
{ | ||
"name": "@yaireo/tagify", | ||
"version": "4.22.2", | ||
"homepage": "https://github.com/yairEO/tagify", | ||
"description": "lightweight, efficient Tags input component in Vanilla JS / React / Angular [super customizable, tiny size & top performance]", | ||
"keywords": [ | ||
"tags", | ||
"tagging", | ||
"component", | ||
"tag", | ||
"ui" | ||
], | ||
"license": "MIT", | ||
"browserslist": [ | ||
">1%", | ||
"not dead", | ||
"not ie < 11", | ||
"not IE_Mob 11", | ||
"not op_mini all" | ||
], | ||
"engines": { | ||
"npm": ">=8.0.0", | ||
"node": ">=14.20.0" | ||
}, | ||
"np": { | ||
"yarn": false, | ||
"yolo": true | ||
}, | ||
"scripts": { | ||
"start": "gulp --dev", | ||
"build": "gulp", | ||
"version": "gulp build && git add .", | ||
"prepublishOnly": "pkg-ok", | ||
"test": "echo \"No test specified\"", | ||
"serve": "npx http-server -o index.html -c-1" | ||
}, | ||
"jest": { | ||
"preset": "jest-puppeteer" | ||
}, | ||
"author": "Yair Even-Or <vsync.design@gmail.com>", | ||
"main": "./dist/tagify.min.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/yairEO/tagify.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/yaireo/tagify/issues" | ||
}, | ||
"files": [ | ||
"/dist", | ||
"/src/tagify.scss" | ||
], | ||
"peerDependencies": { | ||
"prop-types": "^15.7.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.20.5", | ||
"@babel/preset-env": "^7.20.2", | ||
"@babel/preset-react": "^7.18.6", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/stream": "git+https://github.com/andremacola/stream.git", | ||
"beepbeep": "^1.3.0", | ||
"gulp": "^4.0.2", | ||
"gulp-autoprefixer": "^8.0.0", | ||
"gulp-babel": "^8.0.0", | ||
"gulp-bump": "^3.2.0", | ||
"gulp-cached": "^1.1.1", | ||
"gulp-clean-css": "^4.3.0", | ||
"gulp-combine-mq": "^0.4.0", | ||
"gulp-concat": "^2.6.1", | ||
"gulp-css-globbing": "^0.2.2", | ||
"gulp-header-comment": "^0.10.0", | ||
"gulp-insert": "^0.5.0", | ||
"gulp-load-plugins": "^2.0.8", | ||
"gulp-rename": "^2.0.0", | ||
"gulp-replace": "^1.1.3", | ||
"gulp-sass": "^5.1.0", | ||
"gulp-sourcemaps": "^3.0.0", | ||
"gulp-streamify": "^1.0.2", | ||
"gulp-tag-version": "^1.3.1", | ||
"gulp-tap": "^2.0.0", | ||
"gulp-terser": "^2.1.0", | ||
"gulp-umd": "^2.0.0", | ||
"gulp-util": "^3.0.8", | ||
"gulp-watch": "^5.0.1", | ||
"path": "^0.12.7", | ||
"rollup": "^2.79.1", | ||
"rollup-plugin-banner2": "^1.2.2", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"run-sequence": "^2.2.1", | ||
"sass": "^1.56.1", | ||
"semver": "^7.3.8", | ||
"vinyl-buffer": "^1.0.1", | ||
"vinyl-source-stream": "^2.0.0" | ||
} | ||
} | ||
"name": "@yaireo/tagify", | ||
"version": "4.23.0", | ||
"homepage": "https://github.com/yairEO/tagify", | ||
"description": "lightweight, efficient Tags input component in Vanilla JS / React / Angular [super customizable, tiny size & top performance]", | ||
"keywords": [ | ||
"tags", | ||
"tagging", | ||
"component", | ||
"tag", | ||
"ui" | ||
], | ||
"license": "MIT", | ||
"browserslist": [ | ||
">1%", | ||
"not dead", | ||
"not ie < 11", | ||
"not IE_Mob 11", | ||
"not op_mini all" | ||
], | ||
"engines": { | ||
"npm": ">=9.0.0", | ||
"node": ">=16.15.0" | ||
}, | ||
"np": { | ||
"yarn": false, | ||
"yolo": true | ||
}, | ||
"jest": { | ||
"preset": "jest-puppeteer" | ||
}, | ||
"author": "Yair Even-Or <vsync.design@gmail.com>", | ||
"main": "./dist/tagify.min.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/yairEO/tagify.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/yaireo/tagify/issues" | ||
}, | ||
"files": [ | ||
"/dist", | ||
"/src" | ||
], | ||
"devDependencies": { | ||
"@rollup/plugin-terser": "^0.4.4", | ||
"@rollup/stream": "^3.0.1", | ||
"@swc/core": "^1.4.12", | ||
"beepbeep": "^1.3.0", | ||
"gulp": "^5.0.0", | ||
"gulp-autoprefixer": "^8.0.0", | ||
"gulp-bump": "^3.2.0", | ||
"gulp-cached": "^1.1.1", | ||
"gulp-clean-css": "^4.3.0", | ||
"gulp-combine-mq": "^0.4.0", | ||
"gulp-concat": "^2.6.1", | ||
"gulp-css-globbing": "^0.2.2", | ||
"gulp-header-comment": "^0.10.0", | ||
"gulp-insert": "^0.5.0", | ||
"gulp-load-plugins": "^2.0.8", | ||
"gulp-rename": "^2.0.0", | ||
"gulp-replace": "^1.1.3", | ||
"gulp-sass": "^5.1.0", | ||
"gulp-sourcemaps": "^3.0.0", | ||
"gulp-streamify": "^1.0.2", | ||
"gulp-swc": "^2.0.0", | ||
"gulp-tag-version": "^1.3.1", | ||
"gulp-tap": "^2.0.0", | ||
"gulp-terser": "^2.1.0", | ||
"gulp-umd": "^2.0.0", | ||
"gulp-util": "^3.0.8", | ||
"gulp-watch": "^5.0.1", | ||
"path": "^0.12.7", | ||
"rollup": "2.79.1", | ||
"rollup-plugin-banner2": "^1.2.2", | ||
"rollup-plugin-swc3": "^0.11.0", | ||
"run-sequence": "^2.2.1", | ||
"sass": "^1.56.1", | ||
"semver": "^7.3.8", | ||
"vinyl-buffer": "^1.0.1", | ||
"vinyl-source-stream": "^2.0.0" | ||
}, | ||
"scripts": { | ||
"start": "gulp --dev", | ||
"build": "gulp", | ||
"version": "gulp build && git add .", | ||
"test": "echo \"No test specified\"", | ||
"serve": "npx http-server -o index.html -c-1" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
36
38
1
1150
2884551
5118
1