: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
accept = '*/'.concat('*');
type = 'application/json, text/javascript';
type = 'application/xml, text/xml';
if (type !== 'application/x-www-form-urlencoded') {
accept = type + ', */*; q=0.01';
xhr.open('GET', url, true);
xhr.setRequestHeader('Accept', accept);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
data = JSON.parse(xhr.responseText);
} else if (typeof error === 'function') {
_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.offset = offset;
_mejs2.default.Utils.hasClass = hasClass;
_mejs2.default.Utils.addClass = addClass;
_mejs2.default.Utils.removeClass = removeClass;
_mejs2.default.Utils.toggleClass = toggleClass;
_mejs2.default.Utils.fadeIn = fadeIn;
_mejs2.default.Utils.fadeOut = fadeOut;
_mejs2.default.Utils.siblings = siblings;
_mejs2.default.Utils.visible = visible;
_mejs2.default.Utils.ajax = ajax;
_mejs2.default.Utils.loadScript = loadScript;
},{"2":2,"3":3,"7":7}],18:[function(_dereq_,module,exports){
Object.defineProperty(exports, "__esModule", {
exports.escapeHTML = escapeHTML;
exports.debounce = debounce;
exports.isObjectEmpty = isObjectEmpty;
exports.splitEvents = splitEvents;
exports.createEvent = createEvent;
exports.isNodeAfter = isNodeAfter;
exports.isString = isString;
var _mejs2 = _interopRequireDefault(_mejs);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function escapeHTML(input) {
if (typeof input !== 'string') {
throw new Error('Argument passed must be a string');
return input.replace(/[&<>"]/g, function (c) {
function debounce(func, wait) {
var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
if (typeof func !== 'function') {
throw new Error('First argument must be a function');
if (typeof wait !== 'number') {
throw new Error('Second argument must be a numeric value');
var later = function later() {
func.apply(context, args);
var callNow = immediate && !timeout;
timeout = setTimeout(later, wait);
func.apply(context, args);
function isObjectEmpty(instance) {
return Object.getOwnPropertyNames(instance).length <= 0;
function splitEvents(events, id) {
var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
var ret = { d: [], w: [] };
(events || '').split(' ').forEach(function (v) {
var eventName = '' + v + (id ? '.' + id : '');
if (eventName.startsWith('.')) {
ret[rwindow.test(v) ? 'w' : 'd'].push(eventName);
function createEvent(eventName, target) {
if (typeof eventName !== 'string') {
throw new Error('Event name must be a string');
var eventFrags = eventName.match(/([a-z]+\.([a-z]+))/i),
if (eventFrags !== null) {
eventName = eventFrags[1];
detail.namespace = eventFrags[2];
return new window.CustomEvent(eventName, {
function isNodeAfter(sourceNode, targetNode) {
return !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2);
function isString(value) {
return typeof value === 'string';
_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.escapeHTML = escapeHTML;
_mejs2.default.Utils.debounce = debounce;
_mejs2.default.Utils.isObjectEmpty = isObjectEmpty;
_mejs2.default.Utils.splitEvents = splitEvents;
_mejs2.default.Utils.createEvent = createEvent;
_mejs2.default.Utils.isNodeAfter = isNodeAfter;
_mejs2.default.Utils.isString = isString;
},{"7":7}],19:[function(_dereq_,module,exports){
Object.defineProperty(exports, "__esModule", {
exports.typeChecks = undefined;
exports.absolutizeUrl = absolutizeUrl;
exports.formatType = formatType;
exports.getMimeFromType = getMimeFromType;
exports.getTypeFromFile = getTypeFromFile;
exports.getExtension = getExtension;
exports.normalizeExtension = normalizeExtension;
var _mejs2 = _interopRequireDefault(_mejs);
var _general = _dereq_(18);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var typeChecks = exports.typeChecks = [];
function absolutizeUrl(url) {
if (typeof url !== 'string') {
throw new Error('`url` argument must be a string');
var el = document.createElement('div');
el.innerHTML = '<a href="' + (0, _general.escapeHTML)(url) + '">x</a>';
return el.firstChild.href;
function formatType(url) {
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
return url && !type ? getTypeFromFile(url) : type;
function getMimeFromType(type) {
if (typeof type !== 'string') {
throw new Error('`type` argument must be a string');
return type && type.indexOf(';') > -1 ? type.substr(0, type.indexOf(';')) : type;
function getTypeFromFile(url) {
if (typeof url !== 'string') {
throw new Error('`url` argument must be a string');
for (var i = 0, total = typeChecks.length; i < total; i++) {
var type = typeChecks[i](url);
var ext = getExtension(url),
normalizedExt = normalizeExtension(ext);
if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg'].indexOf(normalizedExt)) {
mime = 'video/' + normalizedExt;
} else if ('mov' === normalizedExt) {
mime = 'video/quicktime';
} else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {
mime = 'audio/' + normalizedExt;
function getExtension(url) {
if (typeof url !== 'string') {
throw new Error('`url` argument must be a string');
var baseUrl = url.split('?')[0],
baseName = baseUrl.split('\\').pop().split('/').pop();
return ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : '';
function normalizeExtension(extension) {
if (typeof extension !== 'string') {
throw new Error('`extension` argument must be a string');
_mejs2.default.Utils = _mejs2.default.Utils || {};
_mejs2.default.Utils.typeChecks = typeChecks;
_mejs2.default.Utils.absolutizeUrl = absolutizeUrl;
_mejs2.default.Utils.formatType = formatType;
_mejs2.default.Utils.getMimeFromType = getMimeFromType;
_mejs2.default.Utils.getTypeFromFile = getTypeFromFile;
_mejs2.default.Utils.getExtension = getExtension;
_mejs2.default.Utils.normalizeExtension = normalizeExtension;
},{"18":18,"7":7}],20:[function(_dereq_,module,exports){
var _document = _dereq_(2);
var _document2 = _interopRequireDefault(_document);
var _promisePolyfill = _dereq_(4);
var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
arr.forEach(function (item) {
if (item.hasOwnProperty('remove')) {
Object.defineProperty(item, 'remove', {
value: function remove() {
this.parentNode.removeChild(this);
})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
if (typeof window.CustomEvent === 'function') {
function CustomEvent(event, params) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = _document2.default.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
if (typeof Object.assign !== 'function') {
Object.assign = function (target) {
if (target === null || target === undefined) {
throw new TypeError('Cannot convert undefined or null to object');
for (var index = 1, total = arguments.length; index < total; index++) {
var nextSource = arguments[index];
if (nextSource !== null) {
for (var nextKey in nextSource) {
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
to[nextKey] = nextSource[nextKey];
if (!String.prototype.startsWith) {
String.prototype.startsWith = function (searchString, position) {
position = position || 0;
return this.substr(position, searchString.length) === searchString;
if (!Element.prototype.matches) {
Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {
var matches = (this.document || this.ownerDocument).querySelectorAll(s),
while (--i >= 0 && matches.item(i) !== this) {}
if (window.Element && !Element.prototype.closest) {
Element.prototype.closest = function (s) {
var matches = (this.document || this.ownerDocument).querySelectorAll(s),
while (--i >= 0 && matches.item(i) !== el) {}
} while (i < 0 && (el = el.parentElement));
var vendors = ['ms', 'moz', 'webkit', 'o'];
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function () {
callback(currTime + timeToCall);
lastTime = currTime + timeToCall;
if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {
if (/firefox/i.test(navigator.userAgent)) {
var getComputedStyle = window.getComputedStyle;
window.getComputedStyle = function (el, pseudoEl) {
var t = getComputedStyle(el, pseudoEl);
return t === null ? { getPropertyValue: function getPropertyValue() {} } : t;
window.Promise = _promisePolyfill2.default;
(function (constructor) {
if (constructor && constructor.prototype && constructor.prototype.children === null) {
Object.defineProperty(constructor.prototype, 'children', {
while (node = nodes[i++]) {
if (node.nodeType === 1) {
})(window.Node || window.Element);
},{"2":2,"4":4}]},{},[20,6,5,9,14,11,10,12,13,15]);