(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["Coveo__temporary"] = factory();
	else
		root["Coveo__temporary"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// install a JSONP callback for chunk loading
/******/ 	var parentJsonpFunction = window["webpackJsonpCoveo__temporary"];
/******/ 	window["webpackJsonpCoveo__temporary"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
/******/ 		// add "moreModules" to the modules object,
/******/ 		// then flag all "chunkIds" as loaded and fire callback
/******/ 		var moduleId, chunkId, i = 0, resolves = [], result;
/******/ 		for(;i < chunkIds.length; i++) {
/******/ 			chunkId = chunkIds[i];
/******/ 			if(installedChunks[chunkId]) {
/******/ 				resolves.push(installedChunks[chunkId][0]);
/******/ 			}
/******/ 			installedChunks[chunkId] = 0;
/******/ 		}
/******/ 		for(moduleId in moreModules) {
/******/ 			if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ 				modules[moduleId] = moreModules[moduleId];
/******/ 			}
/******/ 		}
/******/ 		if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
/******/ 		while(resolves.length) {
/******/ 			resolves.shift()();
/******/ 		}
/******/
/******/ 	};
/******/
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// objects to store loaded and loading chunks
/******/ 	var installedChunks = {
/******/ 		89: 0
/******/ 	};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/ 	// This file contains only the entry chunk.
/******/ 	// The chunk loading function for additional chunks
/******/ 	__webpack_require__.e = function requireEnsure(chunkId) {
/******/ 		var installedChunkData = installedChunks[chunkId];
/******/ 		if(installedChunkData === 0) {
/******/ 			return new Promise(function(resolve) { resolve(); });
/******/ 		}
/******/
/******/ 		// a Promise means "currently loading".
/******/ 		if(installedChunkData) {
/******/ 			return installedChunkData[2];
/******/ 		}
/******/
/******/ 		// setup Promise in chunk cache
/******/ 		var promise = new Promise(function(resolve, reject) {
/******/ 			installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ 		});
/******/ 		installedChunkData[2] = promise;
/******/
/******/ 		// start chunk loading
/******/ 		var head = document.getElementsByTagName('head')[0];
/******/ 		var script = document.createElement('script');
/******/ 		script.type = "text/javascript";
/******/ 		script.charset = 'utf-8';
/******/ 		script.async = true;
/******/ 		script.timeout = 120000;
/******/
/******/ 		if (__webpack_require__.nc) {
/******/ 			script.setAttribute("nonce", __webpack_require__.nc);
/******/ 		}
/******/ 		script.src = __webpack_require__.p + "" + ({"0":"RelevanceInspector","1":"CategoryFacet","2":"DynamicFacet","3":"FacetsMobileMode","4":"DynamicHierarchicalFacet","5":"HierarchicalFacet","6":"TimespanFacet","7":"FacetRange","8":"DynamicFacetRange","9":"Searchbox","10":"Omnibox","11":"Querybox","12":"QuerySuggestPreview","13":"FacetSlider","14":"AdvancedSearch","15":"ResultsPerPage","16":"Pager","17":"OmniboxResultList","18":"SmartSnippet","19":"ResultList","20":"Quickview","21":"SmartSnippetSuggestions","22":"Recommendation","23":"Backdrop","24":"SortDropdown","25":"ResultsPreferences","26":"ResultsFiltersPreferences","27":"YouTubeThumbnail","28":"Thumbnail","29":"Tab","30":"PrintableUri","31":"FieldTable","32":"ImageFieldValue","33":"DistanceResources","34":"Badge","35":"SearchAlerts","36":"SimpleFilter","37":"PreferencesPanel","38":"Matrix","39":"FoldingForThread","40":"FieldValue","41":"Sort","42":"ResultLink","43":"ResultLayoutSelector","44":"ResultFolding","45":"ResultAttachments","46":"QuerySummary","47":"FieldSuggestions","48":"FacetValueSuggestions","49":"CardOverlay","50":"Folding","51":"ChatterPostedBy","52":"ChatterPostAttachment","53":"ChatterLikedBy","54":"AnalyticsSuggestions","55":"FollowItem","56":"RadioButton","57":"MultiSelect","58":"FormGroup","59":"Triggers","60":"Text","61":"StarRating","62":"ShareQuery","63":"Settings","64":"ResultTagging","65":"ResultRating","66":"ResultActionsMenu","67":"QueryDuration","68":"PromotedResultsBadge","69":"MissingTerms","70":"HiddenQuery","71":"ExportToExcel","72":"Excerpt","73":"ErrorReport","74":"DidYouMean","75":"CardActionBar","76":"Breadcrumb","77":"AuthenticationProvider","78":"TemplateLoader","79":"SearchButton","80":"PipelineContext","81":"Logo","82":"Icon","83":"NumericSpinner","84":"Dropdown","85":"CommerceQuery","86":"ChatterTopic","87":"Aggregate"}[chunkId]||chunkId) + "__" + "77bc49e2a0599a34d1cd" + ".js";
/******/ 		var timeout = setTimeout(onScriptComplete, 120000);
/******/ 		script.onerror = script.onload = onScriptComplete;
/******/ 		function onScriptComplete() {
/******/ 			// avoid mem leaks in IE.
/******/ 			script.onerror = script.onload = null;
/******/ 			clearTimeout(timeout);
/******/ 			var chunk = installedChunks[chunkId];
/******/ 			if(chunk !== 0) {
/******/ 				if(chunk) {
/******/ 					chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
/******/ 				}
/******/ 				installedChunks[chunkId] = undefined;
/******/ 			}
/******/ 		};
/******/ 		head.appendChild(script);
/******/
/******/ 		return promise;
/******/ 	};
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "js/";
/******/
/******/ 	// on error function for async loading
/******/ 	__webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 714);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
var modules_namespaceObject = {};
__webpack_require__.d(modules_namespaceObject, "VERSION", function() { return _setup["e" /* VERSION */]; });
__webpack_require__.d(modules_namespaceObject, "restArguments", function() { return restArguments; });
__webpack_require__.d(modules_namespaceObject, "isObject", function() { return isObject; });
__webpack_require__.d(modules_namespaceObject, "isNull", function() { return isNull; });
__webpack_require__.d(modules_namespaceObject, "isUndefined", function() { return isUndefined; });
__webpack_require__.d(modules_namespaceObject, "isBoolean", function() { return isBoolean; });
__webpack_require__.d(modules_namespaceObject, "isElement", function() { return isElement; });
__webpack_require__.d(modules_namespaceObject, "isString", function() { return isString; });
__webpack_require__.d(modules_namespaceObject, "isNumber", function() { return isNumber; });
__webpack_require__.d(modules_namespaceObject, "isDate", function() { return isDate; });
__webpack_require__.d(modules_namespaceObject, "isRegExp", function() { return isRegExp; });
__webpack_require__.d(modules_namespaceObject, "isError", function() { return isError; });
__webpack_require__.d(modules_namespaceObject, "isSymbol", function() { return isSymbol; });
__webpack_require__.d(modules_namespaceObject, "isArrayBuffer", function() { return isArrayBuffer; });
__webpack_require__.d(modules_namespaceObject, "isDataView", function() { return modules_isDataView; });
__webpack_require__.d(modules_namespaceObject, "isArray", function() { return isArray; });
__webpack_require__.d(modules_namespaceObject, "isFunction", function() { return modules_isFunction; });
__webpack_require__.d(modules_namespaceObject, "isArguments", function() { return modules_isArguments; });
__webpack_require__.d(modules_namespaceObject, "isFinite", function() { return isFinite_isFinite; });
__webpack_require__.d(modules_namespaceObject, "isNaN", function() { return isNaN_isNaN; });
__webpack_require__.d(modules_namespaceObject, "isTypedArray", function() { return modules_isTypedArray; });
__webpack_require__.d(modules_namespaceObject, "isEmpty", function() { return isEmpty; });
__webpack_require__.d(modules_namespaceObject, "isMatch", function() { return isMatch; });
__webpack_require__.d(modules_namespaceObject, "isEqual", function() { return isEqual; });
__webpack_require__.d(modules_namespaceObject, "isMap", function() { return isMap; });
__webpack_require__.d(modules_namespaceObject, "isWeakMap", function() { return isWeakMap; });
__webpack_require__.d(modules_namespaceObject, "isSet", function() { return isSet; });
__webpack_require__.d(modules_namespaceObject, "isWeakSet", function() { return isWeakSet; });
__webpack_require__.d(modules_namespaceObject, "keys", function() { return keys_keys; });
__webpack_require__.d(modules_namespaceObject, "allKeys", function() { return allKeys; });
__webpack_require__.d(modules_namespaceObject, "values", function() { return values_values; });
__webpack_require__.d(modules_namespaceObject, "pairs", function() { return pairs_pairs; });
__webpack_require__.d(modules_namespaceObject, "invert", function() { return invert; });
__webpack_require__.d(modules_namespaceObject, "functions", function() { return functions; });
__webpack_require__.d(modules_namespaceObject, "methods", function() { return functions; });
__webpack_require__.d(modules_namespaceObject, "extend", function() { return extend; });
__webpack_require__.d(modules_namespaceObject, "extendOwn", function() { return extendOwn; });
__webpack_require__.d(modules_namespaceObject, "assign", function() { return extendOwn; });
__webpack_require__.d(modules_namespaceObject, "defaults", function() { return defaults; });
__webpack_require__.d(modules_namespaceObject, "create", function() { return create; });
__webpack_require__.d(modules_namespaceObject, "clone", function() { return clone; });
__webpack_require__.d(modules_namespaceObject, "tap", function() { return tap; });
__webpack_require__.d(modules_namespaceObject, "get", function() { return get; });
__webpack_require__.d(modules_namespaceObject, "has", function() { return has_has; });
__webpack_require__.d(modules_namespaceObject, "mapObject", function() { return mapObject; });
__webpack_require__.d(modules_namespaceObject, "identity", function() { return identity; });
__webpack_require__.d(modules_namespaceObject, "constant", function() { return constant; });
__webpack_require__.d(modules_namespaceObject, "noop", function() { return noop; });
__webpack_require__.d(modules_namespaceObject, "toPath", function() { return toPath; });
__webpack_require__.d(modules_namespaceObject, "property", function() { return property; });
__webpack_require__.d(modules_namespaceObject, "propertyOf", function() { return propertyOf; });
__webpack_require__.d(modules_namespaceObject, "matcher", function() { return matcher_matcher; });
__webpack_require__.d(modules_namespaceObject, "matches", function() { return matcher_matcher; });
__webpack_require__.d(modules_namespaceObject, "times", function() { return times; });
__webpack_require__.d(modules_namespaceObject, "random", function() { return random; });
__webpack_require__.d(modules_namespaceObject, "now", function() { return now; });
__webpack_require__.d(modules_namespaceObject, "escape", function() { return modules_escape; });
__webpack_require__.d(modules_namespaceObject, "unescape", function() { return modules_unescape; });
__webpack_require__.d(modules_namespaceObject, "templateSettings", function() { return templateSettings; });
__webpack_require__.d(modules_namespaceObject, "template", function() { return template_template; });
__webpack_require__.d(modules_namespaceObject, "result", function() { return result_result; });
__webpack_require__.d(modules_namespaceObject, "uniqueId", function() { return uniqueId; });
__webpack_require__.d(modules_namespaceObject, "chain", function() { return chain; });
__webpack_require__.d(modules_namespaceObject, "iteratee", function() { return iteratee_iteratee; });
__webpack_require__.d(modules_namespaceObject, "partial", function() { return modules_partial; });
__webpack_require__.d(modules_namespaceObject, "bind", function() { return bind; });
__webpack_require__.d(modules_namespaceObject, "bindAll", function() { return bindAll; });
__webpack_require__.d(modules_namespaceObject, "memoize", function() { return memoize_memoize; });
__webpack_require__.d(modules_namespaceObject, "delay", function() { return delay; });
__webpack_require__.d(modules_namespaceObject, "defer", function() { return defer; });
__webpack_require__.d(modules_namespaceObject, "throttle", function() { return throttle; });
__webpack_require__.d(modules_namespaceObject, "debounce", function() { return debounce; });
__webpack_require__.d(modules_namespaceObject, "wrap", function() { return wrap; });
__webpack_require__.d(modules_namespaceObject, "negate", function() { return negate; });
__webpack_require__.d(modules_namespaceObject, "compose", function() { return compose; });
__webpack_require__.d(modules_namespaceObject, "after", function() { return after; });
__webpack_require__.d(modules_namespaceObject, "before", function() { return before; });
__webpack_require__.d(modules_namespaceObject, "once", function() { return once; });
__webpack_require__.d(modules_namespaceObject, "findKey", function() { return findKey; });
__webpack_require__.d(modules_namespaceObject, "findIndex", function() { return findIndex; });
__webpack_require__.d(modules_namespaceObject, "findLastIndex", function() { return findLastIndex; });
__webpack_require__.d(modules_namespaceObject, "sortedIndex", function() { return sortedIndex_sortedIndex; });
__webpack_require__.d(modules_namespaceObject, "indexOf", function() { return indexOf; });
__webpack_require__.d(modules_namespaceObject, "lastIndexOf", function() { return lastIndexOf; });
__webpack_require__.d(modules_namespaceObject, "find", function() { return find; });
__webpack_require__.d(modules_namespaceObject, "detect", function() { return find; });
__webpack_require__.d(modules_namespaceObject, "findWhere", function() { return findWhere; });
__webpack_require__.d(modules_namespaceObject, "each", function() { return each; });
__webpack_require__.d(modules_namespaceObject, "forEach", function() { return each; });
__webpack_require__.d(modules_namespaceObject, "map", function() { return map_map; });
__webpack_require__.d(modules_namespaceObject, "collect", function() { return map_map; });
__webpack_require__.d(modules_namespaceObject, "reduce", function() { return reduce; });
__webpack_require__.d(modules_namespaceObject, "foldl", function() { return reduce; });
__webpack_require__.d(modules_namespaceObject, "inject", function() { return reduce; });
__webpack_require__.d(modules_namespaceObject, "reduceRight", function() { return reduceRight; });
__webpack_require__.d(modules_namespaceObject, "foldr", function() { return reduceRight; });
__webpack_require__.d(modules_namespaceObject, "filter", function() { return filter; });
__webpack_require__.d(modules_namespaceObject, "select", function() { return filter; });
__webpack_require__.d(modules_namespaceObject, "reject", function() { return reject; });
__webpack_require__.d(modules_namespaceObject, "every", function() { return every; });
__webpack_require__.d(modules_namespaceObject, "all", function() { return every; });
__webpack_require__.d(modules_namespaceObject, "some", function() { return some; });
__webpack_require__.d(modules_namespaceObject, "any", function() { return some; });
__webpack_require__.d(modules_namespaceObject, "contains", function() { return contains; });
__webpack_require__.d(modules_namespaceObject, "includes", function() { return contains; });
__webpack_require__.d(modules_namespaceObject, "include", function() { return contains; });
__webpack_require__.d(modules_namespaceObject, "invoke", function() { return invoke; });
__webpack_require__.d(modules_namespaceObject, "pluck", function() { return pluck; });
__webpack_require__.d(modules_namespaceObject, "where", function() { return where; });
__webpack_require__.d(modules_namespaceObject, "max", function() { return max; });
__webpack_require__.d(modules_namespaceObject, "min", function() { return min; });
__webpack_require__.d(modules_namespaceObject, "shuffle", function() { return shuffle; });
__webpack_require__.d(modules_namespaceObject, "sample", function() { return sample_sample; });
__webpack_require__.d(modules_namespaceObject, "sortBy", function() { return sortBy; });
__webpack_require__.d(modules_namespaceObject, "groupBy", function() { return groupBy; });
__webpack_require__.d(modules_namespaceObject, "indexBy", function() { return indexBy; });
__webpack_require__.d(modules_namespaceObject, "countBy", function() { return countBy; });
__webpack_require__.d(modules_namespaceObject, "partition", function() { return modules_partition; });
__webpack_require__.d(modules_namespaceObject, "toArray", function() { return toArray; });
__webpack_require__.d(modules_namespaceObject, "size", function() { return size; });
__webpack_require__.d(modules_namespaceObject, "pick", function() { return pick; });
__webpack_require__.d(modules_namespaceObject, "omit", function() { return omit; });
__webpack_require__.d(modules_namespaceObject, "first", function() { return first; });
__webpack_require__.d(modules_namespaceObject, "head", function() { return first; });
__webpack_require__.d(modules_namespaceObject, "take", function() { return first; });
__webpack_require__.d(modules_namespaceObject, "initial", function() { return initial_initial; });
__webpack_require__.d(modules_namespaceObject, "last", function() { return last_last; });
__webpack_require__.d(modules_namespaceObject, "rest", function() { return rest_rest; });
__webpack_require__.d(modules_namespaceObject, "tail", function() { return rest_rest; });
__webpack_require__.d(modules_namespaceObject, "drop", function() { return rest_rest; });
__webpack_require__.d(modules_namespaceObject, "compact", function() { return compact; });
__webpack_require__.d(modules_namespaceObject, "flatten", function() { return flatten_flatten; });
__webpack_require__.d(modules_namespaceObject, "without", function() { return without; });
__webpack_require__.d(modules_namespaceObject, "uniq", function() { return uniq; });
__webpack_require__.d(modules_namespaceObject, "unique", function() { return uniq; });
__webpack_require__.d(modules_namespaceObject, "union", function() { return union; });
__webpack_require__.d(modules_namespaceObject, "intersection", function() { return intersection; });
__webpack_require__.d(modules_namespaceObject, "difference", function() { return difference; });
__webpack_require__.d(modules_namespaceObject, "unzip", function() { return unzip; });
__webpack_require__.d(modules_namespaceObject, "transpose", function() { return unzip; });
__webpack_require__.d(modules_namespaceObject, "zip", function() { return zip; });
__webpack_require__.d(modules_namespaceObject, "object", function() { return object_object; });
__webpack_require__.d(modules_namespaceObject, "range", function() { return range; });
__webpack_require__.d(modules_namespaceObject, "chunk", function() { return chunk; });
__webpack_require__.d(modules_namespaceObject, "mixin", function() { return mixin; });
__webpack_require__.d(modules_namespaceObject, "default", function() { return underscore_array_methods; });

// EXTERNAL MODULE: ./node_modules/underscore/modules/_setup.js
var _setup = __webpack_require__(14);

// CONCATENATED MODULE: ./node_modules/underscore/modules/restArguments.js
// Some functions take a variable number of arguments, or a few expected
// arguments at the beginning and then a variable number of values to operate
// on. This helper accumulates all remaining arguments past the function’s
// argument length (or an explicit `startIndex`), into an array that becomes
// the last argument. Similar to ES6’s "rest parameter".
function restArguments(func, startIndex) {
  startIndex = startIndex == null ? func.length - 1 : +startIndex;
  return function() {
    var length = Math.max(arguments.length - startIndex, 0),
        rest = Array(length),
        index = 0;
    for (; index < length; index++) {
      rest[index] = arguments[index + startIndex];
    }
    switch (startIndex) {
      case 0: return func.call(this, rest);
      case 1: return func.call(this, arguments[0], rest);
      case 2: return func.call(this, arguments[0], arguments[1], rest);
    }
    var args = Array(startIndex + 1);
    for (index = 0; index < startIndex; index++) {
      args[index] = arguments[index];
    }
    args[startIndex] = rest;
    return func.apply(this, args);
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isObject.js
// Is a given variable an object?
function isObject(obj) {
  var type = typeof obj;
  return type === 'function' || type === 'object' && !!obj;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isNull.js
// Is a given value equal to null?
function isNull(obj) {
  return obj === null;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isUndefined.js
// Is a given variable undefined?
function isUndefined(obj) {
  return obj === void 0;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isBoolean.js


// Is a given value a boolean?
function isBoolean(obj) {
  return obj === true || obj === false || _setup["t" /* toString */].call(obj) === '[object Boolean]';
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isElement.js
// Is a given value a DOM element?
function isElement(obj) {
  return !!(obj && obj.nodeType === 1);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_tagTester.js


// Internal function for creating a `toString`-based type tester.
function tagTester(name) {
  var tag = '[object ' + name + ']';
  return function(obj) {
    return _setup["t" /* toString */].call(obj) === tag;
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isString.js


/* harmony default export */ var isString = (tagTester('String'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isNumber.js


/* harmony default export */ var isNumber = (tagTester('Number'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isDate.js


/* harmony default export */ var isDate = (tagTester('Date'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isRegExp.js


/* harmony default export */ var isRegExp = (tagTester('RegExp'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isError.js


/* harmony default export */ var isError = (tagTester('Error'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isSymbol.js


/* harmony default export */ var isSymbol = (tagTester('Symbol'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isArrayBuffer.js


/* harmony default export */ var isArrayBuffer = (tagTester('ArrayBuffer'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isFunction.js



var isFunction = tagTester('Function');

// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
var nodelist = _setup["p" /* root */].document && _setup["p" /* root */].document.childNodes;
if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
  isFunction = function(obj) {
    return typeof obj == 'function' || false;
  };
}

/* harmony default export */ var modules_isFunction = (isFunction);

// CONCATENATED MODULE: ./node_modules/underscore/modules/_hasObjectTag.js


/* harmony default export */ var _hasObjectTag = (tagTester('Object'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/_stringTagBug.js



// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
// In IE 11, the most common among them, this problem also applies to
// `Map`, `WeakMap` and `Set`.
var hasStringTagBug = (
      _setup["s" /* supportsDataView */] && _hasObjectTag(new DataView(new ArrayBuffer(8)))
    ),
    isIE11 = (typeof Map !== 'undefined' && _hasObjectTag(new Map));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isDataView.js





var isDataView = tagTester('DataView');

// In IE 10 - Edge 13, we need a different heuristic
// to determine whether an object is a `DataView`.
function ie10IsDataView(obj) {
  return obj != null && modules_isFunction(obj.getInt8) && isArrayBuffer(obj.buffer);
}

/* harmony default export */ var modules_isDataView = (hasStringTagBug ? ie10IsDataView : isDataView);

// CONCATENATED MODULE: ./node_modules/underscore/modules/isArray.js



// Is a given value an array?
// Delegates to ECMA5's native `Array.isArray`.
/* harmony default export */ var isArray = (_setup["k" /* nativeIsArray */] || tagTester('Array'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/_has.js


// Internal function to check whether `key` is an own property name of `obj`.
function has(obj, key) {
  return obj != null && _setup["i" /* hasOwnProperty */].call(obj, key);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isArguments.js



var isArguments = tagTester('Arguments');

// Define a fallback version of the method in browsers (ahem, IE < 9), where
// there isn't any inspectable "Arguments" type.
(function() {
  if (!isArguments(arguments)) {
    isArguments = function(obj) {
      return has(obj, 'callee');
    };
  }
}());

/* harmony default export */ var modules_isArguments = (isArguments);

// CONCATENATED MODULE: ./node_modules/underscore/modules/isFinite.js



// Is a given object a finite number?
function isFinite_isFinite(obj) {
  return !isSymbol(obj) && Object(_setup["f" /* _isFinite */])(obj) && !isNaN(parseFloat(obj));
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isNaN.js



// Is the given value `NaN`?
function isNaN_isNaN(obj) {
  return isNumber(obj) && Object(_setup["g" /* _isNaN */])(obj);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/constant.js
// Predicate-generating function. Often useful outside of Underscore.
function constant(value) {
  return function() {
    return value;
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_createSizePropertyCheck.js


// Common internal logic for `isArrayLike` and `isBufferLike`.
function createSizePropertyCheck(getSizeProperty) {
  return function(collection) {
    var sizeProperty = getSizeProperty(collection);
    return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= _setup["b" /* MAX_ARRAY_INDEX */];
  }
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_shallowProperty.js
// Internal helper to generate a function to obtain property `key` from `obj`.
function shallowProperty(key) {
  return function(obj) {
    return obj == null ? void 0 : obj[key];
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_getByteLength.js


// Internal helper to obtain the `byteLength` property of an object.
/* harmony default export */ var _getByteLength = (shallowProperty('byteLength'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/_isBufferLike.js



// Internal helper to determine whether we should spend extensive checks against
// `ArrayBuffer` et al.
/* harmony default export */ var _isBufferLike = (createSizePropertyCheck(_getByteLength));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isTypedArray.js





// Is a given value a typed array?
var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
function isTypedArray(obj) {
  // `ArrayBuffer.isView` is the most future-proof, so use it when available.
  // Otherwise, fall back on the above regular expression.
  return _setup["l" /* nativeIsView */] ? (Object(_setup["l" /* nativeIsView */])(obj) && !modules_isDataView(obj)) :
                _isBufferLike(obj) && typedArrayPattern.test(_setup["t" /* toString */].call(obj));
}

/* harmony default export */ var modules_isTypedArray = (_setup["r" /* supportsArrayBuffer */] ? isTypedArray : constant(false));

// CONCATENATED MODULE: ./node_modules/underscore/modules/_getLength.js


// Internal helper to obtain the `length` property of an object.
/* harmony default export */ var _getLength = (shallowProperty('length'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/_collectNonEnumProps.js




// Internal helper to create a simple lookup structure.
// `collectNonEnumProps` used to depend on `_.contains`, but this led to
// circular imports. `emulatedSet` is a one-off solution that only works for
// arrays of strings.
function emulatedSet(keys) {
  var hash = {};
  for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
  return {
    contains: function(key) { return hash[key]; },
    push: function(key) {
      hash[key] = true;
      return keys.push(key);
    }
  };
}

// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
// be iterated by `for key in ...` and thus missed. Extends `keys` in place if
// needed.
function collectNonEnumProps(obj, keys) {
  keys = emulatedSet(keys);
  var nonEnumIdx = _setup["n" /* nonEnumerableProps */].length;
  var constructor = obj.constructor;
  var proto = modules_isFunction(constructor) && constructor.prototype || _setup["c" /* ObjProto */];

  // Constructor is a special case.
  var prop = 'constructor';
  if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);

  while (nonEnumIdx--) {
    prop = _setup["n" /* nonEnumerableProps */][nonEnumIdx];
    if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
      keys.push(prop);
    }
  }
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/keys.js





// Retrieve the names of an object's own properties.
// Delegates to **ECMAScript 5**'s native `Object.keys`.
function keys_keys(obj) {
  if (!isObject(obj)) return [];
  if (_setup["m" /* nativeKeys */]) return Object(_setup["m" /* nativeKeys */])(obj);
  var keys = [];
  for (var key in obj) if (has(obj, key)) keys.push(key);
  // Ahem, IE < 9.
  if (_setup["h" /* hasEnumBug */]) collectNonEnumProps(obj, keys);
  return keys;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isEmpty.js






// Is a given array, string, or object empty?
// An "empty" object has no enumerable own-properties.
function isEmpty(obj) {
  if (obj == null) return true;
  // Skip the more expensive `toString`-based type checks if `obj` has no
  // `.length`.
  var length = _getLength(obj);
  if (typeof length == 'number' && (
    isArray(obj) || isString(obj) || modules_isArguments(obj)
  )) return length === 0;
  return _getLength(keys_keys(obj)) === 0;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isMatch.js


// Returns whether an object has a given set of `key:value` pairs.
function isMatch(object, attrs) {
  var _keys = keys_keys(attrs), length = _keys.length;
  if (object == null) return !length;
  var obj = Object(object);
  for (var i = 0; i < length; i++) {
    var key = _keys[i];
    if (attrs[key] !== obj[key] || !(key in obj)) return false;
  }
  return true;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/underscore.js


// If Underscore is called as a function, it returns a wrapped object that can
// be used OO-style. This wrapper holds altered versions of all functions added
// through `_.mixin`. Wrapped objects may be chained.
function _(obj) {
  if (obj instanceof _) return obj;
  if (!(this instanceof _)) return new _(obj);
  this._wrapped = obj;
}

_.VERSION = _setup["e" /* VERSION */];

// Extracts the result from a wrapped and chained object.
_.prototype.value = function() {
  return this._wrapped;
};

// Provide unwrapping proxies for some methods used in engine operations
// such as arithmetic and JSON stringification.
_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;

_.prototype.toString = function() {
  return String(this._wrapped);
};

// CONCATENATED MODULE: ./node_modules/underscore/modules/_toBufferView.js


// Internal function to wrap or shallow-copy an ArrayBuffer,
// typed array or DataView to a new view, reusing the buffer.
function toBufferView(bufferSource) {
  return new Uint8Array(
    bufferSource.buffer || bufferSource,
    bufferSource.byteOffset || 0,
    _getByteLength(bufferSource)
  );
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/isEqual.js











// We use this string twice, so give it a name for minification.
var tagDataView = '[object DataView]';

// Internal recursive comparison function for `_.isEqual`.
function eq(a, b, aStack, bStack) {
  // Identical objects are equal. `0 === -0`, but they aren't identical.
  // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
  if (a === b) return a !== 0 || 1 / a === 1 / b;
  // `null` or `undefined` only equal to itself (strict comparison).
  if (a == null || b == null) return false;
  // `NaN`s are equivalent, but non-reflexive.
  if (a !== a) return b !== b;
  // Exhaust primitive checks
  var type = typeof a;
  if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
  return deepEq(a, b, aStack, bStack);
}

// Internal recursive comparison function for `_.isEqual`.
function deepEq(a, b, aStack, bStack) {
  // Unwrap any wrapped objects.
  if (a instanceof _) a = a._wrapped;
  if (b instanceof _) b = b._wrapped;
  // Compare `[[Class]]` names.
  var className = _setup["t" /* toString */].call(a);
  if (className !== _setup["t" /* toString */].call(b)) return false;
  // Work around a bug in IE 10 - Edge 13.
  if (hasStringTagBug && className == '[object Object]' && modules_isDataView(a)) {
    if (!modules_isDataView(b)) return false;
    className = tagDataView;
  }
  switch (className) {
    // These types are compared by value.
    case '[object RegExp]':
      // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
    case '[object String]':
      // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
      // equivalent to `new String("5")`.
      return '' + a === '' + b;
    case '[object Number]':
      // `NaN`s are equivalent, but non-reflexive.
      // Object(NaN) is equivalent to NaN.
      if (+a !== +a) return +b !== +b;
      // An `egal` comparison is performed for other numeric values.
      return +a === 0 ? 1 / +a === 1 / b : +a === +b;
    case '[object Date]':
    case '[object Boolean]':
      // Coerce dates and booleans to numeric primitive values. Dates are compared by their
      // millisecond representations. Note that invalid dates with millisecond representations
      // of `NaN` are not equivalent.
      return +a === +b;
    case '[object Symbol]':
      return _setup["d" /* SymbolProto */].valueOf.call(a) === _setup["d" /* SymbolProto */].valueOf.call(b);
    case '[object ArrayBuffer]':
    case tagDataView:
      // Coerce to typed array so we can fall through.
      return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
  }

  var areArrays = className === '[object Array]';
  if (!areArrays && modules_isTypedArray(a)) {
      var byteLength = _getByteLength(a);
      if (byteLength !== _getByteLength(b)) return false;
      if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
      areArrays = true;
  }
  if (!areArrays) {
    if (typeof a != 'object' || typeof b != 'object') return false;

    // Objects with different constructors are not equivalent, but `Object`s or `Array`s
    // from different frames are.
    var aCtor = a.constructor, bCtor = b.constructor;
    if (aCtor !== bCtor && !(modules_isFunction(aCtor) && aCtor instanceof aCtor &&
                             modules_isFunction(bCtor) && bCtor instanceof bCtor)
                        && ('constructor' in a && 'constructor' in b)) {
      return false;
    }
  }
  // Assume equality for cyclic structures. The algorithm for detecting cyclic
  // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.

  // Initializing stack of traversed objects.
  // It's done here since we only need them for objects and arrays comparison.
  aStack = aStack || [];
  bStack = bStack || [];
  var length = aStack.length;
  while (length--) {
    // Linear search. Performance is inversely proportional to the number of
    // unique nested structures.
    if (aStack[length] === a) return bStack[length] === b;
  }

  // Add the first object to the stack of traversed objects.
  aStack.push(a);
  bStack.push(b);

  // Recursively compare objects and arrays.
  if (areArrays) {
    // Compare array lengths to determine if a deep comparison is necessary.
    length = a.length;
    if (length !== b.length) return false;
    // Deep compare the contents, ignoring non-numeric properties.
    while (length--) {
      if (!eq(a[length], b[length], aStack, bStack)) return false;
    }
  } else {
    // Deep compare objects.
    var _keys = keys_keys(a), key;
    length = _keys.length;
    // Ensure that both objects contain the same number of properties before comparing deep equality.
    if (keys_keys(b).length !== length) return false;
    while (length--) {
      // Deep compare each member
      key = _keys[length];
      if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
    }
  }
  // Remove the first object from the stack of traversed objects.
  aStack.pop();
  bStack.pop();
  return true;
}

// Perform a deep comparison to check if two objects are equal.
function isEqual(a, b) {
  return eq(a, b);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/allKeys.js




// Retrieve all the enumerable property names of an object.
function allKeys(obj) {
  if (!isObject(obj)) return [];
  var keys = [];
  for (var key in obj) keys.push(key);
  // Ahem, IE < 9.
  if (_setup["h" /* hasEnumBug */]) collectNonEnumProps(obj, keys);
  return keys;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_methodFingerprint.js




// Since the regular `Object.prototype.toString` type tests don't work for
// some types in IE 11, we use a fingerprinting heuristic instead, based
// on the methods. It's not great, but it's the best we got.
// The fingerprint method lists are defined below.
function ie11fingerprint(methods) {
  var length = _getLength(methods);
  return function(obj) {
    if (obj == null) return false;
    // `Map`, `WeakMap` and `Set` have no enumerable keys.
    var keys = allKeys(obj);
    if (_getLength(keys)) return false;
    for (var i = 0; i < length; i++) {
      if (!modules_isFunction(obj[methods[i]])) return false;
    }
    // If we are testing against `WeakMap`, we need to ensure that
    // `obj` doesn't have a `forEach` method in order to distinguish
    // it from a regular `Map`.
    return methods !== weakMapMethods || !modules_isFunction(obj[forEachName]);
  };
}

// In the interest of compact minification, we write
// each string in the fingerprints only once.
var forEachName = 'forEach',
    hasName = 'has',
    commonInit = ['clear', 'delete'],
    mapTail = ['get', hasName, 'set'];

// `Map`, `WeakMap` and `Set` each have slightly different
// combinations of the above sublists.
var mapMethods = commonInit.concat(forEachName, mapTail),
    weakMapMethods = commonInit.concat(mapTail),
    setMethods = ['add'].concat(commonInit, forEachName, hasName);

// CONCATENATED MODULE: ./node_modules/underscore/modules/isMap.js




/* harmony default export */ var isMap = (isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isWeakMap.js




/* harmony default export */ var isWeakMap = (isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isSet.js




/* harmony default export */ var isSet = (isIE11 ? ie11fingerprint(setMethods) : tagTester('Set'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/isWeakSet.js


/* harmony default export */ var isWeakSet = (tagTester('WeakSet'));

// CONCATENATED MODULE: ./node_modules/underscore/modules/values.js


// Retrieve the values of an object's properties.
function values_values(obj) {
  var _keys = keys_keys(obj);
  var length = _keys.length;
  var values = Array(length);
  for (var i = 0; i < length; i++) {
    values[i] = obj[_keys[i]];
  }
  return values;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/pairs.js


// Convert an object into a list of `[key, value]` pairs.
// The opposite of `_.object` with one argument.
function pairs_pairs(obj) {
  var _keys = keys_keys(obj);
  var length = _keys.length;
  var pairs = Array(length);
  for (var i = 0; i < length; i++) {
    pairs[i] = [_keys[i], obj[_keys[i]]];
  }
  return pairs;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/invert.js


// Invert the keys and values of an object. The values must be serializable.
function invert(obj) {
  var result = {};
  var _keys = keys_keys(obj);
  for (var i = 0, length = _keys.length; i < length; i++) {
    result[obj[_keys[i]]] = _keys[i];
  }
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/functions.js


// Return a sorted list of the function names available on the object.
function functions(obj) {
  var names = [];
  for (var key in obj) {
    if (modules_isFunction(obj[key])) names.push(key);
  }
  return names.sort();
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_createAssigner.js
// An internal function for creating assigner functions.
function createAssigner(keysFunc, defaults) {
  return function(obj) {
    var length = arguments.length;
    if (defaults) obj = Object(obj);
    if (length < 2 || obj == null) return obj;
    for (var index = 1; index < length; index++) {
      var source = arguments[index],
          keys = keysFunc(source),
          l = keys.length;
      for (var i = 0; i < l; i++) {
        var key = keys[i];
        if (!defaults || obj[key] === void 0) obj[key] = source[key];
      }
    }
    return obj;
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/extend.js



// Extend a given object with all the properties in passed-in object(s).
/* harmony default export */ var extend = (createAssigner(allKeys));

// CONCATENATED MODULE: ./node_modules/underscore/modules/extendOwn.js



// Assigns a given object with all the own properties in the passed-in
// object(s).
// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
/* harmony default export */ var extendOwn = (createAssigner(keys_keys));

// CONCATENATED MODULE: ./node_modules/underscore/modules/defaults.js



// Fill in a given object with default properties.
/* harmony default export */ var defaults = (createAssigner(allKeys, true));

// CONCATENATED MODULE: ./node_modules/underscore/modules/_baseCreate.js



// Create a naked function reference for surrogate-prototype-swapping.
function ctor() {
  return function(){};
}

// An internal function for creating a new object that inherits from another.
function baseCreate(prototype) {
  if (!isObject(prototype)) return {};
  if (_setup["j" /* nativeCreate */]) return Object(_setup["j" /* nativeCreate */])(prototype);
  var Ctor = ctor();
  Ctor.prototype = prototype;
  var result = new Ctor;
  Ctor.prototype = null;
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/create.js



// Creates an object that inherits from the given prototype object.
// If additional properties are provided then they will be added to the
// created object.
function create(prototype, props) {
  var result = baseCreate(prototype);
  if (props) extendOwn(result, props);
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/clone.js




// Create a (shallow-cloned) duplicate of an object.
function clone(obj) {
  if (!isObject(obj)) return obj;
  return isArray(obj) ? obj.slice() : extend({}, obj);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/tap.js
// Invokes `interceptor` with the `obj` and then returns `obj`.
// The primary purpose of this method is to "tap into" a method chain, in
// order to perform operations on intermediate results within the chain.
function tap(obj, interceptor) {
  interceptor(obj);
  return obj;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/toPath.js



// Normalize a (deep) property `path` to array.
// Like `_.iteratee`, this function can be customized.
function toPath(path) {
  return isArray(path) ? path : [path];
}
_.toPath = toPath;

// CONCATENATED MODULE: ./node_modules/underscore/modules/_toPath.js



// Internal wrapper for `_.toPath` to enable minification.
// Similar to `cb` for `_.iteratee`.
function _toPath_toPath(path) {
  return _.toPath(path);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_deepGet.js
// Internal function to obtain a nested property in `obj` along `path`.
function deepGet(obj, path) {
  var length = path.length;
  for (var i = 0; i < length; i++) {
    if (obj == null) return void 0;
    obj = obj[path[i]];
  }
  return length ? obj : void 0;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/get.js




// Get the value of the (deep) property on `path` from `object`.
// If any property in `path` does not exist or if the value is
// `undefined`, return `defaultValue` instead.
// The `path` is normalized through `_.toPath`.
function get(object, path, defaultValue) {
  var value = deepGet(object, _toPath_toPath(path));
  return isUndefined(value) ? defaultValue : value;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/has.js



// Shortcut function for checking if an object has a given property directly on
// itself (in other words, not on a prototype). Unlike the internal `has`
// function, this public version can also traverse nested properties.
function has_has(obj, path) {
  path = _toPath_toPath(path);
  var length = path.length;
  for (var i = 0; i < length; i++) {
    var key = path[i];
    if (!has(obj, key)) return false;
    obj = obj[key];
  }
  return !!length;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/identity.js
// Keep the identity function around for default iteratees.
function identity(value) {
  return value;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/matcher.js



// Returns a predicate for checking whether an object has a given set of
// `key:value` pairs.
function matcher_matcher(attrs) {
  attrs = extendOwn({}, attrs);
  return function(obj) {
    return isMatch(obj, attrs);
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/property.js



// Creates a function that, when passed an object, will traverse that object’s
// properties down the given `path`, specified as an array of keys or indices.
function property(path) {
  path = _toPath_toPath(path);
  return function(obj) {
    return deepGet(obj, path);
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_optimizeCb.js
// Internal function that returns an efficient (for current engines) version
// of the passed-in callback, to be repeatedly applied in other Underscore
// functions.
function optimizeCb(func, context, argCount) {
  if (context === void 0) return func;
  switch (argCount == null ? 3 : argCount) {
    case 1: return function(value) {
      return func.call(context, value);
    };
    // The 2-argument case is omitted because we’re not using it.
    case 3: return function(value, index, collection) {
      return func.call(context, value, index, collection);
    };
    case 4: return function(accumulator, value, index, collection) {
      return func.call(context, accumulator, value, index, collection);
    };
  }
  return function() {
    return func.apply(context, arguments);
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_baseIteratee.js








// An internal function to generate callbacks that can be applied to each
// element in a collection, returning the desired result — either `_.identity`,
// an arbitrary callback, a property matcher, or a property accessor.
function baseIteratee(value, context, argCount) {
  if (value == null) return identity;
  if (modules_isFunction(value)) return optimizeCb(value, context, argCount);
  if (isObject(value) && !isArray(value)) return matcher_matcher(value);
  return property(value);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/iteratee.js



// External wrapper for our callback generator. Users may customize
// `_.iteratee` if they want additional predicate/iteratee shorthand styles.
// This abstraction hides the internal-only `argCount` argument.
function iteratee_iteratee(value, context) {
  return baseIteratee(value, context, Infinity);
}
_.iteratee = iteratee_iteratee;

// CONCATENATED MODULE: ./node_modules/underscore/modules/_cb.js




// The function we call internally to generate a callback. It invokes
// `_.iteratee` if overridden, otherwise `baseIteratee`.
function cb(value, context, argCount) {
  if (_.iteratee !== iteratee_iteratee) return _.iteratee(value, context);
  return baseIteratee(value, context, argCount);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/mapObject.js



// Returns the results of applying the `iteratee` to each element of `obj`.
// In contrast to `_.map` it returns an object.
function mapObject(obj, iteratee, context) {
  iteratee = cb(iteratee, context);
  var _keys = keys_keys(obj),
      length = _keys.length,
      results = {};
  for (var index = 0; index < length; index++) {
    var currentKey = _keys[index];
    results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
  }
  return results;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/noop.js
// Predicate-generating function. Often useful outside of Underscore.
function noop(){}

// CONCATENATED MODULE: ./node_modules/underscore/modules/propertyOf.js



// Generates a function for a given object that returns a given property.
function propertyOf(obj) {
  if (obj == null) return noop;
  return function(path) {
    return get(obj, path);
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/times.js


// Run a function **n** times.
function times(n, iteratee, context) {
  var accum = Array(Math.max(0, n));
  iteratee = optimizeCb(iteratee, context, 1);
  for (var i = 0; i < n; i++) accum[i] = iteratee(i);
  return accum;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/random.js
// Return a random integer between `min` and `max` (inclusive).
function random(min, max) {
  if (max == null) {
    max = min;
    min = 0;
  }
  return min + Math.floor(Math.random() * (max - min + 1));
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/now.js
// A (possibly faster) way to get the current timestamp as an integer.
/* harmony default export */ var now = (Date.now || function() {
  return new Date().getTime();
});

// CONCATENATED MODULE: ./node_modules/underscore/modules/_createEscaper.js


// Internal helper to generate functions for escaping and unescaping strings
// to/from HTML interpolation.
function createEscaper(map) {
  var escaper = function(match) {
    return map[match];
  };
  // Regexes for identifying a key that needs to be escaped.
  var source = '(?:' + keys_keys(map).join('|') + ')';
  var testRegexp = RegExp(source);
  var replaceRegexp = RegExp(source, 'g');
  return function(string) {
    string = string == null ? '' : '' + string;
    return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_escapeMap.js
// Internal list of HTML entities for escaping.
/* harmony default export */ var _escapeMap = ({
  '&': '&amp;',
  '<': '&lt;',
  '>': '&gt;',
  '"': '&quot;',
  "'": '&#x27;',
  '`': '&#x60;'
});

// CONCATENATED MODULE: ./node_modules/underscore/modules/escape.js



// Function for escaping strings to HTML interpolation.
/* harmony default export */ var modules_escape = (createEscaper(_escapeMap));

// CONCATENATED MODULE: ./node_modules/underscore/modules/_unescapeMap.js



// Internal list of HTML entities for unescaping.
/* harmony default export */ var _unescapeMap = (invert(_escapeMap));

// CONCATENATED MODULE: ./node_modules/underscore/modules/unescape.js



// Function for unescaping strings from HTML interpolation.
/* harmony default export */ var modules_unescape = (createEscaper(_unescapeMap));

// CONCATENATED MODULE: ./node_modules/underscore/modules/templateSettings.js


// By default, Underscore uses ERB-style template delimiters. Change the
// following template settings to use alternative delimiters.
/* harmony default export */ var templateSettings = (_.templateSettings = {
  evaluate: /<%([\s\S]+?)%>/g,
  interpolate: /<%=([\s\S]+?)%>/g,
  escape: /<%-([\s\S]+?)%>/g
});

// CONCATENATED MODULE: ./node_modules/underscore/modules/template.js




// When customizing `_.templateSettings`, if you don't want to define an
// interpolation, evaluation or escaping regex, we need one that is
// guaranteed not to match.
var noMatch = /(.)^/;

// Certain characters need to be escaped so that they can be put into a
// string literal.
var escapes = {
  "'": "'",
  '\\': '\\',
  '\r': 'r',
  '\n': 'n',
  '\u2028': 'u2028',
  '\u2029': 'u2029'
};

var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;

function escapeChar(match) {
  return '\\' + escapes[match];
}

// In order to prevent third-party code injection through
// `_.templateSettings.variable`, we test it against the following regular
// expression. It is intentionally a bit more liberal than just matching valid
// identifiers, but still prevents possible loopholes through defaults or
// destructuring assignment.
var bareIdentifier = /^\s*(\w|\$)+\s*$/;

// JavaScript micro-templating, similar to John Resig's implementation.
// Underscore templating handles arbitrary delimiters, preserves whitespace,
// and correctly escapes quotes within interpolated code.
// NB: `oldSettings` only exists for backwards compatibility.
function template_template(text, settings, oldSettings) {
  if (!settings && oldSettings) settings = oldSettings;
  settings = defaults({}, settings, _.templateSettings);

  // Combine delimiters into one regular expression via alternation.
  var matcher = RegExp([
    (settings.escape || noMatch).source,
    (settings.interpolate || noMatch).source,
    (settings.evaluate || noMatch).source
  ].join('|') + '|$', 'g');

  // Compile the template source, escaping string literals appropriately.
  var index = 0;
  var source = "__p+='";
  text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
    source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
    index = offset + match.length;

    if (escape) {
      source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
    } else if (interpolate) {
      source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
    } else if (evaluate) {
      source += "';\n" + evaluate + "\n__p+='";
    }

    // Adobe VMs need the match returned to produce the correct offset.
    return match;
  });
  source += "';\n";

  var argument = settings.variable;
  if (argument) {
    // Insure against third-party code injection. (CVE-2021-23358)
    if (!bareIdentifier.test(argument)) throw new Error(
      'variable is not a bare identifier: ' + argument
    );
  } else {
    // If a variable is not specified, place data values in local scope.
    source = 'with(obj||{}){\n' + source + '}\n';
    argument = 'obj';
  }

  source = "var __t,__p='',__j=Array.prototype.join," +
    "print=function(){__p+=__j.call(arguments,'');};\n" +
    source + 'return __p;\n';

  var render;
  try {
    render = new Function(argument, '_', source);
  } catch (e) {
    e.source = source;
    throw e;
  }

  var template = function(data) {
    return render.call(this, data, _);
  };

  // Provide the compiled source as a convenience for precompilation.
  template.source = 'function(' + argument + '){\n' + source + '}';

  return template;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/result.js



// Traverses the children of `obj` along `path`. If a child is a function, it
// is invoked with its parent as context. Returns the value of the final
// child, or `fallback` if any child is undefined.
function result_result(obj, path, fallback) {
  path = _toPath_toPath(path);
  var length = path.length;
  if (!length) {
    return modules_isFunction(fallback) ? fallback.call(obj) : fallback;
  }
  for (var i = 0; i < length; i++) {
    var prop = obj == null ? void 0 : obj[path[i]];
    if (prop === void 0) {
      prop = fallback;
      i = length; // Ensure we don't continue iterating.
    }
    obj = modules_isFunction(prop) ? prop.call(obj) : prop;
  }
  return obj;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/uniqueId.js
// Generate a unique integer id (unique within the entire client session).
// Useful for temporary DOM ids.
var idCounter = 0;
function uniqueId(prefix) {
  var id = ++idCounter + '';
  return prefix ? prefix + id : id;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/chain.js


// Start chaining a wrapped Underscore object.
function chain(obj) {
  var instance = _(obj);
  instance._chain = true;
  return instance;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_executeBound.js



// Internal function to execute `sourceFunc` bound to `context` with optional
// `args`. Determines whether to execute a function as a constructor or as a
// normal function.
function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
  if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
  var self = baseCreate(sourceFunc.prototype);
  var result = sourceFunc.apply(self, args);
  if (isObject(result)) return result;
  return self;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/partial.js




// Partially apply a function by creating a version that has had some of its
// arguments pre-filled, without changing its dynamic `this` context. `_` acts
// as a placeholder by default, allowing any combination of arguments to be
// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
var partial = restArguments(function(func, boundArgs) {
  var placeholder = partial.placeholder;
  var bound = function() {
    var position = 0, length = boundArgs.length;
    var args = Array(length);
    for (var i = 0; i < length; i++) {
      args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
    }
    while (position < arguments.length) args.push(arguments[position++]);
    return executeBound(func, bound, this, this, args);
  };
  return bound;
});

partial.placeholder = _;
/* harmony default export */ var modules_partial = (partial);

// CONCATENATED MODULE: ./node_modules/underscore/modules/bind.js




// Create a function bound to a given object (assigning `this`, and arguments,
// optionally).
/* harmony default export */ var bind = (restArguments(function(func, context, args) {
  if (!modules_isFunction(func)) throw new TypeError('Bind must be called on a function');
  var bound = restArguments(function(callArgs) {
    return executeBound(func, bound, context, this, args.concat(callArgs));
  });
  return bound;
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/_isArrayLike.js



// Internal helper for collection methods to determine whether a collection
// should be iterated as an array or as an object.
// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
/* harmony default export */ var _isArrayLike = (createSizePropertyCheck(_getLength));

// CONCATENATED MODULE: ./node_modules/underscore/modules/_flatten.js





// Internal implementation of a recursive `flatten` function.
function flatten(input, depth, strict, output) {
  output = output || [];
  if (!depth && depth !== 0) {
    depth = Infinity;
  } else if (depth <= 0) {
    return output.concat(input);
  }
  var idx = output.length;
  for (var i = 0, length = _getLength(input); i < length; i++) {
    var value = input[i];
    if (_isArrayLike(value) && (isArray(value) || modules_isArguments(value))) {
      // Flatten current level of array or arguments object.
      if (depth > 1) {
        flatten(value, depth - 1, strict, output);
        idx = output.length;
      } else {
        var j = 0, len = value.length;
        while (j < len) output[idx++] = value[j++];
      }
    } else if (!strict) {
      output[idx++] = value;
    }
  }
  return output;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/bindAll.js




// Bind a number of an object's methods to that object. Remaining arguments
// are the method names to be bound. Useful for ensuring that all callbacks
// defined on an object belong to it.
/* harmony default export */ var bindAll = (restArguments(function(obj, keys) {
  keys = flatten(keys, false, false);
  var index = keys.length;
  if (index < 1) throw new Error('bindAll must be passed function names');
  while (index--) {
    var key = keys[index];
    obj[key] = bind(obj[key], obj);
  }
  return obj;
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/memoize.js


// Memoize an expensive function by storing its results.
function memoize_memoize(func, hasher) {
  var memoize = function(key) {
    var cache = memoize.cache;
    var address = '' + (hasher ? hasher.apply(this, arguments) : key);
    if (!has(cache, address)) cache[address] = func.apply(this, arguments);
    return cache[address];
  };
  memoize.cache = {};
  return memoize;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/delay.js


// Delays a function for the given number of milliseconds, and then calls
// it with the arguments supplied.
/* harmony default export */ var delay = (restArguments(function(func, wait, args) {
  return setTimeout(function() {
    return func.apply(null, args);
  }, wait);
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/defer.js




// Defers a function, scheduling it to run after the current call stack has
// cleared.
/* harmony default export */ var defer = (modules_partial(delay, _, 1));

// CONCATENATED MODULE: ./node_modules/underscore/modules/throttle.js


// Returns a function, that, when invoked, will only be triggered at most once
// during a given window of time. Normally, the throttled function will run
// as much as it can, without ever going more than once per `wait` duration;
// but if you'd like to disable the execution on the leading edge, pass
// `{leading: false}`. To disable execution on the trailing edge, ditto.
function throttle(func, wait, options) {
  var timeout, context, args, result;
  var previous = 0;
  if (!options) options = {};

  var later = function() {
    previous = options.leading === false ? 0 : now();
    timeout = null;
    result = func.apply(context, args);
    if (!timeout) context = args = null;
  };

  var throttled = function() {
    var _now = now();
    if (!previous && options.leading === false) previous = _now;
    var remaining = wait - (_now - previous);
    context = this;
    args = arguments;
    if (remaining <= 0 || remaining > wait) {
      if (timeout) {
        clearTimeout(timeout);
        timeout = null;
      }
      previous = _now;
      result = func.apply(context, args);
      if (!timeout) context = args = null;
    } else if (!timeout && options.trailing !== false) {
      timeout = setTimeout(later, remaining);
    }
    return result;
  };

  throttled.cancel = function() {
    clearTimeout(timeout);
    previous = 0;
    timeout = context = args = null;
  };

  return throttled;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/debounce.js



// When a sequence of calls of the returned function ends, the argument
// function is triggered. The end of a sequence is defined by the `wait`
// parameter. If `immediate` is passed, the argument function will be
// triggered at the beginning of the sequence instead of at the end.
function debounce(func, wait, immediate) {
  var timeout, previous, args, result, context;

  var later = function() {
    var passed = now() - previous;
    if (wait > passed) {
      timeout = setTimeout(later, wait - passed);
    } else {
      timeout = null;
      if (!immediate) result = func.apply(context, args);
      // This check is needed because `func` can recursively invoke `debounced`.
      if (!timeout) args = context = null;
    }
  };

  var debounced = restArguments(function(_args) {
    context = this;
    args = _args;
    previous = now();
    if (!timeout) {
      timeout = setTimeout(later, wait);
      if (immediate) result = func.apply(context, args);
    }
    return result;
  });

  debounced.cancel = function() {
    clearTimeout(timeout);
    timeout = args = context = null;
  };

  return debounced;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/wrap.js


// Returns the first function passed as an argument to the second,
// allowing you to adjust arguments, run code before and after, and
// conditionally execute the original function.
function wrap(func, wrapper) {
  return modules_partial(wrapper, func);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/negate.js
// Returns a negated version of the passed-in predicate.
function negate(predicate) {
  return function() {
    return !predicate.apply(this, arguments);
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/compose.js
// Returns a function that is the composition of a list of functions, each
// consuming the return value of the function that follows.
function compose() {
  var args = arguments;
  var start = args.length - 1;
  return function() {
    var i = start;
    var result = args[start].apply(this, arguments);
    while (i--) result = args[i].call(this, result);
    return result;
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/after.js
// Returns a function that will only be executed on and after the Nth call.
function after(times, func) {
  return function() {
    if (--times < 1) {
      return func.apply(this, arguments);
    }
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/before.js
// Returns a function that will only be executed up to (but not including) the
// Nth call.
function before(times, func) {
  var memo;
  return function() {
    if (--times > 0) {
      memo = func.apply(this, arguments);
    }
    if (times <= 1) func = null;
    return memo;
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/once.js



// Returns a function that will be executed at most one time, no matter how
// often you call it. Useful for lazy initialization.
/* harmony default export */ var once = (modules_partial(before, 2));

// CONCATENATED MODULE: ./node_modules/underscore/modules/findKey.js



// Returns the first key on an object that passes a truth test.
function findKey(obj, predicate, context) {
  predicate = cb(predicate, context);
  var _keys = keys_keys(obj), key;
  for (var i = 0, length = _keys.length; i < length; i++) {
    key = _keys[i];
    if (predicate(obj[key], key, obj)) return key;
  }
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_createPredicateIndexFinder.js



// Internal function to generate `_.findIndex` and `_.findLastIndex`.
function createPredicateIndexFinder(dir) {
  return function(array, predicate, context) {
    predicate = cb(predicate, context);
    var length = _getLength(array);
    var index = dir > 0 ? 0 : length - 1;
    for (; index >= 0 && index < length; index += dir) {
      if (predicate(array[index], index, array)) return index;
    }
    return -1;
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/findIndex.js


// Returns the first index on an array-like that passes a truth test.
/* harmony default export */ var findIndex = (createPredicateIndexFinder(1));

// CONCATENATED MODULE: ./node_modules/underscore/modules/findLastIndex.js


// Returns the last index on an array-like that passes a truth test.
/* harmony default export */ var findLastIndex = (createPredicateIndexFinder(-1));

// CONCATENATED MODULE: ./node_modules/underscore/modules/sortedIndex.js



// Use a comparator function to figure out the smallest index at which
// an object should be inserted so as to maintain order. Uses binary search.
function sortedIndex_sortedIndex(array, obj, iteratee, context) {
  iteratee = cb(iteratee, context, 1);
  var value = iteratee(obj);
  var low = 0, high = _getLength(array);
  while (low < high) {
    var mid = Math.floor((low + high) / 2);
    if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
  }
  return low;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_createIndexFinder.js




// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
function createIndexFinder(dir, predicateFind, sortedIndex) {
  return function(array, item, idx) {
    var i = 0, length = _getLength(array);
    if (typeof idx == 'number') {
      if (dir > 0) {
        i = idx >= 0 ? idx : Math.max(idx + length, i);
      } else {
        length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
      }
    } else if (sortedIndex && idx && length) {
      idx = sortedIndex(array, item);
      return array[idx] === item ? idx : -1;
    }
    if (item !== item) {
      idx = predicateFind(_setup["q" /* slice */].call(array, i, length), isNaN_isNaN);
      return idx >= 0 ? idx + i : -1;
    }
    for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
      if (array[idx] === item) return idx;
    }
    return -1;
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/indexOf.js




// Return the position of the first occurrence of an item in an array,
// or -1 if the item is not included in the array.
// If the array is large and already in sort order, pass `true`
// for **isSorted** to use binary search.
/* harmony default export */ var indexOf = (createIndexFinder(1, findIndex, sortedIndex_sortedIndex));

// CONCATENATED MODULE: ./node_modules/underscore/modules/lastIndexOf.js



// Return the position of the last occurrence of an item in an array,
// or -1 if the item is not included in the array.
/* harmony default export */ var lastIndexOf = (createIndexFinder(-1, findLastIndex));

// CONCATENATED MODULE: ./node_modules/underscore/modules/find.js




// Return the first value which passes a truth test.
function find(obj, predicate, context) {
  var keyFinder = _isArrayLike(obj) ? findIndex : findKey;
  var key = keyFinder(obj, predicate, context);
  if (key !== void 0 && key !== -1) return obj[key];
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/findWhere.js



// Convenience version of a common use case of `_.find`: getting the first
// object containing specific `key:value` pairs.
function findWhere(obj, attrs) {
  return find(obj, matcher_matcher(attrs));
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/each.js




// The cornerstone for collection functions, an `each`
// implementation, aka `forEach`.
// Handles raw objects in addition to array-likes. Treats all
// sparse array-likes as if they were dense.
function each(obj, iteratee, context) {
  iteratee = optimizeCb(iteratee, context);
  var i, length;
  if (_isArrayLike(obj)) {
    for (i = 0, length = obj.length; i < length; i++) {
      iteratee(obj[i], i, obj);
    }
  } else {
    var _keys = keys_keys(obj);
    for (i = 0, length = _keys.length; i < length; i++) {
      iteratee(obj[_keys[i]], _keys[i], obj);
    }
  }
  return obj;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/map.js




// Return the results of applying the iteratee to each element.
function map_map(obj, iteratee, context) {
  iteratee = cb(iteratee, context);
  var _keys = !_isArrayLike(obj) && keys_keys(obj),
      length = (_keys || obj).length,
      results = Array(length);
  for (var index = 0; index < length; index++) {
    var currentKey = _keys ? _keys[index] : index;
    results[index] = iteratee(obj[currentKey], currentKey, obj);
  }
  return results;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_createReduce.js




// Internal helper to create a reducing function, iterating left or right.
function createReduce(dir) {
  // Wrap code that reassigns argument variables in a separate function than
  // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
  var reducer = function(obj, iteratee, memo, initial) {
    var _keys = !_isArrayLike(obj) && keys_keys(obj),
        length = (_keys || obj).length,
        index = dir > 0 ? 0 : length - 1;
    if (!initial) {
      memo = obj[_keys ? _keys[index] : index];
      index += dir;
    }
    for (; index >= 0 && index < length; index += dir) {
      var currentKey = _keys ? _keys[index] : index;
      memo = iteratee(memo, obj[currentKey], currentKey, obj);
    }
    return memo;
  };

  return function(obj, iteratee, memo, context) {
    var initial = arguments.length >= 3;
    return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/reduce.js


// **Reduce** builds up a single result from a list of values, aka `inject`,
// or `foldl`.
/* harmony default export */ var reduce = (createReduce(1));

// CONCATENATED MODULE: ./node_modules/underscore/modules/reduceRight.js


// The right-associative version of reduce, also known as `foldr`.
/* harmony default export */ var reduceRight = (createReduce(-1));

// CONCATENATED MODULE: ./node_modules/underscore/modules/filter.js



// Return all the elements that pass a truth test.
function filter(obj, predicate, context) {
  var results = [];
  predicate = cb(predicate, context);
  each(obj, function(value, index, list) {
    if (predicate(value, index, list)) results.push(value);
  });
  return results;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/reject.js




// Return all the elements for which a truth test fails.
function reject(obj, predicate, context) {
  return filter(obj, negate(cb(predicate)), context);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/every.js




// Determine whether all of the elements pass a truth test.
function every(obj, predicate, context) {
  predicate = cb(predicate, context);
  var _keys = !_isArrayLike(obj) && keys_keys(obj),
      length = (_keys || obj).length;
  for (var index = 0; index < length; index++) {
    var currentKey = _keys ? _keys[index] : index;
    if (!predicate(obj[currentKey], currentKey, obj)) return false;
  }
  return true;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/some.js




// Determine if at least one element in the object passes a truth test.
function some(obj, predicate, context) {
  predicate = cb(predicate, context);
  var _keys = !_isArrayLike(obj) && keys_keys(obj),
      length = (_keys || obj).length;
  for (var index = 0; index < length; index++) {
    var currentKey = _keys ? _keys[index] : index;
    if (predicate(obj[currentKey], currentKey, obj)) return true;
  }
  return false;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/contains.js




// Determine if the array or object contains a given item (using `===`).
function contains(obj, item, fromIndex, guard) {
  if (!_isArrayLike(obj)) obj = values_values(obj);
  if (typeof fromIndex != 'number' || guard) fromIndex = 0;
  return indexOf(obj, item, fromIndex) >= 0;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/invoke.js






// Invoke a method (with arguments) on every item in a collection.
/* harmony default export */ var invoke = (restArguments(function(obj, path, args) {
  var contextPath, func;
  if (modules_isFunction(path)) {
    func = path;
  } else {
    path = _toPath_toPath(path);
    contextPath = path.slice(0, -1);
    path = path[path.length - 1];
  }
  return map_map(obj, function(context) {
    var method = func;
    if (!method) {
      if (contextPath && contextPath.length) {
        context = deepGet(context, contextPath);
      }
      if (context == null) return void 0;
      method = context[path];
    }
    return method == null ? method : method.apply(context, args);
  });
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/pluck.js



// Convenience version of a common use case of `_.map`: fetching a property.
function pluck(obj, key) {
  return map_map(obj, property(key));
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/where.js



// Convenience version of a common use case of `_.filter`: selecting only
// objects containing specific `key:value` pairs.
function where(obj, attrs) {
  return filter(obj, matcher_matcher(attrs));
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/max.js





// Return the maximum element (or element-based computation).
function max(obj, iteratee, context) {
  var result = -Infinity, lastComputed = -Infinity,
      value, computed;
  if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
    obj = _isArrayLike(obj) ? obj : values_values(obj);
    for (var i = 0, length = obj.length; i < length; i++) {
      value = obj[i];
      if (value != null && value > result) {
        result = value;
      }
    }
  } else {
    iteratee = cb(iteratee, context);
    each(obj, function(v, index, list) {
      computed = iteratee(v, index, list);
      if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
        result = v;
        lastComputed = computed;
      }
    });
  }
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/min.js





// Return the minimum element (or element-based computation).
function min(obj, iteratee, context) {
  var result = Infinity, lastComputed = Infinity,
      value, computed;
  if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
    obj = _isArrayLike(obj) ? obj : values_values(obj);
    for (var i = 0, length = obj.length; i < length; i++) {
      value = obj[i];
      if (value != null && value < result) {
        result = value;
      }
    }
  } else {
    iteratee = cb(iteratee, context);
    each(obj, function(v, index, list) {
      computed = iteratee(v, index, list);
      if (computed < lastComputed || computed === Infinity && result === Infinity) {
        result = v;
        lastComputed = computed;
      }
    });
  }
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/sample.js






// Sample **n** random values from a collection using the modern version of the
// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
// If **n** is not specified, returns a single random element.
// The internal `guard` argument allows it to work with `_.map`.
function sample_sample(obj, n, guard) {
  if (n == null || guard) {
    if (!_isArrayLike(obj)) obj = values_values(obj);
    return obj[random(obj.length - 1)];
  }
  var sample = _isArrayLike(obj) ? clone(obj) : values_values(obj);
  var length = _getLength(sample);
  n = Math.max(Math.min(n, length), 0);
  var last = length - 1;
  for (var index = 0; index < n; index++) {
    var rand = random(index, last);
    var temp = sample[index];
    sample[index] = sample[rand];
    sample[rand] = temp;
  }
  return sample.slice(0, n);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/shuffle.js


// Shuffle a collection.
function shuffle(obj) {
  return sample_sample(obj, Infinity);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/sortBy.js




// Sort the object's values by a criterion produced by an iteratee.
function sortBy(obj, iteratee, context) {
  var index = 0;
  iteratee = cb(iteratee, context);
  return pluck(map_map(obj, function(value, key, list) {
    return {
      value: value,
      index: index++,
      criteria: iteratee(value, key, list)
    };
  }).sort(function(left, right) {
    var a = left.criteria;
    var b = right.criteria;
    if (a !== b) {
      if (a > b || a === void 0) return 1;
      if (a < b || b === void 0) return -1;
    }
    return left.index - right.index;
  }), 'value');
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_group.js



// An internal function used for aggregate "group by" operations.
function group(behavior, partition) {
  return function(obj, iteratee, context) {
    var result = partition ? [[], []] : {};
    iteratee = cb(iteratee, context);
    each(obj, function(value, index) {
      var key = iteratee(value, index, obj);
      behavior(result, value, key);
    });
    return result;
  };
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/groupBy.js



// Groups the object's values by a criterion. Pass either a string attribute
// to group by, or a function that returns the criterion.
/* harmony default export */ var groupBy = (group(function(result, value, key) {
  if (has(result, key)) result[key].push(value); else result[key] = [value];
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/indexBy.js


// Indexes the object's values by a criterion, similar to `_.groupBy`, but for
// when you know that your index values will be unique.
/* harmony default export */ var indexBy = (group(function(result, value, key) {
  result[key] = value;
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/countBy.js



// Counts instances of an object that group by a certain criterion. Pass
// either a string attribute to count by, or a function that returns the
// criterion.
/* harmony default export */ var countBy = (group(function(result, value, key) {
  if (has(result, key)) result[key]++; else result[key] = 1;
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/partition.js


// Split a collection into two arrays: one whose elements all pass the given
// truth test, and one whose elements all do not pass the truth test.
/* harmony default export */ var modules_partition = (group(function(result, value, pass) {
  result[pass ? 0 : 1].push(value);
}, true));

// CONCATENATED MODULE: ./node_modules/underscore/modules/toArray.js








// Safely create a real, live array from anything iterable.
var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
function toArray(obj) {
  if (!obj) return [];
  if (isArray(obj)) return _setup["q" /* slice */].call(obj);
  if (isString(obj)) {
    // Keep surrogate pair characters together.
    return obj.match(reStrSymbol);
  }
  if (_isArrayLike(obj)) return map_map(obj, identity);
  return values_values(obj);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/size.js



// Return the number of elements in a collection.
function size(obj) {
  if (obj == null) return 0;
  return _isArrayLike(obj) ? obj.length : keys_keys(obj).length;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_keyInObj.js
// Internal `_.pick` helper function to determine whether `key` is an enumerable
// property name of `obj`.
function keyInObj(value, key, obj) {
  return key in obj;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/pick.js







// Return a copy of the object only containing the allowed properties.
/* harmony default export */ var pick = (restArguments(function(obj, keys) {
  var result = {}, iteratee = keys[0];
  if (obj == null) return result;
  if (modules_isFunction(iteratee)) {
    if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
    keys = allKeys(obj);
  } else {
    iteratee = keyInObj;
    keys = flatten(keys, false, false);
    obj = Object(obj);
  }
  for (var i = 0, length = keys.length; i < length; i++) {
    var key = keys[i];
    var value = obj[key];
    if (iteratee(value, key, obj)) result[key] = value;
  }
  return result;
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/omit.js








// Return a copy of the object without the disallowed properties.
/* harmony default export */ var omit = (restArguments(function(obj, keys) {
  var iteratee = keys[0], context;
  if (modules_isFunction(iteratee)) {
    iteratee = negate(iteratee);
    if (keys.length > 1) context = keys[1];
  } else {
    keys = map_map(flatten(keys, false, false), String);
    iteratee = function(value, key) {
      return !contains(keys, key);
    };
  }
  return pick(obj, iteratee, context);
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/initial.js


// Returns everything but the last entry of the array. Especially useful on
// the arguments object. Passing **n** will return all the values in
// the array, excluding the last N.
function initial_initial(array, n, guard) {
  return _setup["q" /* slice */].call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/first.js


// Get the first element of an array. Passing **n** will return the first N
// values in the array. The **guard** check allows it to work with `_.map`.
function first(array, n, guard) {
  if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  if (n == null || guard) return array[0];
  return initial_initial(array, array.length - n);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/rest.js


// Returns everything but the first entry of the `array`. Especially useful on
// the `arguments` object. Passing an **n** will return the rest N values in the
// `array`.
function rest_rest(array, n, guard) {
  return _setup["q" /* slice */].call(array, n == null || guard ? 1 : n);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/last.js


// Get the last element of an array. Passing **n** will return the last N
// values in the array.
function last_last(array, n, guard) {
  if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
  if (n == null || guard) return array[array.length - 1];
  return rest_rest(array, Math.max(0, array.length - n));
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/compact.js


// Trim out all falsy values from an array.
function compact(array) {
  return filter(array, Boolean);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/flatten.js


// Flatten out an array, either recursively (by default), or up to `depth`.
// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
function flatten_flatten(array, depth) {
  return flatten(array, depth, false);
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/difference.js





// Take the difference between one array and a number of other arrays.
// Only the elements present in just the first array will remain.
/* harmony default export */ var difference = (restArguments(function(array, rest) {
  rest = flatten(rest, true, true);
  return filter(array, function(value){
    return !contains(rest, value);
  });
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/without.js



// Return a version of the array that does not contain the specified value(s).
/* harmony default export */ var without = (restArguments(function(array, otherArrays) {
  return difference(array, otherArrays);
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/uniq.js





// Produce a duplicate-free version of the array. If the array has already
// been sorted, you have the option of using a faster algorithm.
// The faster algorithm will not work with an iteratee if the iteratee
// is not a one-to-one function, so providing an iteratee will disable
// the faster algorithm.
function uniq(array, isSorted, iteratee, context) {
  if (!isBoolean(isSorted)) {
    context = iteratee;
    iteratee = isSorted;
    isSorted = false;
  }
  if (iteratee != null) iteratee = cb(iteratee, context);
  var result = [];
  var seen = [];
  for (var i = 0, length = _getLength(array); i < length; i++) {
    var value = array[i],
        computed = iteratee ? iteratee(value, i, array) : value;
    if (isSorted && !iteratee) {
      if (!i || seen !== computed) result.push(value);
      seen = computed;
    } else if (iteratee) {
      if (!contains(seen, computed)) {
        seen.push(computed);
        result.push(value);
      }
    } else if (!contains(result, value)) {
      result.push(value);
    }
  }
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/union.js




// Produce an array that contains the union: each distinct element from all of
// the passed-in arrays.
/* harmony default export */ var union = (restArguments(function(arrays) {
  return uniq(flatten(arrays, true, true));
}));

// CONCATENATED MODULE: ./node_modules/underscore/modules/intersection.js



// Produce an array that contains every item shared between all the
// passed-in arrays.
function intersection(array) {
  var result = [];
  var argsLength = arguments.length;
  for (var i = 0, length = _getLength(array); i < length; i++) {
    var item = array[i];
    if (contains(result, item)) continue;
    var j;
    for (j = 1; j < argsLength; j++) {
      if (!contains(arguments[j], item)) break;
    }
    if (j === argsLength) result.push(item);
  }
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/unzip.js




// Complement of zip. Unzip accepts an array of arrays and groups
// each array's elements on shared indices.
function unzip(array) {
  var length = array && max(array, _getLength).length || 0;
  var result = Array(length);

  for (var index = 0; index < length; index++) {
    result[index] = pluck(array, index);
  }
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/zip.js



// Zip together multiple lists into a single array -- elements that share
// an index go together.
/* harmony default export */ var zip = (restArguments(unzip));

// CONCATENATED MODULE: ./node_modules/underscore/modules/object.js


// Converts lists into objects. Pass either a single array of `[key, value]`
// pairs, or two parallel arrays of the same length -- one of keys, and one of
// the corresponding values. Passing by pairs is the reverse of `_.pairs`.
function object_object(list, values) {
  var result = {};
  for (var i = 0, length = _getLength(list); i < length; i++) {
    if (values) {
      result[list[i]] = values[i];
    } else {
      result[list[i][0]] = list[i][1];
    }
  }
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/range.js
// Generate an integer Array containing an arithmetic progression. A port of
// the native Python `range()` function. See
// [the Python documentation](https://docs.python.org/library/functions.html#range).
function range(start, stop, step) {
  if (stop == null) {
    stop = start || 0;
    start = 0;
  }
  if (!step) {
    step = stop < start ? -1 : 1;
  }

  var length = Math.max(Math.ceil((stop - start) / step), 0);
  var range = Array(length);

  for (var idx = 0; idx < length; idx++, start += step) {
    range[idx] = start;
  }

  return range;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/chunk.js


// Chunk a single array into multiple arrays, each containing `count` or fewer
// items.
function chunk(array, count) {
  if (count == null || count < 1) return [];
  var result = [];
  var i = 0, length = array.length;
  while (i < length) {
    result.push(_setup["q" /* slice */].call(array, i, i += count));
  }
  return result;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/_chainResult.js


// Helper function to continue chaining intermediate results.
function chainResult(instance, obj) {
  return instance._chain ? _(obj).chain() : obj;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/mixin.js






// Add your own custom functions to the Underscore object.
function mixin(obj) {
  each(functions(obj), function(name) {
    var func = _[name] = obj[name];
    _.prototype[name] = function() {
      var args = [this._wrapped];
      _setup["o" /* push */].apply(args, arguments);
      return chainResult(this, func.apply(_, args));
    };
  });
  return _;
}

// CONCATENATED MODULE: ./node_modules/underscore/modules/underscore-array-methods.js





// Add all mutator `Array` functions to the wrapper.
each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
  var method = _setup["a" /* ArrayProto */][name];
  _.prototype[name] = function() {
    var obj = this._wrapped;
    if (obj != null) {
      method.apply(obj, arguments);
      if ((name === 'shift' || name === 'splice') && obj.length === 0) {
        delete obj[0];
      }
    }
    return chainResult(this, obj);
  };
});

// Add all accessor `Array` functions to the wrapper.
each(['concat', 'join', 'slice'], function(name) {
  var method = _setup["a" /* ArrayProto */][name];
  _.prototype[name] = function() {
    var obj = this._wrapped;
    if (obj != null) obj = method.apply(obj, arguments);
    return chainResult(this, obj);
  };
});

/* harmony default export */ var underscore_array_methods = (_);

// CONCATENATED MODULE: ./node_modules/underscore/modules/index.js
// Named Exports
// =============

//     Underscore.js 1.13.1
//     https://underscorejs.org
//     (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
//     Underscore may be freely distributed under the MIT license.

// Baseline setup.



// Object Functions
// ----------------
// Our most fundamental functions operate on any JavaScript object.
// Most functions in Underscore depend on at least one function in this section.

// A group of functions that check the types of core JavaScript values.
// These are often informally referred to as the "isType" functions.



























// Functions that treat an object as a dictionary of key-value pairs.
















// Utility Functions
// -----------------
// A bit of a grab bag: Predicate-generating functions for use with filters and
// loops, string escaping and templating, create random numbers and unique ids,
// and functions that facilitate Underscore's chaining and iteration conventions.



















// Function (ahem) Functions
// -------------------------
// These functions take a function as an argument and return a new function
// as the result. Also known as higher-order functions.















// Finders
// -------
// Functions that extract (the position of) a single element from an object
// or array based on some criterion.









// Collection Functions
// --------------------
// Functions that work on any collection of elements: either an array, or
// an object of key-value pairs.
























// `_.pick` and `_.omit` are actually object functions, but we put
// them here in order to create a more natural reading order in the
// monolithic build as they depend on `_.contains`.



// Array Functions
// ---------------
// Functions that operate on arrays (and array-likes) only, because they’re
// expressed in terms of operations on an ordered list of values.

















// OOP
// ---
// These modules support the "object-oriented" calling style. See also
// `underscore.js` and `index-default.js`.



// CONCATENATED MODULE: ./node_modules/underscore/modules/index-default.js
// Default Export
// ==============
// In this module, we mix our bundled exports into the `_` object and export
// the result. This is analogous to setting `module.exports = _` in CommonJS.
// Hence, this module is also the entry point of our UMD bundle and the package
// entry point for CommonJS and AMD users. In other words, this is (the source
// of) the module you are interfacing with when you do any of the following:
//
// ```js
// // CommonJS
// var _ = require('underscore');
//
// // AMD
// define(['underscore'], function(_) {...});
//
// // UMD in the browser
// // _ is available as a global variable
// ```



// Add all of the Underscore functions to the wrapper object.
var index_default__ = mixin(modules_namespaceObject);
// Legacy Node.js API.
index_default__._ = index_default__;
// Export the Underscore API.
/* harmony default export */ var index_default = (index_default__);

// CONCATENATED MODULE: ./node_modules/underscore/modules/index-all.js
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "default", function() { return index_default; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "VERSION", function() { return _setup["e" /* VERSION */]; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "restArguments", function() { return restArguments; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isNull", function() { return isNull; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isUndefined", function() { return isUndefined; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isBoolean", function() { return isBoolean; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isElement", function() { return isElement; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isString", function() { return isString; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isNumber", function() { return isNumber; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isRegExp", function() { return isRegExp; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isError", function() { return isError; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isSymbol", function() { return isSymbol; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isArrayBuffer", function() { return isArrayBuffer; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isDataView", function() { return modules_isDataView; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isFunction", function() { return modules_isFunction; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isArguments", function() { return modules_isArguments; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isFinite", function() { return isFinite_isFinite; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isNaN", function() { return isNaN_isNaN; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isTypedArray", function() { return modules_isTypedArray; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isMatch", function() { return isMatch; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isEqual", function() { return isEqual; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isMap", function() { return isMap; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isWeakMap", function() { return isWeakMap; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isSet", function() { return isSet; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isWeakSet", function() { return isWeakSet; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "keys", function() { return keys_keys; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "allKeys", function() { return allKeys; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "values", function() { return values_values; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs_pairs; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "invert", function() { return invert; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "functions", function() { return functions; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "methods", function() { return functions; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "extend", function() { return extend; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "extendOwn", function() { return extendOwn; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "assign", function() { return extendOwn; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "defaults", function() { return defaults; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "create", function() { return create; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "clone", function() { return clone; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "get", function() { return get; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "has", function() { return has_has; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "mapObject", function() { return mapObject; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "constant", function() { return constant; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "toPath", function() { return toPath; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "property", function() { return property; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "propertyOf", function() { return propertyOf; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "matcher", function() { return matcher_matcher; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "matches", function() { return matcher_matcher; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "times", function() { return times; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "random", function() { return random; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "now", function() { return now; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "escape", function() { return modules_escape; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "unescape", function() { return modules_unescape; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "templateSettings", function() { return templateSettings; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "template", function() { return template_template; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "result", function() { return result_result; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "uniqueId", function() { return uniqueId; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "chain", function() { return chain; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "iteratee", function() { return iteratee_iteratee; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "partial", function() { return modules_partial; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "bind", function() { return bind; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "bindAll", function() { return bindAll; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "memoize", function() { return memoize_memoize; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "wrap", function() { return wrap; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "negate", function() { return negate; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "after", function() { return after; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "before", function() { return before; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "once", function() { return once; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "findKey", function() { return findKey; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "findLastIndex", function() { return findLastIndex; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "sortedIndex", function() { return sortedIndex_sortedIndex; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "indexOf", function() { return indexOf; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "lastIndexOf", function() { return lastIndexOf; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "find", function() { return find; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "detect", function() { return find; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "findWhere", function() { return findWhere; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "each", function() { return each; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "forEach", function() { return each; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "map", function() { return map_map; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "collect", function() { return map_map; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "foldl", function() { return reduce; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "inject", function() { return reduce; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "reduceRight", function() { return reduceRight; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "foldr", function() { return reduceRight; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "select", function() { return filter; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "reject", function() { return reject; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "every", function() { return every; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "all", function() { return every; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "some", function() { return some; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "any", function() { return some; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "contains", function() { return contains; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "includes", function() { return contains; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "include", function() { return contains; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "invoke", function() { return invoke; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "where", function() { return where; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "max", function() { return max; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "min", function() { return min; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "shuffle", function() { return shuffle; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "sample", function() { return sample_sample; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "sortBy", function() { return sortBy; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "indexBy", function() { return indexBy; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "countBy", function() { return countBy; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "partition", function() { return modules_partition; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "size", function() { return size; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "pick", function() { return pick; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "omit", function() { return omit; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "first", function() { return first; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "head", function() { return first; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "take", function() { return first; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "initial", function() { return initial_initial; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "last", function() { return last_last; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "rest", function() { return rest_rest; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "tail", function() { return rest_rest; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "drop", function() { return rest_rest; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "compact", function() { return compact; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "flatten", function() { return flatten_flatten; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "without", function() { return without; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "uniq", function() { return uniq; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "unique", function() { return uniq; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "union", function() { return union; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "intersection", function() { return intersection; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "difference", function() { return difference; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "unzip", function() { return unzip; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "transpose", function() { return unzip; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "object", function() { return object_object; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "range", function() { return range; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "chunk", function() { return chunk; });
/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "mixin", function() { return mixin; });
// ESM Exports
// ===========
// This module is the package entry point for ES module users. In other words,
// it is the module they are interfacing with when they import from the whole
// package instead of from a submodule, like this:
//
// ```js
// import { map } from 'underscore';
// ```
//
// The difference with `./index-default`, which is the package entry point for
// CommonJS, AMD and UMD users, is purely technical. In ES modules, named and
// default exports are considered to be siblings, so when you have a default
// export, its properties are not automatically available as named exports. For
// this reason, we re-export the named exports in addition to providing the same
// default export as in `./index-default`.




/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var Assert_1 = __webpack_require__(5);
var Logger_1 = __webpack_require__(9);
var JQueryutils_1 = __webpack_require__(77);
var Utils_1 = __webpack_require__(4);
var DeviceUtils_1 = __webpack_require__(24);
/**
 * This is essentially a helper class for dom manipulation.<br/>
 * This is intended to provide some basic functionality normally offered by jQuery.<br/>
 * To minimize the multiple jQuery conflict we have while integrating in various system, we implemented the very small subset that the framework needs.<br/>
 * See {@link $$}, which is a function that wraps this class constructor, for less verbose code.
 */
var Dom = /** @class */ (function () {
    /**
     * Create a new Dom object with the given HTMLElement
     * @param el The HTMLElement to wrap in a Dom object
     */
    function Dom(el) {
        Assert_1.Assert.exists(el);
        this.el = el;
    }
    /**
     * Helper function to quickly create an HTMLElement
     * @param type The type of the element (e.g. div, span)
     * @param props The props (id, className, attributes) of the element<br/>
     * Can be either specified in dashed-case strings ('my-attribute') or camelCased keys (myAttribute),
     * the latter of which will automatically get replaced to dash-case.
     * @param innerHTML The contents of the new HTMLElement, either in string form or as another HTMLElement
     */
    Dom.createElement = function (type, props) {
        var children = [];
        for (var _i = 2; _i < arguments.length; _i++) {
            children[_i - 2] = arguments[_i];
        }
        var elem = document.createElement(type);
        for (var key in props) {
            if (key === 'className') {
                elem.className = props['className'];
            }
            else {
                var attr = key.indexOf('-') !== -1 ? key : Utils_1.Utils.toDashCase(key);
                elem.setAttribute(attr, props[key]);
            }
        }
        underscore_1.each(children, function (child) {
            if (child instanceof HTMLElement) {
                elem.appendChild(child);
            }
            else if (underscore_1.isString(child)) {
                elem.innerHTML += child;
            }
            else if (child instanceof Dom) {
                elem.appendChild(child.el);
            }
        });
        return elem;
    };
    /**
     * Adds the element to the children of the current element
     * @param element The element to append
     * @returns {string}
     */
    Dom.prototype.append = function (element) {
        this.el.appendChild(element);
    };
    /**
     * Get the css value of the specified property.<br/>
     * @param property The property
     * @returns {string}
     */
    Dom.prototype.css = function (property) {
        if (this.el.style[property]) {
            return this.el.style[property];
        }
        return window.getComputedStyle(this.el).getPropertyValue(property);
    };
    /**
     * Get or set the text content of the HTMLElement.<br/>
     * @param txt Optional. If given, this will set the text content of the element. If not, will return the text content.
     * @returns {string}
     */
    Dom.prototype.text = function (txt) {
        if (Utils_1.Utils.isUndefined(txt)) {
            return this.el.innerText || this.el.textContent;
        }
        else {
            if (this.el.innerText != undefined) {
                this.el.innerText = txt;
            }
            else if (this.el.textContent != undefined) {
                this.el.textContent = txt;
            }
        }
    };
    /**
     * Performant way to transform a NodeList to an array of HTMLElement, for manipulation<br/>
     * http://jsperf.com/nodelist-to-array/72
     * @param nodeList a {NodeList} to convert to an array
     * @returns {HTMLElement[]}
     */
    Dom.nodeListToArray = function (nodeList) {
        var i = nodeList.length;
        var arr = new Array(i);
        while (i--) {
            arr[i] = nodeList.item(i);
        }
        return arr;
    };
    /**
     * Focuses on an element.
     * @param preserveScroll Whether or not to scroll the page to the focused element.
     */
    Dom.prototype.focus = function (preserveScroll) {
        if (DeviceUtils_1.DeviceUtils.getDeviceName() === 'IE') {
            var pageXOffset_1 = window.pageXOffset, pageYOffset_1 = window.pageYOffset;
            this.el.focus();
            if (preserveScroll) {
                window.scrollTo(pageXOffset_1, pageYOffset_1);
            }
        }
        else {
            this.el.focus({ preventScroll: preserveScroll });
        }
    };
    /**
     * Empty (remove all child) from the element;
     */
    Dom.prototype.empty = function () {
        while (this.el.firstChild) {
            this.removeChild(this.el.firstChild);
        }
    };
    Dom.prototype.removeChild = function (child) {
        var oldParent = child.parentNode;
        try {
            this.el.removeChild(child);
        }
        catch (e) {
            if (e.name !== 'NotFoundError') {
                throw e;
            }
            if (oldParent === child.parentNode) {
                throw e;
            }
        }
    };
    /**
     * Empty the element and all childs from the dom;
     */
    Dom.prototype.remove = function () {
        if (this.el.parentNode) {
            this.el.parentNode.removeChild(this.el);
        }
    };
    /**
     * Show the element by setting display to block;
     */
    Dom.prototype.show = function () {
        this.el.style.display = 'block';
        $$(this.el).setAttribute('aria-hidden', 'false');
    };
    /**
     * Hide the element;
     */
    Dom.prototype.hide = function () {
        this.el.style.display = 'none';
        $$(this.el).setAttribute('aria-hidden', 'true');
    };
    /**
     * Show the element by setting display to an empty string.
     */
    Dom.prototype.unhide = function () {
        this.el.style.display = '';
        $$(this.el).setAttribute('aria-hidden', 'false');
    };
    /**
     * Toggle the element visibility.<br/>
     * Optional visible parameter, if specified will set the element visibility
     * @param visible Optional parameter to display or hide the element
     */
    Dom.prototype.toggle = function (visible) {
        if (visible === undefined) {
            if (this.el.style.display == 'block') {
                this.hide();
            }
            else {
                this.show();
            }
        }
        else {
            if (visible) {
                this.show();
            }
            else {
                this.hide();
            }
        }
    };
    /**
     * Tries to determine if an element is "visible", in a generic manner.
     *
     * This is not meant to be a "foolproof" method, but only a superficial "best effort" detection is performed.
     */
    Dom.prototype.isVisible = function () {
        if (this.css('display') === 'none') {
            return false;
        }
        if (this.css('visibility') === 'hidden') {
            return false;
        }
        if (this.hasClass('coveo-tab-disabled')) {
            return false;
        }
        if (this.hasClass('coveo-hidden')) {
            return false;
        }
        if (this.hasClass('coveo-hidden-dependant-facet')) {
            return false;
        }
        return true;
    };
    /**
     * Returns the value of the specified attribute.
     * @param name The name of the attribute
     */
    Dom.prototype.getAttribute = function (name) {
        return this.el.getAttribute(name);
    };
    /**
     * Sets the value of the specified attribute.
     * @param name The name of the attribute
     * @param value The value to set
     */
    Dom.prototype.setAttribute = function (name, value) {
        this.el.setAttribute(name, value);
    };
    /**
     * Find a child element, given a CSS selector
     * @param selector A CSS selector, can be a .className or #id
     * @returns {HTMLElement}
     */
    Dom.prototype.find = function (selector) {
        return this.el.querySelector(selector);
    };
    /**
     * Check if the element match the selector.<br/>
     * The selector can be a class, an id or a tag.<br/>
     * Eg : .is('.foo') or .is('#foo') or .is('div').
     */
    Dom.prototype.is = function (selector) {
        if (this.el.tagName.toLowerCase() == selector.toLowerCase()) {
            return true;
        }
        if (selector[0] == '.') {
            if (this.hasClass(selector.substr(1))) {
                return true;
            }
        }
        if (selector[0] == '#') {
            if (this.el.getAttribute('id') == selector.substr(1)) {
                return true;
            }
        }
        return false;
    };
    /**
     * Get the first element that matches the classname by testing the element itself and traversing up through its ancestors in the DOM tree.
     *
     * Stops at the body of the document
     * @param className A CSS classname
     */
    Dom.prototype.closest = function (className) {
        return this.traverseAncestorForClass(this.el, className);
    };
    /**
     * Get the first element that matches the classname by testing the element itself and traversing up through its ancestors in the DOM tree.
     *
     * Stops at the body of the document
     * @returns {any}
     */
    Dom.prototype.parent = function (className) {
        if (this.el.parentElement == undefined) {
            return undefined;
        }
        return this.traverseAncestorForClass(this.el.parentElement, className);
    };
    /**
     *  Get all the ancestors of the current element that match the given className
     *
     *  Return an empty array if none found.
     * @param className
     * @returns {HTMLElement[]}
     */
    Dom.prototype.parents = function (className) {
        var parentsFound = [];
        var parentFound = this.parent(className);
        while (parentFound) {
            parentsFound.push(parentFound);
            parentFound = new Dom(parentFound).parent(className);
        }
        return parentsFound;
    };
    /**
     * Return all children
     * @returns {HTMLElement[]}
     */
    Dom.prototype.children = function () {
        return Dom.nodeListToArray(this.el.children);
    };
    /**
     * Return all siblings
     * @returns {HTMLElement[]}
     */
    Dom.prototype.siblings = function (selector) {
        var sibs = [];
        var currentElement = this.el.parentNode.firstChild;
        for (; currentElement; currentElement = currentElement.nextSibling) {
            if (currentElement != this.el) {
                if (this.matches(currentElement, selector) || !selector) {
                    sibs.push(currentElement);
                }
            }
        }
        return sibs;
    };
    Dom.prototype.matches = function (element, selector) {
        var all = document.querySelectorAll(selector);
        for (var i = 0; i < all.length; i++) {
            if (all[i] === element) {
                return true;
            }
        }
        return false;
    };
    /**
     * Find all children that match the given CSS selector
     * @param selector A CSS selector, can be a .className
     * @returns {HTMLElement[]}
     */
    Dom.prototype.findAll = function (selector) {
        return Dom.nodeListToArray(this.el.querySelectorAll(selector));
    };
    /**
     * Find the child elements using a className
     * @param className Class of the childs elements to find
     * @returns {HTMLElement[]}
     */
    Dom.prototype.findClass = function (className) {
        if ('getElementsByClassName' in this.el) {
            return Dom.nodeListToArray(this.el.getElementsByClassName(className));
        }
    };
    /**
     * Find an element using an ID
     * @param id ID of the element to find
     * @returns {HTMLElement}
     */
    Dom.prototype.findId = function (id) {
        return document.getElementById(id);
    };
    Dom.prototype.addClass = function (className) {
        var _this = this;
        if (underscore_1.isArray(className)) {
            underscore_1.each(className, function (name) {
                _this.addClass(name);
            });
        }
        else {
            if (!this.hasClass(className)) {
                if (this.el.className) {
                    this.el.className += ' ' + className;
                }
                else {
                    this.el.className = className;
                }
            }
        }
    };
    /**
     * Remove the class on the element. Works even if the element does not possess the class.
     * @param className Classname to remove on the the element
     */
    Dom.prototype.removeClass = function (className) {
        this.el.className = this.el.className.replace(new RegExp("(^|\\s)" + className + "(\\s|$)", 'g'), '$1').trim();
    };
    /**
     * Toggle the class on the element.
     * @param className Classname to toggle
     * @param swtch If true, add the class regardless and if false, remove the class
     */
    Dom.prototype.toggleClass = function (className, swtch) {
        if (Utils_1.Utils.isNullOrUndefined(swtch)) {
            if (this.hasClass(className)) {
                this.removeClass(className);
            }
            else {
                this.addClass(className);
            }
        }
        else {
            if (swtch) {
                this.addClass(className);
            }
            else {
                this.removeClass(className);
            }
        }
    };
    /**
     * Sets the inner html of the element
     * @param html The html to set
     */
    Dom.prototype.setHtml = function (html) {
        this.el.innerHTML = html;
    };
    /**
     * Return an array with all the classname on the element. Empty array if the element has not classname
     * @returns {any|Array}
     */
    Dom.prototype.getClass = function () {
        // SVG elements got a className property, but it's not a string, it's an object
        var className = this.getAttribute('class');
        if (className && className.match) {
            return className.match(Dom.CLASS_NAME_REGEX) || [];
        }
        else {
            return [];
        }
    };
    /**
     * Check if the element has the given class name
     * @param className Classname to verify
     * @returns {boolean}
     */
    Dom.prototype.hasClass = function (className) {
        return underscore_1.contains(this.getClass(), className);
    };
    /**
     * Detach the element from the DOM.
     */
    Dom.prototype.detach = function () {
        this.el.parentElement && this.el.parentElement.removeChild(this.el);
    };
    /**
     * Insert the current node after the given reference node
     * @param refNode
     */
    Dom.prototype.insertAfter = function (refNode) {
        refNode.parentNode && refNode.parentNode.insertBefore(this.el, refNode.nextSibling);
    };
    /**
     * Insert the current node before the given reference node
     * @param refNode
     */
    Dom.prototype.insertBefore = function (refNode) {
        refNode.parentNode && refNode.parentNode.insertBefore(this.el, refNode);
    };
    /**
     * Insert the given node as the first child of the current node
     * @param toPrepend
     */
    Dom.prototype.prepend = function (toPrepend) {
        if (this.el.firstChild) {
            new Dom(toPrepend).insertBefore(this.el.firstChild);
        }
        else {
            this.el.appendChild(toPrepend);
        }
    };
    Dom.prototype.on = function (type, eventHandle) {
        var _this = this;
        if (underscore_1.isArray(type)) {
            underscore_1.each(type, function (t) {
                _this.on(t, eventHandle);
            });
        }
        else {
            var modifiedType = this.processEventTypeToBeJQueryCompatible(type);
            var jq = JQueryutils_1.JQueryUtils.getJQuery();
            if (this.shouldUseJQueryEvent()) {
                jq(this.el).on(modifiedType, eventHandle);
            }
            else if (this.el.addEventListener) {
                var fn = function (e) {
                    eventHandle(e, e.detail);
                };
                Dom.handlers.set(eventHandle, fn);
                // Mark touch events as passive for performance reasons:
                // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
                if (modifiedType && modifiedType.indexOf('touch') != -1) {
                    this.el.addEventListener(modifiedType, fn, { passive: true });
                }
                else {
                    this.el.addEventListener(modifiedType, fn, false);
                }
            }
            else if (this.el['on']) {
                this.el['on']('on' + modifiedType, eventHandle);
            }
        }
    };
    Dom.prototype.one = function (type, eventHandle) {
        var _this = this;
        if (underscore_1.isArray(type)) {
            underscore_1.each(type, function (t) {
                _this.one(t, eventHandle);
            });
        }
        else {
            var modifiedType_1 = this.processEventTypeToBeJQueryCompatible(type);
            var once_1 = function (e, args) {
                _this.off(modifiedType_1, once_1);
                return eventHandle(e, args);
            };
            this.on(modifiedType_1, once_1);
        }
    };
    Dom.prototype.off = function (type, eventHandle) {
        var _this = this;
        if (underscore_1.isArray(type)) {
            underscore_1.each(type, function (t) {
                _this.off(t, eventHandle);
            });
        }
        else {
            var modifiedType = this.processEventTypeToBeJQueryCompatible(type);
            var jq = JQueryutils_1.JQueryUtils.getJQuery();
            if (this.shouldUseJQueryEvent()) {
                jq(this.el).off(modifiedType, eventHandle);
            }
            else if (this.el.removeEventListener) {
                var handler = Dom.handlers.get(eventHandle);
                if (handler) {
                    this.el.removeEventListener(modifiedType, handler, false);
                }
            }
            else if (this.el['off']) {
                this.el['off']('on' + modifiedType, eventHandle);
            }
        }
    };
    /**
     * Trigger an event on the element.
     * @param type The event type to trigger
     * @param data
     */
    Dom.prototype.trigger = function (type, data) {
        var modifiedType = this.processEventTypeToBeJQueryCompatible(type);
        if (this.shouldUseJQueryEvent()) {
            JQueryutils_1.JQueryUtils.getJQuery()(this.el).trigger(modifiedType, data);
        }
        else if (window['CustomEvent'] !== undefined) {
            var event_1 = new CustomEvent(modifiedType, { detail: data, bubbles: true });
            this.el.dispatchEvent(event_1);
        }
        else {
            try {
                this.el.dispatchEvent(this.buildIE11CustomEvent(modifiedType, data));
            }
            catch (_a) {
                this.oldBrowserError();
            }
        }
    };
    /**
     * Check if the element is "empty" (has no innerHTML content). Whitespace is considered empty</br>
     * @returns {boolean}
     */
    Dom.prototype.isEmpty = function () {
        return Dom.ONLY_WHITE_SPACE_REGEX.test(this.el.innerHTML);
    };
    /**
     * Check if the element is not a locked node (`{ toString(): string }`) and thus have base element properties.
     * @returns {boolean}
     */
    Dom.prototype.isValid = function () {
        return this.el != null && this.el.getAttribute != undefined;
    };
    /**
     * Check if the element is a descendant of parent
     * @param other
     */
    Dom.prototype.isDescendant = function (parent) {
        var node = this.el.parentNode;
        while (node != null) {
            if (node == parent) {
                return true;
            }
            node = node.parentNode;
        }
        return false;
    };
    /**
     * Replace the current element with the other element, then detach the current element
     * @param otherElem
     */
    Dom.prototype.replaceWith = function (otherElem) {
        var parent = this.el.parentNode;
        if (parent) {
            new Dom(otherElem).insertAfter(this.el);
        }
        this.detach();
    };
    // based on http://api.jquery.com/position/
    /**
     * Return the position relative to the offset parent.
     */
    Dom.prototype.position = function () {
        var offsetParent = this.offsetParent();
        var offset = this.offset();
        var parentOffset = { top: 0, left: 0 };
        if (!$$(offsetParent).is('html')) {
            parentOffset = $$(offsetParent).offset();
        }
        var borderTopWidth = parseInt($$(offsetParent).css('borderTopWidth'));
        var borderLeftWidth = parseInt($$(offsetParent).css('borderLeftWidth'));
        borderTopWidth = isNaN(borderTopWidth) ? 0 : borderTopWidth;
        borderLeftWidth = isNaN(borderLeftWidth) ? 0 : borderLeftWidth;
        parentOffset = {
            top: parentOffset.top + borderTopWidth,
            left: parentOffset.left + borderLeftWidth
        };
        var marginTop = parseInt(this.css('marginTop'));
        var marginLeft = parseInt(this.css('marginLeft'));
        marginTop = isNaN(marginTop) ? 0 : marginTop;
        marginLeft = isNaN(marginLeft) ? 0 : marginLeft;
        return {
            top: offset.top - parentOffset.top - marginTop,
            left: offset.left - parentOffset.left - marginLeft
        };
    };
    // based on https://api.jquery.com/offsetParent/
    /**
     * Returns the offset parent. The offset parent is the closest parent that is positioned.
     * An element is positioned when its position property is not 'static', which is the default.
     */
    Dom.prototype.offsetParent = function () {
        var offsetParent = this.el.offsetParent;
        while (offsetParent instanceof HTMLElement && $$(offsetParent).css('position') === 'static') {
            // Will break out if it stumbles upon an non-HTMLElement and return documentElement
            offsetParent = offsetParent.offsetParent;
        }
        if (!(offsetParent instanceof HTMLElement)) {
            return document.documentElement;
        }
        return offsetParent;
    };
    // based on http://api.jquery.com/offset/
    /**
     * Return the position relative to the document.
     */
    Dom.prototype.offset = function () {
        // In <=IE11, calling getBoundingClientRect on a disconnected node throws an error
        if (!this.el.getClientRects().length) {
            return { top: 0, left: 0 };
        }
        var rect = this.el.getBoundingClientRect();
        if (rect.width || rect.height) {
            var doc = this.el.ownerDocument;
            var docElem = doc.documentElement;
            return {
                top: rect.top + window.pageYOffset - docElem.clientTop,
                left: rect.left + window.pageXOffset - docElem.clientLeft
            };
        }
        return rect;
    };
    /**
     * Returns the offset width of the element
     */
    Dom.prototype.width = function () {
        return this.el.offsetWidth;
    };
    /**
     * Returns the offset height of the element
     */
    Dom.prototype.height = function () {
        return this.el.offsetHeight;
    };
    /**
     * Clone the node
     * @param deep true if the children of the node should also be cloned, or false to clone only the specified node.
     * @returns {Dom}
     */
    Dom.prototype.clone = function (deep) {
        if (deep === void 0) { deep = false; }
        return $$(this.el.cloneNode(deep));
    };
    /**
     * Determine if an element support a particular native DOM event.
     * @param eventName The event to evaluate. Eg: touchstart, touchend, click, scroll.
     */
    Dom.prototype.canHandleEvent = function (eventName) {
        var eventToEvaluate = "on" + eventName;
        var isSupported = eventToEvaluate in this.el;
        // This is a protection against false negative.
        // Some browser will incorrectly report that the event is not supported at this point
        // To make sure, we need to try and set a fake function as a property on the element,
        // and then check if it got hooked properly as a 'function' or as something else, meaning
        // the property is really not defined on the element.
        if (!isSupported && this.el.setAttribute) {
            this.el.setAttribute(eventToEvaluate, 'return;');
            isSupported = typeof this.el[eventToEvaluate] == 'function';
            this.el.removeAttribute(eventToEvaluate);
        }
        return isSupported;
    };
    Dom.prototype.buildIE11CustomEvent = function (type, data) {
        var event = document.createEvent('CustomEvent');
        event.initCustomEvent(type, true, true, data);
        return event;
    };
    Dom.prototype.shouldUseJQueryEvent = function () {
        return JQueryutils_1.JQueryUtils.getJQuery() && !Dom.useNativeJavaScriptEvents;
    };
    Dom.prototype.processEventTypeToBeJQueryCompatible = function (event) {
        // From https://api.jquery.com/on/
        // [...]
        // > In addition, the .trigger() method can trigger both standard browser event names and custom event names to call attached handlers. Event names should only contain alphanumerics, underscore, and colon characters.
        if (event) {
            return event.replace(/[^a-zA-Z0-9\:\_]/g, '');
        }
        return event;
    };
    Dom.prototype.traverseAncestorForClass = function (current, className) {
        if (current === void 0) { current = this.el; }
        if (className.indexOf('.') == 0) {
            className = className.substr(1);
        }
        var found = false;
        while (!found) {
            if ($$(current).hasClass(className)) {
                found = true;
            }
            if (current.tagName.toLowerCase() == 'body') {
                break;
            }
            if (current.parentElement == null) {
                break;
            }
            if (!found) {
                current = current.parentElement;
            }
        }
        if (found) {
            return current;
        }
        return undefined;
    };
    Dom.prototype.oldBrowserError = function () {
        new Logger_1.Logger(this).error('CANNOT TRIGGER EVENT FOR OLDER BROWSER');
    };
    Dom.CLASS_NAME_REGEX = /-?[_a-zA-Z]+[_a-zA-Z0-9-]*/g;
    Dom.ONLY_WHITE_SPACE_REGEX = /^\s*$/;
    /**
     * Whether to always register, remove, and trigger events using standard JavaScript rather than attempting to use jQuery first.
     * @type boolean
     */
    Dom.useNativeJavaScriptEvents = false;
    Dom.handlers = new WeakMap();
    return Dom;
}());
exports.Dom = Dom;
var Win = /** @class */ (function () {
    function Win(win) {
        this.win = win;
    }
    Win.prototype.height = function () {
        return this.win.innerHeight;
    };
    Win.prototype.width = function () {
        return this.win.innerWidth;
    };
    Win.prototype.scrollY = function () {
        return this.supportPageOffset()
            ? this.win.pageYOffset
            : this.isCSS1Compat()
                ? this.win.document.documentElement.scrollTop
                : this.win.document.body.scrollTop;
    };
    Win.prototype.scrollX = function () {
        return this.supportPageOffset()
            ? window.pageXOffset
            : this.isCSS1Compat()
                ? document.documentElement.scrollLeft
                : document.body.scrollLeft;
    };
    Win.prototype.isCSS1Compat = function () {
        return (this.win.document.compatMode || '') === 'CSS1Compat';
    };
    Win.prototype.supportPageOffset = function () {
        return this.win.pageXOffset !== undefined;
    };
    return Win;
}());
exports.Win = Win;
var Doc = /** @class */ (function () {
    function Doc(doc) {
        this.doc = doc;
    }
    Doc.prototype.height = function () {
        var body = this.doc.body;
        return Math.max(body.scrollHeight, body.offsetHeight);
    };
    Doc.prototype.width = function () {
        var body = this.doc.body;
        return Math.max(body.scrollWidth, body.offsetWidth);
    };
    return Doc;
}());
exports.Doc = Doc;
function $$() {
    var args = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
    }
    if (args.length === 1 && args[0] instanceof Dom) {
        return args[0];
    }
    else if (args.length === 1 && !underscore_1.isString(args[0])) {
        return new Dom(args[0]);
    }
    else {
        return new Dom(Dom.createElement.apply(Dom, args));
    }
}
exports.$$ = $$;


/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var QueryController_1 = __webpack_require__(44);
var InitializationEvents_1 = __webpack_require__(17);
var Assert_1 = __webpack_require__(5);
var Logger_1 = __webpack_require__(9);
var ComponentOptionsModel_1 = __webpack_require__(28);
var ComponentStateModel_1 = __webpack_require__(79);
var QueryStateModel_1 = __webpack_require__(13);
var Dom_1 = __webpack_require__(1);
var HashUtils_1 = __webpack_require__(42);
var JQueryutils_1 = __webpack_require__(77);
var Utils_1 = __webpack_require__(4);
var AnalyticsActionListMeta_1 = __webpack_require__(10);
var Component_1 = __webpack_require__(7);
var SearchInterface_1 = __webpack_require__(19);
var InitializationHelper_1 = __webpack_require__(455);
var RegisteredNamedMethods_1 = __webpack_require__(30);
/**
 * The main purpose of this class is to initialize the framework (a.k.a the code executed when calling `Coveo.init`).<br/>
 * It's also in charge or registering the available components, as well as the method that we expost to the global Coveo scope.<br/>
 * For example, the `Coveo.executeQuery` function will be registed in this class by the {@link QueryController}.
 */
var Initialization = /** @class */ (function () {
    function Initialization() {
    }
    /**
     * Register a new set of options for a given element.<br/>
     * When the element is eventually initialized as a component, those options will be used / merged to create the final option set to use for this component.<br/>
     * Note that this function should not normally be called directly, but instead using the global `Coveo.options` function
     * @param element
     * @param options
     */
    Initialization.registerDefaultOptions = function (element, options) {
        var existing = element['CoveoDefaultOptions'] || {};
        var updated = Utils_1.Utils.extendDeep(existing, options);
        element['CoveoDefaultOptions'] = updated;
    };
    Initialization.resolveDefaultOptions = function (element, options) {
        var optionsForThisElement = element['CoveoDefaultOptions'];
        var optionsSoFar;
        if (Utils_1.Utils.exists(optionsForThisElement)) {
            optionsSoFar = Utils_1.Utils.extendDeep(optionsForThisElement, options);
        }
        else {
            optionsSoFar = options;
        }
        if (element.parentElement) {
            return Initialization.resolveDefaultOptions(element.parentElement, optionsSoFar);
        }
        else {
            return optionsSoFar;
        }
    };
    /**
     * Register a new Component to be recognized by the framework.
     * This essentially mean that when we call `Coveo.init`, the Initialization class will scan the DOM for known component (which have registed themselves with this call) and create a new component on each element.
     *
     * This is meant to register the component to be loaded "eagerly" (Immediately available when the UI scripts are included)
     * @param componentClass
     */
    Initialization.registerAutoCreateComponent = function (componentClass) {
        Assert_1.Assert.exists(componentClass);
        Assert_1.Assert.exists(componentClass.ID);
        Assert_1.Assert.doesNotExists(Initialization.namedMethods[componentClass.ID]);
        if (!_.contains(Initialization.registeredComponents, componentClass.ID)) {
            Initialization.registeredComponents.push(componentClass.ID);
            if (componentClass.aliases) {
                Initialization.componentAliases[componentClass.ID] = componentClass.aliases;
            }
        }
        if (EagerInitialization.eagerlyLoadedComponents[componentClass.ID] == null) {
            EagerInitialization.eagerlyLoadedComponents[componentClass.ID] = componentClass;
        }
        if (LazyInitialization.lazyLoadedComponents[componentClass.ID] == null) {
            LazyInitialization.lazyLoadedComponents[componentClass.ID] = function () {
                return new Promise(function (resolve, reject) {
                    resolve(componentClass);
                });
            };
        }
    };
    /**
     * Set the fields that the component needs to add to the query.
     *
     * This is used when the {@link ResultList.options.autoSelectFieldsToInclude } is set to `true` (which is `true` by default).
     *
     * The framework tries to only include the needed fields from the index, for performance reasons.
     *
     * @param componentId The id for the result template component (see [Result Templates](https://docs.coveo.com/en/413/)).
     * @param fields
     */
    Initialization.registerComponentFields = function (componentId, fields) {
        Initialization.fieldsNeededForQuery = Utils_1.Utils.concatWithoutDuplicate(Initialization.fieldsNeededForQuery, fields);
        // Register with both name (eg : Facet and CoveoFacet) to reduce possible confusion.
        // The id concept for component is fuzzy for a lot of people (include the Coveo prefix or not)
        var registerById = function (id) {
            if (Initialization.fieldsNeededForQueryByComponent[id] == null) {
                Initialization.fieldsNeededForQueryByComponent[id] = fields;
            }
            else {
                Initialization.fieldsNeededForQueryByComponent[id] = Utils_1.Utils.concatWithoutDuplicate(Initialization.fieldsNeededForQueryByComponent[id], fields);
            }
        };
        registerById(componentId);
        registerById(Component_1.Component.computeCssClassNameForType(componentId));
    };
    /**
     * Returns all the fields that the framework currently knows should be added to the query.
     *
     * This is used when the {@link ResultList.options.autoSelectFieldsToInclude } is set to `true` (which is `true` by default).
     *
     * The framework tries to only include the needed fields from the index, for performance reasons.
     * @returns {string[]}
     */
    Initialization.getRegisteredFieldsForQuery = function () {
        return Initialization.fieldsNeededForQuery;
    };
    /**
     * Returns all the fields that the framework currently knows should be added to the query, for a given component.
     *
     * This is used when the {@link ResultList.options.autoSelectFieldsToInclude } is set to `true` (which is `true` by default).
     *
     * The framework tries to only include the needed fields from the index, for performance reasons.
     * @param componentId
     * @returns {string[]|Array}
     */
    Initialization.getRegisteredFieldsComponentForQuery = function (componentId) {
        var basicId = Initialization.fieldsNeededForQueryByComponent[componentId] || [];
        var coveoId = Initialization.fieldsNeededForQueryByComponent[Component_1.Component.computeCssClassNameForType(componentId)] || [];
        return Utils_1.Utils.concatWithoutDuplicate(basicId, coveoId);
    };
    /**
     * Check if a component is already registered, using it's ID (e.g. : 'Facet').
     * @param componentClassId
     * @returns {boolean}
     */
    Initialization.isComponentClassIdRegistered = function (componentClassId) {
        return (_.contains(Initialization.registeredComponents, componentClassId) ||
            _.contains(Initialization.registeredComponents, Component_1.Component.computeCssClassNameForType(componentClassId)));
    };
    /**
     * Return the list of all known components (the list of ID for each component), whether they are actually loaded or not.
     * @returns {string[]}
     */
    Initialization.getListOfRegisteredComponents = function () {
        return Initialization.registeredComponents;
    };
    /**
     * Return the list of all components that are currently eagerly loaded.
     * @returns {string[]}
     */
    Initialization.getListOfLoadedComponents = function () {
        return _.keys(EagerInitialization.eagerlyLoadedComponents);
    };
    /**
     * Return the component class definition, using it's ID (e.g. : 'CoveoFacet').
     *
     * This means the component needs to be eagerly loaded.
     *
     * @param name
     * @returns {IComponentDefinition}
     */
    Initialization.getRegisteredComponent = function (name) {
        return EagerInitialization.eagerlyLoadedComponents[name];
    };
    /**
     * Initialize the framework. Note that this function should not normally be called directly, but instead using a globally registered function (e.g.: Coveo.init), or {@link Initialization.initSearchInterface} or {@link Initialization.initStandaloneSearchInterface} <br/>
     * (e.g. : `Coveo.init` or `Coveo.initSearchbox`).
     * @param element The element on which to initialize the interface.
     * @param options The options for all components (eg: {Searchbox : {enableSearchAsYouType : true}}).
     * @param initSearchInterfaceFunction The function to execute to create the {@link SearchInterface} component. Different init call will create different {@link SearchInterface}.
     */
    Initialization.initializeFramework = function (element, options, initSearchInterfaceFunction) {
        var _this = this;
        Assert_1.Assert.exists(element);
        var alreadyInitialized = Component_1.Component.get(element, QueryController_1.QueryController, true);
        if (alreadyInitialized) {
            this.logger.error('This DOM element has already been initialized as a search interface, skipping initialization', element);
            return Promise.resolve({
                elem: element
            });
        }
        options = Initialization.resolveDefaultOptions(element, options);
        var waitForAllPromisesToFinish = function (eventType, promises) { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            var promisesWithErrorsHandledIndividually;
            return __generator(this, function (_a) {
                try {
                    promisesWithErrorsHandledIndividually = promises.map(function (p) {
                        return p.catch(function (error) {
                            return _this.logger.warn("An error occurred when trying to defer the \"" + eventType + "\" event. The defer will be ignored.", "Error: " + error);
                        });
                    });
                    return [2 /*return*/, Promise.all(promisesWithErrorsHandledIndividually)];
                }
                catch (error) {
                    this.logger.error("An unexpected error occurred when trying to defer the \"" + event + "\" event. All defers will be ignored.", "Error: " + error);
                }
                return [2 /*return*/];
            });
        }); };
        var triggerInitializationEventWithArguments = function (eventType) {
            var initializationEventArgs = {
                defer: []
            };
            Dom_1.$$(element).trigger(eventType, initializationEventArgs);
            if (initializationEventArgs.defer.length > 0) {
                return waitForAllPromisesToFinish(eventType, initializationEventArgs.defer);
            }
            else {
                return Promise.resolve();
            }
        };
        Initialization.performInitFunctionsOption(options, InitializationEvents_1.InitializationEvents.beforeInitialization);
        Dom_1.$$(element).trigger(InitializationEvents_1.InitializationEvents.beforeInitialization);
        var toExecuteOnceSearchInterfaceIsInitialized = function () { return __awaiter(_this, void 0, void 0, function () {
            var result, searchInterface, shouldLogInActionHistory;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, Initialization.initExternalComponents(element, options)];
                    case 1:
                        result = _a.sent();
                        Initialization.performInitFunctionsOption(options, InitializationEvents_1.InitializationEvents.afterComponentsInitialization);
                        return [4 /*yield*/, triggerInitializationEventWithArguments(InitializationEvents_1.InitializationEvents.afterComponentsInitialization)];
                    case 2:
                        _a.sent();
                        Dom_1.$$(element).trigger(InitializationEvents_1.InitializationEvents.restoreHistoryState);
                        Initialization.performInitFunctionsOption(options, InitializationEvents_1.InitializationEvents.afterInitialization);
                        return [4 /*yield*/, triggerInitializationEventWithArguments(InitializationEvents_1.InitializationEvents.afterInitialization)];
                    case 3:
                        _a.sent();
                        searchInterface = Component_1.Component.get(element, SearchInterface_1.SearchInterface);
                        if (Initialization.shouldExecuteFirstQueryAutomatically(searchInterface)) {
                            Initialization.logFirstQueryCause(searchInterface);
                            shouldLogInActionHistory = true;
                            // We should not log an action history if the interface is a standalone recommendation component.
                            if (Coveo['Recommendation']) {
                                shouldLogInActionHistory = !(searchInterface instanceof Coveo['Recommendation']);
                            }
                            Component_1.Component.get(element, QueryController_1.QueryController).executeQuery({
                                logInActionsHistory: shouldLogInActionHistory,
                                isFirstQuery: true
                            });
                        }
                        return [2 /*return*/, result];
                }
            });
        }); };
        var resultOfSearchInterfaceInitialization = initSearchInterfaceFunction(element, options);
        // We are executing a "lazy" initialization, which returns a Promise
        // eg : CoveoJsSearch.Lazy.js was included in the page
        // this means that we can only execute the function after the promise has resolved
        if (resultOfSearchInterfaceInitialization.isLazyInit) {
            return resultOfSearchInterfaceInitialization.initResult.then(toExecuteOnceSearchInterfaceIsInitialized).then(function () {
                return {
                    elem: element
                };
            });
        }
        else {
            // Else, we are executing an "eager" initialization, which returns void;
            // eg : CoveoJsSearch.js was included in the page
            // this mean that this function gets executed immediately
            return toExecuteOnceSearchInterfaceIsInitialized().then(function () {
                return {
                    elem: element
                };
            });
        }
    };
    /**
     * Create a new standard search interface. This is the function executed when calling `Coveo.init`.
     * @param element
     * @param options
     * @returns {IInitResult}
     */
    Initialization.initSearchInterface = function (element, options) {
        if (options === void 0) { options = {}; }
        options = Initialization.resolveDefaultOptions(element, options);
        var searchInterface = new SearchInterface_1.SearchInterface(element, options.SearchInterface, options.Analytics);
        searchInterface.options.originalOptionsObject = options;
        var initParameters = { options: options, bindings: searchInterface.getBindings() };
        return Initialization.automaticallyCreateComponentsInside(element, initParameters, ['Recommendation']);
    };
    /**
     * Create a new standalone search interface (standalone search box). This is the function executed when calling `Coveo.initSearchbox`.
     * @param element
     * @param options
     * @returns {IInitResult}
     */
    Initialization.initStandaloneSearchInterface = function (element, options) {
        if (options === void 0) { options = {}; }
        options = Initialization.resolveDefaultOptions(element, options);
        // Set trigger query on clear to false for standalone search interface automatically
        // Take care of not overriding any options that could have been set by external code.
        if (!options.Querybox) {
            options.Querybox = {};
        }
        if (!options.Omnibox) {
            options.Omnibox = {};
        }
        if (!options.Searchbox) {
            options.Searchbox = {};
        }
        if (!options.Querybox.triggerQueryOnClear || !options.Omnibox.triggerQueryOnClear || !options.Searchbox.triggerOnQueryClear) {
            options.Querybox.triggerQueryOnClear = false;
            options.Omnibox.triggerQueryOnClear = false;
            options.Searchbox.triggerQueryOnClear = false;
        }
        var searchInterface = new SearchInterface_1.StandaloneSearchInterface(element, options.StandaloneSearchInterface, options.Analytics);
        searchInterface.options.originalOptionsObject = options;
        var initParameters = { options: options, bindings: searchInterface.getBindings() };
        return Initialization.automaticallyCreateComponentsInside(element, initParameters);
    };
    /**
     * Create a new recommendation search interface. This is the function executed when calling `Coveo.initRecommendation`.
     * @param element
     * @param options
     * @returns {IInitResult}
     */
    Initialization.initRecommendationInterface = function (element, options) {
        if (options === void 0) { options = {}; }
        options = Initialization.resolveDefaultOptions(element, options);
        // Since a recommendation interface inherits from a search interface, we need to merge those if passed on init
        var optionsForRecommendation = _.extend({}, options.SearchInterface, options.Recommendation);
        // If there is a main search interface, modify the loading animation for the recommendation interface to a "noop" element
        // We don't want 2 animation overlapping
        if (optionsForRecommendation.mainSearchInterface) {
            optionsForRecommendation.firstLoadingAnimation = Dom_1.$$('span').el;
        }
        var recommendation = new window['Coveo']['Recommendation'](element, optionsForRecommendation, options.Analytics);
        recommendation.options.originalOptionsObject = options;
        var initParameters = { options: options, bindings: recommendation.getBindings() };
        return Initialization.automaticallyCreateComponentsInside(element, initParameters);
    };
    /**
     * Scan the result element and all its children for known components. Initialize every known result component found.
     *
     * See also : {@link Initialization.automaticallyCreateComponentsInside}.
     * @param resultElement The root element to scan for known components
     * @param result The result which needs to be passed to each result component constructor.
     * @param optionsToInject A set of options to inject for the components found inside the resultElement. These options will be merged with any options passed during the "init" call of the search interface.
     */
    Initialization.automaticallyCreateComponentsInsideResult = function (resultElement, result, optionsToInject) {
        if (optionsToInject === void 0) { optionsToInject = {}; }
        var options = __assign({ initOptions: optionsToInject }, result.searchInterface.options.originalOptionsObject);
        var bindings = __assign({}, result.searchInterface.getBindings(), { resultElement: resultElement });
        var initParameters = {
            options: options,
            bindings: bindings,
            result: result
        };
        return Initialization.automaticallyCreateComponentsInside(resultElement, initParameters);
    };
    /**
     * Scan the element and all its children for known components. Initialize every known component found.
     *
     * @param element
     * @param initParameters
     * @param ignore
     * @returns {IInitResult}
     */
    Initialization.automaticallyCreateComponentsInside = function (element, initParameters, ignore) {
        var _this = this;
        if (ignore === void 0) { ignore = []; }
        Assert_1.Assert.exists(element);
        var htmlElementsToIgnore = InitializationHelper_1.InitializationHelper.findDOMElementsToIgnore(element, ignore);
        var htmlElementsToInitialize = InitializationHelper_1.InitializationHelper.findDOMElementsToInitialize(element, htmlElementsToIgnore);
        var isLazyInit;
        var constructorForEachComponentsInstance = _.chain(htmlElementsToInitialize)
            .map(function (htmlElementToInitialize) {
            var resultsOfFactory = _this.componentsFactory(htmlElementToInitialize.htmlElements, htmlElementToInitialize.componentClassId, initParameters);
            isLazyInit = resultsOfFactory.isLazyInit;
            return resultsOfFactory.factory;
        })
            .map(function (codeToExecute) {
            var codeResult = codeToExecute();
            if (codeResult) {
                return Promise.all(codeResult).then(function () { return true; });
            }
            return Promise.resolve(true);
        })
            .value();
        var initResult = Promise.all(constructorForEachComponentsInstance)
            .then(function () { return true; })
            .catch(function (e) {
            // We log the fatal error on init, but then we try to continue the initialization for the rest of the components.
            // In most case, this would be caused by a fatal error in a component constructor.
            // In some cases, it might be for a minor component not essential to basic function of the interface, meaning we could still salvage things here.
            _this.logger.error(e);
            _this.logger.warn("Skipping initialization of previous component in error ... ");
            return true;
        });
        return {
            initResult: initResult,
            isLazyInit: isLazyInit
        };
    };
    /**
     * Register a new globally available method in the Coveo namespace (e.g.: `Coveo.init`).
     * @param methodName The method name to register.
     * @param handler The function to execute when the method is called.
     */
    Initialization.registerNamedMethod = function (methodName, handler) {
        Assert_1.Assert.isNonEmptyString(methodName);
        Assert_1.Assert.doesNotExists(EagerInitialization.eagerlyLoadedComponents[methodName]);
        Assert_1.Assert.doesNotExists(Initialization.namedMethods[methodName]);
        Assert_1.Assert.exists(handler);
        Initialization.namedMethods[methodName] = handler;
    };
    /**
     * Check if the method is already registed.
     * @param methodName
     * @returns {boolean}
     */
    Initialization.isNamedMethodRegistered = function (methodName) {
        return Utils_1.Utils.exists(Initialization.namedMethods[methodName]);
    };
    /**
     * 'Monkey patch' (replace the function with a new one) a given method on a component instance.
     * @param methodName
     * @param element
     * @param handler
     */
    Initialization.monkeyPatchComponentMethod = function (methodName, element, handler) {
        Assert_1.Assert.isNonEmptyString(methodName);
        Assert_1.Assert.exists(handler);
        var componentClass;
        if (methodName.indexOf('.') > 0) {
            var splitArg = methodName.split('.');
            Assert_1.Assert.check(splitArg.length == 2, 'Invalid method name, correct syntax is CoveoComponent.methodName.');
            componentClass = splitArg[0];
            methodName = splitArg[1];
        }
        var boundComponent = Component_1.Component.get(element, componentClass);
        Assert_1.Assert.exists(boundComponent);
        Assert_1.Assert.exists(boundComponent[methodName]);
        var originalMethodName = '__' + methodName;
        if (!Utils_1.Utils.exists(boundComponent[originalMethodName])) {
            boundComponent[originalMethodName] = boundComponent[methodName];
        }
        boundComponent[methodName] = handler;
    };
    Initialization.initBoxInterface = function (element, options, type, injectMarkup) {
        if (options === void 0) { options = {}; }
        if (type === void 0) { type = 'Standard'; }
        if (injectMarkup === void 0) { injectMarkup = true; }
        options = Initialization.resolveDefaultOptions(element, options);
        var fromInitTypeToBoxReference = 'Box';
        if (type != 'Standard') {
            fromInitTypeToBoxReference += 'For' + type;
        }
        var boxRef = Component_1.Component.getComponentRef(fromInitTypeToBoxReference);
        if (boxRef) {
            new Logger_1.Logger(element).info('Initializing box of type ' + fromInitTypeToBoxReference);
            var injectFunction = injectMarkup ? boxRef.getInjection : function () { };
            var box = new boxRef(element, options[fromInitTypeToBoxReference], options.Analytics, injectFunction, options);
            box.options.originalOptionsObject = options;
            var initParameters = { options: options, bindings: box.getBindings() };
            return Initialization.automaticallyCreateComponentsInside(element, initParameters);
        }
        else {
            return {
                initResult: new Promise(function (resolve, reject) {
                    new Logger_1.Logger(element).error('Trying to initialize box of type : ' + fromInitTypeToBoxReference + ' but not found in code (not compiled)!');
                    Assert_1.Assert.fail('Cannot initialize unknown type of box');
                    reject(false);
                }),
                isLazyInit: false
            };
        }
    };
    Initialization.dispatchNamedMethodCall = function (methodName, element, args) {
        Assert_1.Assert.isNonEmptyString(methodName);
        Assert_1.Assert.exists(element);
        var namedMethodHandler = Initialization.namedMethods[methodName];
        Assert_1.Assert.exists(namedMethodHandler);
        Initialization.logger.trace('Dispatching named method call of ' + methodName, element, args);
        if (args.length != 0) {
            return namedMethodHandler.apply(null, [element].concat(args));
        }
        else {
            return namedMethodHandler.apply(null, [element]);
        }
    };
    Initialization.dispatchNamedMethodCallOrComponentCreation = function (token, element, args) {
        Assert_1.Assert.isNonEmptyString(token);
        Assert_1.Assert.exists(element);
        if (Initialization.isNamedMethodRegistered(token)) {
            return Initialization.dispatchNamedMethodCall(token, element, args);
        }
        else if (Initialization.isThereASingleComponentBoundToThisElement(element)) {
            return Initialization.dispatchMethodCallOnBoundComponent(token, element, args);
        }
        else {
            Assert_1.Assert.fail('No method or component named ' + token + ' are registered.');
        }
    };
    Initialization.isSearchFromLink = function (searchInterface) {
        return Utils_1.Utils.isNonEmptyString(searchInterface.getBindings().queryStateModel.get('q'));
    };
    Initialization.isThereASingleComponentBoundToThisElement = function (element) {
        Assert_1.Assert.exists(element);
        return Utils_1.Utils.exists(Component_1.Component.get(element, null, true));
    };
    Initialization.isThereANonSearchInterfaceComponentBoundToThisElement = function (element) {
        // We automatically consider "Recommendation" component to be a special case of search interface
        // and thus do not check those.
        if (Dom_1.$$(element).hasClass('CoveoRecommendation')) {
            return true;
        }
        return (Initialization.isThereASingleComponentBoundToThisElement(element) &&
            !RegisteredNamedMethods_1.get(element, SearchInterface_1.SearchInterface, true) &&
            !Dom_1.$$(element).hasClass('CoveoRecommendation'));
    };
    Initialization.dispatchMethodCallOnBoundComponent = function (methodName, element, args) {
        Assert_1.Assert.isNonEmptyString(methodName);
        Assert_1.Assert.exists(element);
        var boundComponent = Component_1.Component.get(element);
        Assert_1.Assert.exists(boundComponent);
        var method = boundComponent[methodName];
        if (Utils_1.Utils.exists(method)) {
            return method.apply(boundComponent, args);
        }
        else {
            Assert_1.Assert.fail('No method named ' + methodName + ' exist on component ' + boundComponent.type);
        }
    };
    Initialization.logFirstQueryCause = function (searchInterface) {
        var firstQueryCause = HashUtils_1.HashUtils.getValue('firstQueryCause', HashUtils_1.HashUtils.getHash());
        if (firstQueryCause != null) {
            var meta = HashUtils_1.HashUtils.getValue('firstQueryMeta', HashUtils_1.HashUtils.getHash()) || {};
            searchInterface.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList[firstQueryCause], meta);
        }
        else {
            if (Initialization.isSearchFromLink(searchInterface)) {
                searchInterface.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchFromLink, {});
            }
            else {
                searchInterface.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.interfaceLoad, {});
            }
        }
    };
    Initialization.performInitFunctionsOption = function (options, event) {
        if (Utils_1.Utils.exists(options)) {
            Initialization.performFunctions(options[event]);
        }
    };
    Initialization.performFunctions = function (option) {
        if (Utils_1.Utils.exists(option)) {
            _.each(option, function (func) {
                if (typeof func == 'function') {
                    func();
                }
            });
        }
    };
    Initialization.initExternalComponents = function (element, options) {
        var _this = this;
        if (options && options['externalComponents']) {
            var searchInterface = Component_1.Component.get(element, SearchInterface_1.SearchInterface);
            var queryStateModel = Component_1.Component.get(element, QueryStateModel_1.QueryStateModel);
            var componentStateModel = Component_1.Component.get(element, ComponentStateModel_1.ComponentStateModel);
            var queryController = Component_1.Component.get(element, QueryController_1.QueryController);
            var componentOptionsModel = Component_1.Component.get(element, ComponentOptionsModel_1.ComponentOptionsModel);
            var usageAnalytics = searchInterface.usageAnalytics;
            Assert_1.Assert.exists(searchInterface);
            Assert_1.Assert.exists(queryStateModel);
            Assert_1.Assert.exists(queryController);
            Assert_1.Assert.exists(componentStateModel);
            Assert_1.Assert.exists(usageAnalytics);
            var initParameters_1 = {
                options: options,
                bindings: {
                    searchInterface: searchInterface,
                    queryStateModel: queryStateModel,
                    queryController: queryController,
                    usageAnalytics: usageAnalytics,
                    componentStateModel: componentStateModel,
                    componentOptionsModel: componentOptionsModel,
                    root: element
                }
            };
            var initializationOfExternalComponents = _.map(options['externalComponents'], function (externalComponent) {
                var elementToInstantiate = externalComponent;
                if (Utils_1.Utils.isHtmlElement(elementToInstantiate)) {
                    return Initialization.automaticallyCreateComponentsInside(elementToInstantiate, initParameters_1).initResult;
                }
                else if (JQueryutils_1.JQueryUtils.isInstanceOfJQuery(elementToInstantiate)) {
                    return Initialization.automaticallyCreateComponentsInside(elementToInstantiate.get(0), initParameters_1)
                        .initResult;
                }
            });
            return Promise.all(initializationOfExternalComponents)
                .then(function (results) { return _.first(results); })
                .catch(function (err) {
                _this.logger.error(err);
                return false;
            });
        }
        else {
            return Promise.resolve(false);
        }
    };
    Initialization.shouldExecuteFirstQueryAutomatically = function (searchInterface) {
        var options = searchInterface.options;
        if (!options) {
            return true;
        }
        if (options.autoTriggerQuery === false) {
            return false;
        }
        if (options.allowQueriesWithoutKeywords === true) {
            return true;
        }
        var currentStateOfQuery = RegisteredNamedMethods_1.state(searchInterface.element).get('q');
        return currentStateOfQuery != '';
    };
    Initialization.logger = new Logger_1.Logger('Initialization');
    Initialization.registeredComponents = [];
    Initialization.componentAliases = {};
    Initialization.namedMethods = {};
    // List of every fields that are needed by components when doing a query (the fieldsToInclude property in the query)
    // Since results components are lazy loaded after the first query (when doing the rendering) we need to register the needed fields before their implementation are loaded in the page.
    Initialization.fieldsNeededForQuery = [];
    // List of every fields that are needed by components when doing a query (the fieldsToInclude property in the query), linked to the component that needs them
    // It is a bit different from `fieldsNeededForQuery` because we can, in some scenarios, optimize to only get fields for components that are actually in the page
    Initialization.fieldsNeededForQueryByComponent = {};
    return Initialization;
}());
exports.Initialization = Initialization;
var LazyInitialization = /** @class */ (function () {
    function LazyInitialization() {
    }
    LazyInitialization.getLazyRegisteredComponent = function (name) {
        return LazyInitialization.lazyLoadedComponents[name]();
    };
    LazyInitialization.getLazyRegisteredModule = function (name) {
        return LazyInitialization.lazyLoadedModule[name]();
    };
    LazyInitialization.registerLazyComponent = function (id, load, aliases) {
        if (LazyInitialization.lazyLoadedComponents[id] == null) {
            Assert_1.Assert.exists(load);
            if (!_.contains(Initialization.registeredComponents, id)) {
                Initialization.registeredComponents.push(id);
            }
            LazyInitialization.lazyLoadedComponents[id] = load;
            if (aliases) {
                Initialization.componentAliases[id] = aliases;
            }
        }
        else {
            this.logger.warn('Component being registered twice', id);
        }
    };
    LazyInitialization.buildErrorCallback = function (chunkName, resolve) {
        return function (error) {
            LazyInitialization.logger
                .warn("Cannot load chunk for " + chunkName + ". You may need to add the coveo-script class on the script tag that includes the Coveo framework. More details [here](https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues).\n        " + error);
            resolve(function () { });
        };
    };
    LazyInitialization.registerLazyModule = function (id, load) {
        if (LazyInitialization.lazyLoadedModule[id] == null) {
            Assert_1.Assert.exists(load);
            LazyInitialization.lazyLoadedModule[id] = load;
        }
        else {
            this.logger.warn('Module being registered twice', id);
        }
    };
    LazyInitialization.componentsFactory = function (elements, componentClassId, initParameters) {
        var factory = function () {
            var promises = [];
            _.each(elements, function (matchingElement) {
                if (Component_1.Component.get(matchingElement, componentClassId) == null) {
                    // If options were provided, lookup options for this component class and
                    // also for the element id. Merge them and pass those to the factory method.
                    var optionsToUse = void 0;
                    if (Utils_1.Utils.exists(initParameters.options)) {
                        var optionsForComponentClass = initParameters.options[componentClassId];
                        var optionsForElementId = initParameters.options[matchingElement.id];
                        var initOptions = initParameters.options['initOptions'] ? initParameters.options['initOptions'][componentClassId] : {};
                        optionsToUse = Utils_1.Utils.extendDeep(optionsForElementId, initOptions);
                        optionsToUse = Utils_1.Utils.extendDeep(optionsForComponentClass, optionsToUse);
                    }
                    var initParamToUse = _.extend({}, initParameters, { options: optionsToUse });
                    promises.push(LazyInitialization.createComponentOfThisClassOnElement(componentClassId, matchingElement, initParamToUse));
                }
            });
            return promises;
        };
        return {
            factory: factory,
            isLazyInit: true
        };
    };
    LazyInitialization.createComponentOfThisClassOnElement = function (componentClassId, element, initParameters) {
        Assert_1.Assert.isNonEmptyString(componentClassId);
        Assert_1.Assert.exists(element);
        // If another component exist on that element, we do not want to re-initialize again.
        // The exception being the "SearchInterface", since in some case we want end user to initialize directly on the root of the interface
        // For example, when we are initializing a standalone search box, we might want to target the div for the search box directly.
        if (Initialization.isThereANonSearchInterfaceComponentBoundToThisElement(element)) {
            return null;
        }
        return LazyInitialization.getLazyRegisteredComponent(componentClassId).then(function (lazyLoadedComponent) {
            Assert_1.Assert.exists(lazyLoadedComponent);
            if (Initialization.isThereANonSearchInterfaceComponentBoundToThisElement(element)) {
                return null;
            }
            var bindings = {};
            var options = {};
            var result;
            if (initParameters != undefined) {
                _.each(initParameters.bindings, function (value, key) {
                    bindings[key] = value;
                });
                options = initParameters.options;
                result = initParameters.result;
            }
            LazyInitialization.logger.trace('Creating component of class ' + componentClassId, element, options);
            return new lazyLoadedComponent(element, options, bindings, result);
        });
    };
    LazyInitialization.logger = new Logger_1.Logger('LazyInitialization');
    // Map of every component to a promise that resolve with their implementation (lazily loaded)
    LazyInitialization.lazyLoadedComponents = {};
    LazyInitialization.lazyLoadedModule = {};
    return LazyInitialization;
}());
exports.LazyInitialization = LazyInitialization;
var EagerInitialization = /** @class */ (function () {
    function EagerInitialization() {
    }
    EagerInitialization.componentsFactory = function (elements, componentClassId, initParameters) {
        var factory = function () {
            _.each(elements, function (matchingElement) {
                if (Component_1.Component.get(matchingElement, componentClassId) == null) {
                    // If options were provided, lookup options for this component class and
                    // also for the element id. Merge them and pass those to the factory method.
                    var optionsToUse = void 0;
                    if (Utils_1.Utils.exists(initParameters.options)) {
                        var optionsForComponentClass = initParameters.options[componentClassId];
                        var optionsForElementId = initParameters.options[matchingElement.id];
                        var initOptions = initParameters.options['initOptions'] ? initParameters.options['initOptions'][componentClassId] : {};
                        optionsToUse = Utils_1.Utils.extendDeep(optionsForElementId, initOptions);
                        optionsToUse = Utils_1.Utils.extendDeep(optionsForComponentClass, optionsToUse);
                    }
                    var initParamToUse = _.extend({}, initParameters, { options: optionsToUse });
                    EagerInitialization.createComponentOfThisClassOnElement(componentClassId, matchingElement, initParamToUse);
                }
            });
        };
        return {
            factory: factory,
            isLazyInit: false
        };
    };
    EagerInitialization.createComponentOfThisClassOnElement = function (componentClassId, element, initParameters) {
        Assert_1.Assert.isNonEmptyString(componentClassId);
        Assert_1.Assert.exists(element);
        var eagerlyLoadedComponent = Initialization.getRegisteredComponent(componentClassId);
        var bindings = {};
        var options = {};
        var result;
        if (initParameters != undefined) {
            _.each(initParameters.bindings, function (value, key) {
                bindings[key] = value;
            });
            options = initParameters.options;
            result = initParameters.result;
        }
        // If another component exist on that element, we do not want to re-initialize again.
        // The exception being the "SearchInterface", since in some case we want end user to initialize directly on the root of the interface
        // For example, when we are initializing a standalone search box, we might want to target the div for the search box directly.
        if (Initialization.isThereANonSearchInterfaceComponentBoundToThisElement(element)) {
            return null;
        }
        EagerInitialization.logger.trace("Creating component of class " + componentClassId, element, options);
        // This is done so that external code that extends a base component does not have to have two code path for lazy vs eager;
        // If we do not find the eager component registered, we can instead try to load the one found in lazy mode.
        // If it still fails there... tough luck. The component simply won't work.
        if (eagerlyLoadedComponent == null) {
            LazyInitialization.getLazyRegisteredComponent(componentClassId)
                .then(function (lazyLoadedComponent) {
                EagerInitialization.logger.warn("Component of class " + componentClassId + " was not found in \"Eager\" mode. Using lazy mode as a fallback.");
                new lazyLoadedComponent(element, options, bindings, result);
            })
                .catch(function () {
                EagerInitialization.logger.error("Component of class " + componentClassId + " was not found in \"Eager\" mode nor \"Lazy\" mode. It will not be initialized properly...");
            });
            return null;
        }
        else {
            return new eagerlyLoadedComponent(element, options, bindings, result);
        }
    };
    EagerInitialization.logger = new Logger_1.Logger('EagerInitialization');
    // Map of every component with their implementation (eagerly loaded)
    EagerInitialization.eagerlyLoadedComponents = {};
    return EagerInitialization;
}());
exports.EagerInitialization = EagerInitialization;


/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var Logger_1 = __webpack_require__(9);
var Initialization_1 = __webpack_require__(2);
function exportGlobally(toExportGlobally) {
    if (window['Coveo'] == undefined) {
        window['Coveo'] = {};
    }
    _.each(_.keys(toExportGlobally), function (key) {
        if (window['Coveo'][key] == null) {
            window['Coveo'][key] = toExportGlobally[key];
        }
    });
}
exports.exportGlobally = exportGlobally;
function lazyExport(component, promiseResolve) {
    if (component.doExport) {
        component.doExport();
    }
    else {
        new Logger_1.Logger(this).error("Component " + component + " has no export function !");
    }
    Initialization_1.Initialization.registerAutoCreateComponent(component);
    promiseResolve(component);
}
exports.lazyExport = lazyExport;
function lazyExportModule(mod, promiseResolve) {
    if (mod.doExport) {
        mod.doExport();
    }
    promiseResolve(mod);
}
exports.lazyExportModule = lazyExportModule;


/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var isCoveoFieldRegex = /^@[a-zA-Z0-9_\.]+$/;
var Utils = /** @class */ (function () {
    function Utils() {
    }
    Utils.isUndefined = function (obj) {
        return typeof obj == 'undefined';
    };
    Utils.isNull = function (obj) {
        return obj === null;
    };
    Utils.isNullOrUndefined = function (obj) {
        return Utils.isUndefined(obj) || Utils.isNull(obj);
    };
    Utils.exists = function (obj) {
        return !Utils.isNullOrUndefined(obj);
    };
    Utils.toNotNullString = function (str) {
        return _.isString(str) ? str : '';
    };
    Utils.anyTypeToString = function (value) {
        return value ? value.toString() : '';
    };
    Utils.isNullOrEmptyString = function (str) {
        return Utils.isNullOrUndefined(str) || !Utils.isNonEmptyString(str);
    };
    Utils.isNonEmptyString = function (str) {
        return _.isString(str) && str !== '';
    };
    Utils.isEmptyString = function (str) {
        return !Utils.isNonEmptyString(str);
    };
    Utils.stringStartsWith = function (str, startWith) {
        return str.slice(0, startWith.length) == startWith;
    };
    Utils.stringEndsWith = function (str, endsWith) {
        return str.substring(str.length - endsWith.length, str.length) === endsWith;
    };
    Utils.isNonEmptyArray = function (obj) {
        return _.isArray(obj) && obj.length > 0;
    };
    Utils.isEmptyArray = function (obj) {
        return !Utils.isNonEmptyArray(obj);
    };
    Utils.isHtmlElement = function (obj) {
        if (window['HTMLElement'] != undefined) {
            return obj instanceof HTMLElement;
        }
        else {
            // IE 8 FIX
            return obj && obj.nodeType && obj.nodeType == 1;
        }
    };
    Utils.parseIntIfNotUndefined = function (str) {
        if (Utils.isNonEmptyString(str)) {
            return parseInt(str, 10);
        }
        else {
            return undefined;
        }
    };
    Utils.parseFloatIfNotUndefined = function (str) {
        var a = 't';
        a instanceof HTMLDocument;
        if (Utils.isNonEmptyString(str)) {
            return parseFloat(str);
        }
        else {
            return undefined;
        }
    };
    Utils.round = function (num, decimals) {
        return Math.round(num * Math.pow(10, decimals)) / Math.pow(10, decimals);
    };
    Utils.parseBooleanIfNotUndefined = function (str) {
        if (Utils.isNonEmptyString(str)) {
            switch (str.toLowerCase()) {
                case 'true':
                case '1':
                case 'yes':
                    return true;
                case 'false':
                case '0':
                case 'no':
                    return false;
                default:
                    return undefined;
            }
        }
        else {
            return undefined;
        }
    };
    Utils.trim = function (value) {
        if (value == null) {
            return null;
        }
        return value.replace(/^\s+|\s+$/g, '');
    };
    Utils.encodeHTMLEntities = function (rawStr) {
        var ret = [];
        for (var i = rawStr.length - 1; i >= 0; i--) {
            if (/^[a-z0-9]/i.test(rawStr[i])) {
                ret.unshift(rawStr[i]);
            }
            else {
                ret.unshift(['&#', rawStr.charCodeAt(i), ';'].join(''));
            }
        }
        return ret.join('');
    };
    Utils.decodeHTMLEntities = function (rawString) {
        return rawString.replace(/&#(\d+);/g, function (match, dec) {
            return String.fromCharCode(dec);
        });
    };
    Utils.safeEncodeURIComponent = function (rawString) {
        // yiiip...
        // Explanation : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
        // Solution : https://stackoverflow.com/a/17109094
        // Basically some unicode character (low-high surrogate) will throw an "invalid malformed URI" error when being encoded as an URI component, and the pair of character is incomplete.
        // This simply removes those pesky characters
        if (_.isString(rawString)) {
            return encodeURIComponent(rawString
                .replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])/g, '')
                .split('')
                .reverse()
                .join('')
                .replace(/[\uDC00-\uDFFF](?![\uD800-\uDBFF])/g, '')
                .split('')
                .reverse()
                .join(''));
        }
        else {
            // If the passed value is not a string, we probably don't want to do anything here...
            // The base browser function should be resilient enough
            return encodeURIComponent(rawString);
        }
    };
    Utils.arrayEqual = function (array1, array2, sameOrder) {
        if (sameOrder === void 0) { sameOrder = true; }
        if (sameOrder) {
            return _.isEqual(array1, array2);
        }
        else {
            var arrays_1 = [array1, array2];
            return _.all(arrays_1, function (array) {
                return array.length == arrays_1[0].length && _.difference(array, arrays_1[0]).length == 0;
            });
        }
    };
    Utils.objectEqual = function (obj1, obj2) {
        return _.isEqual(obj1, obj2);
    };
    Utils.isCoveoField = function (field) {
        return isCoveoFieldRegex.test(field);
    };
    Utils.escapeRegexCharacter = function (str) {
        var ret = str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
        return ret;
    };
    Utils.getCaseInsensitiveProperty = function (object, name) {
        // First try using a fast case-sensitive lookup
        var value = object[name];
        // Then try a fast case-sensitive lookup with lowercase name
        if (value == null) {
            var lowerCaseName_1 = name.toLowerCase();
            value = object[lowerCaseName_1];
            // Then try a slow scanning of all the properties
            if (value == null) {
                var matchingKey = _.find(_.keys(object), function (key) { return key.toLowerCase() == lowerCaseName_1; });
                if (matchingKey != null) {
                    value = object[matchingKey];
                }
            }
        }
        return value;
    };
    /**
     * Get the value of the first field from the array and defined in the result.
     *
     * @param result a QueryResult in which to ge the fieldvalue.
     * @param name One or multiple fieldNames to get the value.
     */
    Utils.getFirstAvailableFieldValue = function (result, fieldNames) {
        for (var i = 0; i < fieldNames.length; i++) {
            var value = Utils.getFieldValue(result, fieldNames[i]);
            if (value !== undefined) {
                return value;
            }
        }
        return undefined;
    };
    Utils.getFieldValue = function (result, name) {
        // Be as forgiving as possible about the field name, since we expect
        // user provided values.
        if (name == null) {
            return undefined;
        }
        name = Utils.trim(name);
        if (name[0] == '@') {
            name = name.substr(1);
        }
        if (name == '') {
            return undefined;
        }
        // At this point the name should be well formed
        if (!Utils.isCoveoField('@' + name)) {
            throw "Not a valid field : " + name;
        }
        // Handle namespace field values of the form sf.Foo.Bar
        var parts = name.split('.').reverse();
        var obj = result.raw;
        while (parts.length > 1) {
            obj = Utils.getCaseInsensitiveProperty(obj, parts.pop());
            if (Utils.isUndefined(obj)) {
                return undefined;
            }
        }
        var value = Utils.getCaseInsensitiveProperty(obj, parts[0]);
        // If still nothing, look at the root of the result
        if (value == null) {
            value = Utils.getCaseInsensitiveProperty(result, name);
        }
        return value;
    };
    Utils.throttle = function (func, wait, options, context, args) {
        if (options === void 0) { options = {}; }
        var result;
        var timeout = null;
        var previous = 0;
        var later = function () {
            previous = options.leading === false ? 0 : new Date().getTime();
            timeout = null;
            result = func.apply(context, args);
        };
        return function () {
            var now = new Date().getTime();
            if (!previous && options.leading === false) {
                previous = now;
            }
            var remaining = wait - (now - previous);
            context = this;
            args = arguments;
            if (remaining <= 0) {
                clearTimeout(timeout);
                timeout = null;
                previous = now;
                result = func.apply(context, args);
            }
            else if (!timeout && options.trailing !== false) {
                timeout = window.setTimeout(later, remaining);
            }
            return result;
        };
    };
    Utils.extendDeep = function (target, src) {
        if (!target) {
            target = {};
        }
        var isArray = _.isArray(src);
        var toReturn = (isArray && []) || {};
        if (isArray) {
            target = target || [];
            toReturn = toReturn['concat'](target);
            _.each(src, function (e, i, obj) {
                if (typeof target[i] === 'undefined') {
                    toReturn[i] = e;
                }
                else if (typeof e === 'object' && !_.isElement(e)) {
                    toReturn[i] = Utils.extendDeep(target[i], e);
                }
                else {
                    if (target.indexOf(e) === -1) {
                        toReturn['push'](e);
                    }
                }
            });
        }
        else {
            if (target && typeof target === 'object' && !_.isElement(target)) {
                _.each(_.keys(target), function (key) {
                    toReturn[key] = target[key];
                });
            }
            _.each(_.keys(src), function (key) {
                if (typeof src[key] !== 'object' || !src[key]) {
                    toReturn[key] = src[key];
                }
                else {
                    if (!target[key]) {
                        toReturn[key] = src[key];
                    }
                    else {
                        toReturn[key] = Utils.extendDeep(target[key], src[key]);
                    }
                }
            });
        }
        return toReturn;
    };
    Utils.getQueryStringValue = function (key, queryString) {
        if (queryString === void 0) { queryString = window.location.search; }
        return queryString.replace(new RegExp('^(?:.*[&\\?]' + key.replace(/[\.\+\*]/g, '\\$&') + '(?:\\=([^&]*))?)?.*$', 'i'), '$1');
    };
    Utils.isValidUrl = function (str) {
        var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
        return regexp.test(str);
    };
    Utils.debounce = function (func, wait) {
        var timeout;
        var stackTraceTimeout;
        return function () {
            var _this = this;
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            if (timeout == null) {
                timeout = window.setTimeout(function () {
                    timeout = null;
                }, wait);
                stackTraceTimeout = setTimeout(function () {
                    func.apply(_this, args);
                    stackTraceTimeout = null;
                });
            }
            else if (stackTraceTimeout == null) {
                clearTimeout(timeout);
                timeout = window.setTimeout(function () {
                    func.apply(_this, args);
                    timeout = null;
                }, wait);
            }
        };
    };
    Utils.readCookie = function (name) {
        var nameEQ = name + '=';
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) == ' ') {
                c = c.substring(1, c.length);
            }
            if (c.indexOf(nameEQ) == 0) {
                return c.substring(nameEQ.length, c.length);
            }
        }
        return null;
    };
    Utils.toDashCase = function (camelCased) {
        return camelCased.replace(/([a-z][A-Z])/g, function (g) { return g[0] + '-' + g[1].toLowerCase(); });
    };
    Utils.toCamelCase = function (dashCased) {
        return dashCased.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
    };
    // Based on http://stackoverflow.com/a/8412989
    Utils.parseXml = function (xml) {
        if (typeof DOMParser != 'undefined') {
            return new DOMParser().parseFromString(xml, 'text/xml');
        }
        else if (typeof ActiveXObject != 'undefined' && new ActiveXObject('Microsoft.XMLDOM')) {
            var xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
            xmlDoc.async = 'false';
            xmlDoc.loadXML(xml);
            return xmlDoc;
        }
        else {
            throw new Error('No XML parser found');
        }
    };
    Utils.copyObject = function (target, src) {
        var _this = this;
        _.each(_.keys(src), function (key) {
            if (typeof src[key] !== 'object' || !src[key]) {
                target[key] = src[key];
            }
            else if (!target[key]) {
                target[key] = src[key];
            }
            else {
                _this.copyObject(target[key], src[key]);
            }
        });
    };
    Utils.copyObjectAttributes = function (target, src, attributes) {
        var _this = this;
        _.each(_.keys(src), function (key) {
            if (_.contains(attributes, key)) {
                if (typeof src[key] !== 'object' || !src[key]) {
                    target[key] = src[key];
                }
                else if (!target[key]) {
                    target[key] = src[key];
                }
                else {
                    _this.copyObject(target[key], src[key]);
                }
            }
        });
    };
    Utils.concatWithoutDuplicate = function (firstArray, secondArray) {
        var diff = _.difference(secondArray, firstArray);
        if (diff && diff.length > 0) {
            firstArray = firstArray.concat(diff);
        }
        return firstArray;
    };
    Utils.differenceBetweenObjects = function (firstObject, secondObject) {
        var difference = {};
        var addDiff = function (first, second) {
            for (var key in first) {
                if (first[key] !== second[key] && difference[key] == null) {
                    difference[key] = first[key];
                }
            }
        };
        addDiff(firstObject, secondObject);
        addDiff(secondObject, firstObject);
        return difference;
    };
    Utils.resolveAfter = function (ms, returns) {
        return new Promise(function (resolve) { return setTimeout(function () { return (returns !== undefined ? resolve(returns) : resolve()); }, ms); });
    };
    Utils.reorderValuesByKeys = function (values, order, getKey) {
        var valuesMap = values.reduce(function (map, value) {
            return (__assign({}, map, (_a = {}, _a[getKey(value)] = value, _a)));
            var _a;
        }, {});
        var orderedValues = [];
        order.forEach(function (keyToAppend) {
            if (valuesMap[keyToAppend]) {
                orderedValues.push(valuesMap[keyToAppend]);
            }
        });
        return orderedValues.concat(_.without.apply(_, [values].concat(orderedValues)));
    };
    return Utils;
}());
exports.Utils = Utils;


/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(9);
var Utils_1 = __webpack_require__(4);
var _ = __webpack_require__(0);
var Assert = /** @class */ (function () {
    function Assert() {
    }
    Assert.fail = function (message) {
        Assert.failureHandler(message);
    };
    Assert.check = function (condition, message) {
        if (!condition) {
            Assert.fail(message);
        }
    };
    Assert.isUndefined = function (obj) {
        Assert.check(Utils_1.Utils.isUndefined(obj), 'Value should be undefined.');
    };
    Assert.isNotUndefined = function (obj) {
        Assert.check(!Utils_1.Utils.isUndefined(obj), 'Value should not be undefined.');
    };
    Assert.isNull = function (obj) {
        Assert.check(Utils_1.Utils.isNull(obj), 'Value should be null.');
    };
    Assert.isNotNull = function (obj) {
        Assert.check(!Utils_1.Utils.isNull(obj), 'Value should not be null.');
    };
    Assert.exists = function (obj) {
        Assert.check(!Utils_1.Utils.isNullOrUndefined(obj), 'Value should not be null or undefined');
    };
    Assert.doesNotExists = function (obj) {
        Assert.check(Utils_1.Utils.isNullOrUndefined(obj), 'Value should be null or undefined');
    };
    Assert.isString = function (obj) {
        Assert.check(_.isString(obj), 'Value should be a string.');
    };
    Assert.stringStartsWith = function (str, start) {
        Assert.isNonEmptyString(str);
        Assert.isNonEmptyString(start);
        Assert.check(str.indexOf(start) == 0, 'Value should start with ' + start);
    };
    Assert.isNonEmptyString = function (str) {
        Assert.check(Utils_1.Utils.isNonEmptyString(str), 'Value should be a non-empty string.');
    };
    Assert.isNumber = function (obj) {
        Assert.check(_.isNumber(obj), 'Value should be a number.');
    };
    Assert.isLargerThan = function (expected, actual) {
        Assert.check(actual > expected, 'Value ' + actual + ' should be larger than ' + expected);
    };
    Assert.isLargerOrEqualsThan = function (expected, actual) {
        Assert.check(actual >= expected, 'Value ' + actual + ' should be larger or equal than ' + expected);
    };
    Assert.isSmallerThan = function (expected, actual) {
        Assert.check(actual < expected, 'Value ' + actual + ' should be smaller than ' + expected);
    };
    Assert.isSmallerOrEqualsThan = function (expected, actual) {
        Assert.check(actual <= expected, 'Value ' + actual + ' should be smaller or equal than ' + expected);
    };
    Assert.logger = new Logger_1.Logger('Assert');
    Assert.failureHandler = function (message) {
        Assert.logger.error('Assertion Failed!', message);
        if (window['console'] && console.trace) {
            console.trace();
        }
        if (Utils_1.Utils.isNonEmptyString(message)) {
            throw new PreconditionFailedException(message);
        }
        else {
            throw new PreconditionFailedException('Assertion Failed!');
        }
    };
    return Assert;
}());
exports.Assert = Assert;
var PreconditionFailedException = /** @class */ (function (_super) {
    __extends(PreconditionFailedException, _super);
    function PreconditionFailedException(message) {
        var _this = _super.call(this, message) || this;
        _this.message = message;
        return _this;
    }
    PreconditionFailedException.prototype.toString = function () {
        return this.message;
    };
    return PreconditionFailedException;
}(Error));
exports.PreconditionFailedException = PreconditionFailedException;


/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var L10N_1 = __webpack_require__(153);
function l() {
    var params = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        params[_i] = arguments[_i];
    }
    return L10N_1.L10N.format.apply(this, arguments);
}
exports.l = l;
;


/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var Utils_1 = __webpack_require__(4);
var JQueryutils_1 = __webpack_require__(77);
var Dom_1 = __webpack_require__(1);
var QueryStateModel_1 = __webpack_require__(13);
var ComponentStateModel_1 = __webpack_require__(79);
var ComponentOptionsModel_1 = __webpack_require__(28);
var QueryController_1 = __webpack_require__(44);
var SearchInterface_1 = __webpack_require__(19);
var NoopAnalyticsClient_1 = __webpack_require__(107);
var BaseComponent_1 = __webpack_require__(36);
var DebugEvents_1 = __webpack_require__(106);
var _ = __webpack_require__(0);
var GlobalExports_1 = __webpack_require__(3);
/**
 * The `ComponentEvents` class is used by the various Coveo Component to trigger events and bind event handlers. It adds
 * logic to execute handlers or triggers only when a component is "enabled", which serves as a way to avoid executing
 * handlers on components that are invisible and inactive in the query.
 *
 * Typically, a component is disabled when it is not active in the current [`Tab`]{@link Tab}. It can also be disabled
 * by external code, however.
 *
 * To manually enable or disable a component, simply use its [`enable`]{@link Component.enable} or
 * [`disable`]{@link Component.disable} method.
 */
var ComponentEvents = /** @class */ (function () {
    /**
     * Creates a new `ComponentEvents` instance for a [`Component`]{@link Component}.
     * @param owner The [`Component`]{@link Component} that owns the event handlers and triggers.
     */
    function ComponentEvents(owner) {
        this.owner = owner;
        Assert_1.Assert.exists(owner);
    }
    ComponentEvents.doExport = function () {
        GlobalExports_1.exportGlobally({
            ComponentEvents: ComponentEvents
        });
    };
    ComponentEvents.prototype.on = function (arg, event, handler) {
        if (this.shouldTreatElementAsJQuery(arg)) {
            arg.on(event, this.wrapToCallIfEnabled(handler));
        }
        else {
            Dom_1.$$(arg).on(event, this.wrapToCallIfEnabled(handler));
        }
    };
    ComponentEvents.prototype.one = function (arg, event, handler) {
        if (this.shouldTreatElementAsJQuery(arg)) {
            arg.one(event, this.wrapToCallIfEnabled(handler));
        }
        else {
            Dom_1.$$(arg).one(event, this.wrapToCallIfEnabled(handler));
        }
    };
    /**
     * Bind on the "root" of the Component. The root is typically the {@link SearchInterface}.<br/>
     * Bind an event using native javascript code.
     * @param event The event for which to register a handler.
     * @param handler The function to execute when the event is triggered.
     */
    ComponentEvents.prototype.onRootElement = function (event, handler) {
        this.on(this.owner.root, event, handler);
    };
    /**
     * Bind on the "root" of the Component. The root is typically the {@link SearchInterface}.<br/>
     * Bind an event using native javascript code.
     * The handler will execute only ONE time.
     * @param event The event for which to register a handler.
     * @param handler The function to execute when the event is triggered.
     */
    ComponentEvents.prototype.oneRootElement = function (event, handler) {
        this.one(this.owner.root, event, handler);
    };
    /**
     * Bind an event related specially to the query state model.<br/>
     * This will build the correct string event and execute the handler only if the component is activated.
     * @param eventType The event type for which to register an event.
     * @param attribute The attribute for which to register an event.
     * @param handler The handler to execute when the query state event is triggered.
     */
    ComponentEvents.prototype.onQueryState = function (eventType, attribute, handler) {
        this.onRootElement(this.getQueryStateEventName(eventType, attribute), handler);
    };
    /**
     * Bind an event related specially to the component option model.
     * This will build the correct string event and execute the handler only if the component is activated.
     * @param eventType The event type for which to register an event.
     * @param attribute The attribute for which to register an event.
     * @param handler The handler to execute when the query state event is triggered.
     */
    ComponentEvents.prototype.onComponentOptions = function (eventType, attribute, handler) {
        this.onRootElement(this.getComponentOptionEventName(eventType, attribute), handler);
    };
    /**
     * Bind an event related specially to the query state model.<br/>
     * This will build the correct string event and execute the handler only if the component is activated.<br/>
     * Will execute only once.
     * @param eventType The event type for which to register an event.
     * @param attribute The attribute for which to register an event.
     * @param handler The handler to execute when the query state event is triggered.
     */
    ComponentEvents.prototype.oneQueryState = function (eventType, attribute, handler) {
        this.oneRootElement(this.getQueryStateEventName(eventType, attribute), handler);
    };
    ComponentEvents.prototype.trigger = function (arg, event, args) {
        var _this = this;
        this.wrapToCallIfEnabled(function () {
            if (_this.shouldTreatElementAsJQuery(arg)) {
                arg.trigger(event, args);
            }
            else {
                Dom_1.$$(arg).trigger(event, args);
            }
        })(args);
    };
    /**
     * Execute the function only if the component is enabled.
     * @param func The function to execute if the component is enabled.
     * @returns {function(...[any]): *}
     */
    ComponentEvents.prototype.wrapToCallIfEnabled = function (func) {
        var _this = this;
        return function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            if (!_this.owner.disabled) {
                if (args && args[0] instanceof CustomEvent) {
                    if (args[0].detail) {
                        args = [args[0].detail];
                    }
                }
                else if (args && _this.shouldTreatEventAsJQuery(args[0])) {
                    if (args[1] != undefined) {
                        args = [args[1]];
                    }
                    else if (args[0].hasOwnProperty('originalEvent')) {
                        // If the event is a jQuery Event but no args are found, let's use the ones of the originalEvent, if any.
                        args = [args[0].originalEvent];
                    }
                    else {
                        args = [];
                    }
                }
                return func.apply(_this.owner, args);
            }
        };
    };
    ComponentEvents.prototype.shouldTreatElementAsJQuery = function (arg) {
        if (Dom_1.Dom.useNativeJavaScriptEvents === true) {
            return false;
        }
        if (JQueryutils_1.JQueryUtils.getJQuery() && JQueryutils_1.JQueryUtils.isInstanceOfJQuery(arg)) {
            return true;
        }
        return false;
    };
    ComponentEvents.prototype.shouldTreatEventAsJQuery = function (arg) {
        if (Dom_1.Dom.useNativeJavaScriptEvents === true) {
            return false;
        }
        return JQueryutils_1.JQueryUtils.getJQuery() && JQueryutils_1.JQueryUtils.isInstanceOfJqueryEvent(arg);
    };
    ComponentEvents.prototype.getQueryStateEventName = function (eventType, attribute) {
        return this.getModelEvent(this.owner.queryStateModel, eventType, attribute);
    };
    ComponentEvents.prototype.getComponentOptionEventName = function (eventType, attribute) {
        return this.getModelEvent(this.owner.componentOptionsModel, eventType, attribute);
    };
    ComponentEvents.prototype.getModelEvent = function (model, eventType, attribute) {
        var evtName;
        if (eventType && attribute) {
            evtName = model.getEventName(eventType + attribute);
        }
        else {
            evtName = model.getEventName(eventType);
        }
        return evtName;
    };
    return ComponentEvents;
}());
exports.ComponentEvents = ComponentEvents;
/**
 * The base class for every component in the framework.
 */
var Component = /** @class */ (function (_super) {
    __extends(Component, _super);
    /**
     * Create a new Component. Resolve all {@link IComponentBindings} if not provided.<br/>
     * Create a new Logger for this component.
     * Attach the component to the {@link SearchInterface}.<br/>
     * @param element The HTMLElement on which to create the component. Used to bind data on the element.
     * @param type The unique identifier for this component. See: {@link IComponentDefinition.ID}. Used to generate the unique Coveo CSS class associated with every component.
     * @param bindings The environment for every component. Optional, but omitting to provide one will impact performance.
     */
    function Component(element, type, bindings) {
        if (bindings === void 0) { bindings = {}; }
        var _this = _super.call(this, element, type) || this;
        _this.element = element;
        _this.type = type;
        _this.bind = new Component.ComponentEventClass(_this);
        _this.root = bindings.root || Component.resolveRoot(element);
        _this.queryStateModel = bindings.queryStateModel || _this.resolveQueryStateModel();
        _this.componentStateModel = bindings.componentStateModel || _this.resolveComponentStateModel();
        _this.queryController = bindings.queryController || _this.resolveQueryController();
        _this.searchInterface = bindings.searchInterface || _this.resolveSearchInterface();
        _this.componentOptionsModel = bindings.componentOptionsModel || _this.resolveComponentOptionsModel();
        _this.ensureDom = _.once(function () { return _this.createDom(); });
        if (_this.searchInterface != null) {
            _this.searchInterface.attachComponent(type, _this);
        }
        _this.initDebugInfo();
        return _this;
    }
    /**
     * Return the bindings, or environment, for the current component.
     * @returns {IComponentBindings}
     */
    Component.prototype.getBindings = function () {
        return {
            root: this.root,
            queryStateModel: this.queryStateModel,
            queryController: this.queryController,
            searchInterface: this.searchInterface,
            componentStateModel: this.componentStateModel,
            componentOptionsModel: this.componentOptionsModel,
            usageAnalytics: this.usageAnalytics
        };
    };
    Object.defineProperty(Component.prototype, "usageAnalytics", {
        /**
         * A reference to the {@link Analytics.client}.
         */
        get: function () {
            return this.resolveUA();
        },
        enumerable: true,
        configurable: true
    });
    Component.prototype.createDom = function () {
        // By default we do nothing
    };
    Component.prototype.resolveSearchInterface = function () {
        return Component.resolveBinding(this.element, SearchInterface_1.SearchInterface);
    };
    Component.prototype.resolveQueryController = function () {
        return Component.resolveBinding(this.element, QueryController_1.QueryController);
    };
    Component.prototype.resolveComponentStateModel = function () {
        return Component.resolveBinding(this.element, ComponentStateModel_1.ComponentStateModel);
    };
    Component.prototype.resolveQueryStateModel = function () {
        return Component.resolveBinding(this.element, QueryStateModel_1.QueryStateModel);
    };
    Component.prototype.resolveComponentOptionsModel = function () {
        return Component.resolveBinding(this.element, ComponentOptionsModel_1.ComponentOptionsModel);
    };
    Component.prototype.resolveUA = function () {
        return this.searchInterface && this.searchInterface.usageAnalytics ? this.searchInterface.usageAnalytics : new NoopAnalyticsClient_1.NoopAnalyticsClient();
    };
    Component.prototype.resolveResult = function () {
        return Component.getResult(this.element);
    };
    Component.prototype.removeTabSupport = function () {
        if (this.element.hasAttribute('data-tab')) {
            this.logger.warn('The "data-tab" attribute is not supported for this component and was removed.');
            this.element.removeAttribute('data-tab');
        }
        if (this.element.hasAttribute('data-tab-not')) {
            this.logger.warn('The "data-tab-not" attribute is not supported for this component and was removed.');
            this.element.removeAttribute('data-tab-not');
        }
    };
    Component.prototype.initDebugInfo = function () {
        var _this = this;
        Dom_1.$$(this.element).on('dblclick', function (e) {
            if (e.altKey) {
                var debugInfo = _this.debugInfo();
                if (debugInfo != null) {
                    Dom_1.$$(_this.root).trigger(DebugEvents_1.DebugEvents.showDebugPanel, _this.debugInfo());
                }
            }
        });
    };
    /**
     * Get the bound component to the given HTMLElement. Throws an assert if the HTMLElement has no component bound, unless using the noThrow argument.<br/>
     * If there is multiple component bound to the current HTMLElement, you must specify the component class.
     * @param element HTMLElement for which to get the bound component.
     * @param componentClass Optional component class. If the HTMLElement has multiple components bound, you must specify which one you are targeting.
     * @param noThrow Boolean option to tell the method to not throw on error.
     * @returns {Component}
     */
    Component.get = function (element, componentClass, noThrow) {
        Assert_1.Assert.exists(element);
        if (_.isString(componentClass)) {
            return element[Component.computeCssClassNameForType(componentClass)];
        }
        else if (Utils_1.Utils.exists(componentClass)) {
            Assert_1.Assert.exists(componentClass.ID);
            return element[Component.computeCssClassNameForType(componentClass.ID)];
        }
        else {
            // No class specified, but we support returning the bound component
            // if there is exactly one.
            var boundComponents = BaseComponent_1.BaseComponent.getBoundComponentsForElement(element);
            if (!noThrow) {
                Assert_1.Assert.check(boundComponents.length <= 1, 'More than one component is bound to this element. You need to specify the component type.');
            }
            return boundComponents[0];
        }
    };
    Component.getResult = function (element, noThrow) {
        if (noThrow === void 0) { noThrow = false; }
        var resultElement = Dom_1.$$(element).closest('.CoveoResult');
        Assert_1.Assert.check(noThrow || resultElement != undefined);
        return resultElement['CoveoResult'];
    };
    Component.bindResultToElement = function (element, result) {
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(result);
        Dom_1.$$(element).addClass('CoveoResult');
        element['CoveoResult'] = result;
        var jQuery = JQueryutils_1.JQueryUtils.getJQuery();
        if (jQuery) {
            jQuery(element).data(result);
        }
    };
    Component.bindFoldedResultToElement = function (element) {
        Assert_1.Assert.exists(element);
        Dom_1.$$(element).addClass('coveo-result-folding-child-result');
    };
    Component.resolveRoot = function (element) {
        Assert_1.Assert.exists(element);
        var resolvedSearchInterface = Component.resolveBinding(element, SearchInterface_1.SearchInterface);
        if (resolvedSearchInterface) {
            return resolvedSearchInterface.element;
        }
        var resolvedRootFromParent = Component.findRootInParents(element);
        if (resolvedRootFromParent) {
            return resolvedRootFromParent;
        }
        return document.body;
    };
    Component.resolveBinding = function (element, componentClass) {
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(componentClass);
        Assert_1.Assert.exists(componentClass.ID);
        var targetClassName = Component.computeCssClassNameForType(componentClass.ID);
        var found;
        if (Dom_1.$$(element).is('.' + targetClassName)) {
            found = element;
        }
        else {
            // first, look down
            var findDown = Dom_1.$$(element).findClass(targetClassName);
            if (findDown && findDown.length !== 0) {
                found = findDown[0];
            }
            else {
                var findUp = Dom_1.$$(element).closest(targetClassName);
                if (findUp) {
                    found = findUp;
                }
            }
        }
        if (found) {
            return found[targetClassName];
        }
        else {
            return undefined;
        }
    };
    Component.pointElementsToDummyForm = function (element) {
        var inputs = Dom_1.$$(element).is('input') ? [element] : [];
        inputs = inputs.concat(Dom_1.$$(element).findAll('input'));
        _.each(_.compact(inputs), function (input) {
            input.setAttribute('form', 'coveo-dummy-form');
        });
    };
    Component.findRootInParents = function (element) {
        var boundComponents = Component.getBoundComponentsForElement(element);
        for (var i = 0; i < boundComponents.length; i++) {
            var component = boundComponents[i];
            if (component instanceof Component) {
                return component.root;
            }
        }
        if (!element.parentElement) {
            return null;
        }
        return Component.findRootInParents(element.parentElement);
    };
    Component.ComponentEventClass = ComponentEvents;
    return Component;
}(BaseComponent_1.BaseComponent));
exports.Component = Component;


/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var Assert_1 = __webpack_require__(5);
var Logger_1 = __webpack_require__(9);
var Dom_1 = __webpack_require__(1);
var SVGIcons_1 = __webpack_require__(12);
var Utils_1 = __webpack_require__(4);
var ComponentOptionsLoader_1 = __webpack_require__(384);
var ComponentOptionsMerger_1 = __webpack_require__(385);
var ComponentOptionsPostProcessor_1 = __webpack_require__(386);
var ComponentOptionsValidator_1 = __webpack_require__(387);
var IComponentOptions_1 = __webpack_require__(51);
var TemplateComponentOptions_1 = __webpack_require__(63);
var camelCaseToHyphenRegex = /([A-Z])|\W+(\w)/g;
var fieldsSeperator = /\s*,\s*/;
var localizer = /([a-zA-Z\-]+)\s*:\s*(([^,]|,\s*(?!([a-zA-Z\-]+)\s*:))+)/g;
/**
 * The `ComponentOptions` static class contains methods allowing the Coveo JavaScript Search Framework to initialize
 * component options.
 *
 * Typically, each [`Component`]{@link Component} that exposes a set of options contains a static `options` property.
 *
 * This property "builds" each option using the `ComponentOptions` method corresponding to its type (e.g.,
 * [`buildBooleanOption`]{@link ComponentOptions.buildBooleanOption},
 * [`buildFieldOption`]{@link ComponentOptions.buildFieldOption},
 * [`buildStringOption`]{@link ComponentOptions.buildStringOption}, etc.)
 */
var ComponentOptions = /** @class */ (function () {
    function ComponentOptions() {
    }
    ComponentOptions.buildTemplateOption = function (optionArgs) {
        return TemplateComponentOptions_1.TemplateComponentOptions.buildTemplateOption(optionArgs);
    };
    /**
     * Builds a boolean option.
     *
     * **Markup Examples:**
     *
     * > `data-foo="true"`
     *
     * > `data-foo="false"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {boolean} The resulting option value.
     */
    ComponentOptions.buildBooleanOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.BOOLEAN, ComponentOptions.loadBooleanOption, optionArgs);
    };
    /**
     * Builds a number option.
     *
     * A number option can be an integer or a float in the markup.
     *
     * **Note:**
     *
     * > To build a float option, you need to set the `float` property in the [`IComponentOptionsNumberOptionArgs`]{@link IComponentOptionsNumberOptionArgs} to `true`.
     *
     * **Markup Examples:**
     *
     * > `data-foo="3"`
     *
     * > `data-foo="1.5"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {number} The resulting option value.
     */
    ComponentOptions.buildNumberOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.NUMBER, ComponentOptions.loadNumberOption, optionArgs);
    };
    /**
     * Builds a string option.
     *
     * A string option can be any arbitrary string in the markup.
     *
     * **Markup Example:**
     *
     * > `data-foo="bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildStringOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.STRING, ComponentOptions.loadStringOption, optionArgs);
    };
    /**
     * Builds an icon option.
     *
     * This takes an SVG icon name, validates it and returns the name of the icon.
     * **Markup Examples:**
     *
     * > `data-foo="search"`
     *
     * > `data-foo="facet-expand"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildIconOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.ICON, ComponentOptions.loadIconOption, optionArgs);
    };
    /**
     * Builds a color option.
     *
     * Normally, this simply builds a string that matches a CSS color.
     *
     * **Note:**
     *
     * > In the markup, this offers no advantage over using a plain string. This is mostly useful for the Coveo JavaScript
     * > Interface Editor.
     *
     * **Markup Examples:**
     *
     * > `data-foo="coveo-sprites-user"`
     *
     * > `data-foo="coveo-sprites-database"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildColorOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.COLOR, ComponentOptions.loadStringOption, optionArgs);
    };
    /**
     * Builds a helper option.
     *
     * Normally, this simply builds a string that matches the name of a template helper.
     *
     * **Note:**
     *
     * > In the markup, this offers no advantage over using a plain string. This is mostly useful for the Coveo JavaScript
     * > Interface Editor.
     *
     * **Markup Examples:**
     *
     * > `data-foo="date"`
     *
     * > `data-foo="dateTime"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildHelperOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.HELPER, ComponentOptions.loadStringOption, optionArgs);
    };
    /**
     * Tries to parse a stringified JSON option.
     *
     * If unsuccessful (because of invalid syntax), the JSON option is ignored altogether, and the console displays a warning message.
     *
     * **Markup Example:**
     *
     * > `data-foo='{"bar" : "baz"}'`
     *
     * **Note:**
     *
     * A JSON option can always be set as a property in the `init` call of the framework rather than as a `data-` property in the corresponding HTMLElement markup.
     *
     * **Initialization Example:**
     *
     * ```
     * Coveo.init(root, {
     *   Facet : {
     *     foo : {
     *       "bar" : "baz"
     *     }
     *   }
     * })
     * ```
     * @param optionArgs The arguments to apply when building the option.
     * @returns {T} The resulting option value.
     */
    ComponentOptions.buildJsonOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.JSON, ComponentOptions.loadJsonObjectOption, optionArgs);
    };
    /**
     * @deprecated Use buildJsonOption instead
     *
     * @deprecatedsince [2017 Javascript Search Framework Releases](https://docs.coveo.com/en/373/#december-2017-release-v236794)
     */
    ComponentOptions.buildJsonObjectOption = function (optionArgs) {
        return ComponentOptions.buildJsonOption(optionArgs);
    };
    /**
     * Builds a localized string option.
     *
     * A localized string option can be any arbitrary string.
     *
     * When parsing the value, the Coveo JavaScript Search Framework tries to load the localization for that string, if it
     * is available.
     *
     * If it is not available, it returns the non-localized value.
     *
     * This should be used for options that will be rendered directly to the end users.
     *
     * **Markup Example:**
     *
     * > `data-foo="bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildLocalizedStringOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.LOCALIZED_STRING, ComponentOptions.loadLocalizedStringOption, optionArgs);
    };
    /**
     * Builds a field option.
     *
     * A field option validates whether the field has a valid name. This means that the string must start with the `@`
     * character.
     *
     * **Markup Example:**
     *
     * > `data-foo="@bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildFieldOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.FIELD, ComponentOptions.loadFieldOption, optionArgs);
    };
    /**
     * Builds an array of fields option.
     *
     * As with all options that expect an array, you should use commas to delimit the different values.
     *
     * **Markup Example:**
     *
     * > `data-foo="@bar,@baz"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string[]} The resulting option value.
     */
    ComponentOptions.buildFieldsOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.FIELDS, ComponentOptions.loadFieldsOption, optionArgs);
    };
    /**
     * Builds a query expression option.
     *
     * The query expression option should follow the [Coveo Cloud Query Syntax Reference](https://docs.coveo.com/en/1552/).
     *
     * **Markup Example:**
     *
     * > `data-foo="@bar==baz"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {IQueryExpression} The resulting option value.
     */
    ComponentOptions.buildQueryExpressionOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.QUERY_EXPRESSION, ComponentOptions.loadStringOption, optionArgs);
    };
    /**
     * Builds an array of strings option.
     *
     * As with all options that expect an array, you should use commas to delimit the different values.
     *
     * **Markup Example:**
     *
     * > `data-foo="bar,baz"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {string[]} The resulting option value.
     */
    ComponentOptions.buildListOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.LIST, ComponentOptions.loadListOption, optionArgs);
    };
    /**
     * Builds an option that allow to select an HTMLElement.
     *
     * The option accepts a CSS selector matching the required HTMLElement. This selector can either be a class, or an ID
     * selector.
     *
     * **Markup Examples:**
     *
     * > `data-foo-selector=".bar"`
     *
     * > `data-foo-selector="#bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {HTMLElement} The resulting option value.
     */
    ComponentOptions.buildSelectorOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.SELECTOR, ComponentOptions.loadSelectorOption, optionArgs);
    };
    ComponentOptions.buildChildHtmlElementOption = function (optionArgs) {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.CHILD_HTML_ELEMENT, ComponentOptions.loadChildHtmlElementOption, optionArgs);
    };
    ComponentOptions.buildCustomOption = function (converter, optionArgs) {
        var loadOption = function (element, name, option) {
            var stringvalue = ComponentOptions.loadStringOption(element, name, option);
            if (!Utils_1.Utils.isNullOrEmptyString(stringvalue)) {
                return converter(stringvalue);
            }
        };
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.STRING, loadOption, optionArgs);
    };
    ComponentOptions.buildCustomListOption = function (converter, optionArgs) {
        var loadOption = function (element, name, option) {
            var stringvalue = ComponentOptions.loadListOption(element, name, option);
            return converter(stringvalue);
        };
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.LIST, loadOption, optionArgs);
    };
    ComponentOptions.buildObjectOption = function (optionArgs) {
        var loadOption = function (element, name, option) {
            var extractedKeys = underscore_1.keys(optionArgs.subOptions);
            var scopedOptions = {};
            var scopedValues = {};
            for (var i = 0; i < extractedKeys.length; i++) {
                var key = extractedKeys[i];
                var scopedkey = ComponentOptions.mergeCamelCase(name, key);
                scopedOptions[scopedkey] = optionArgs.subOptions[key];
            }
            ComponentOptions.initOptions(element, scopedOptions, scopedValues, '');
            var resultValues = {};
            var resultFound = false;
            for (var i = 0; i < extractedKeys.length; i++) {
                var key = extractedKeys[i];
                var scopedkey = ComponentOptions.mergeCamelCase(name, key);
                if (scopedValues[scopedkey] != null) {
                    resultValues[key] = scopedValues[scopedkey];
                    resultFound = true;
                }
            }
            return resultFound ? resultValues : null;
        };
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.OBJECT, loadOption, optionArgs);
    };
    /**
     * Builds a field condition option.
     *
     * A field condition option defines a field-based condition that must be dynamically evaluated against,
     * and satisfied by a query result item in order to initialize a result template component.
     *
     * **Markup Example:**
     *
     * ```html
     * data-condition-field-author="Alice Smith, Bob Jones"
     * data-condition-field-not-filetype="pdf"`
     * ```
     *
     * @returns {string} The resulting option value.
     */
    ComponentOptions.buildFieldConditionOption = function () {
        return ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.FIELD, ComponentOptions.loadFieldConditionOption);
    };
    ComponentOptions.buildOption = function (type, load, optionArg) {
        if (optionArg === void 0) { optionArg = {}; }
        var option = optionArg;
        option.type = type;
        option.load = load;
        return option;
    };
    ComponentOptions.attrNameFromName = function (name, optionArgs) {
        if (optionArgs && optionArgs.attrName) {
            return optionArgs.attrName;
        }
        if (name) {
            return 'data-' + ComponentOptions.camelCaseToHyphen(name);
        }
        return name;
    };
    ComponentOptions.camelCaseToHyphen = function (name) {
        return name.replace(camelCaseToHyphenRegex, '-$1$2').toLowerCase();
    };
    ComponentOptions.mergeCamelCase = function (parent, name) {
        return parent + name.substr(0, 1).toUpperCase() + name.substr(1);
    };
    /**
     * Loads and parses the options of the current element.
     *
     * Each component calls this method in its constructor.
     *
     * @param element The element whose markup options the method should load and parse.
     * @param component The class of the component whose options the method should load and parse (e.g., `Searchbox`,
     * `Facet`, etc.)
     * @param values The additional options which the method should merge with the specified markup option values.
     */
    ComponentOptions.initComponentOptions = function (element, component, values) {
        return ComponentOptions.initOptions(element, component.options, values, component.ID);
    };
    ComponentOptions.initOptions = function (element, options, values, componentID) {
        if (values === void 0) { values = {}; }
        if (Utils_1.Utils.isNullOrUndefined(values)) {
            values = {};
        }
        underscore_1.each(options, function (optionDefinition, name) {
            var value = new ComponentOptionsLoader_1.ComponentOptionLoader(element, values, name, optionDefinition).load();
            new ComponentOptionsMerger_1.ComponentOptionsMerger(optionDefinition, { value: value, name: name }, values).merge();
            new ComponentOptionsValidator_1.ComponentOptionsValidator(optionDefinition, { componentID: componentID, name: name, value: value }, values).validate();
        });
        new ComponentOptionsPostProcessor_1.ComponentOptionsPostProcessor(options, values, componentID).postProcess();
        return values;
    };
    ComponentOptions.tryLoadFromAttribute = function (element, name, optionDefinition) {
        var loadFromAttribute = optionDefinition.load;
        if (!loadFromAttribute) {
            return null;
        }
        return loadFromAttribute(element, name, optionDefinition);
    };
    ComponentOptions.loadStringOption = function (element, name, option) {
        return element.getAttribute(ComponentOptions.attrNameFromName(name, option)) || ComponentOptions.getAttributeFromAlias(element, option);
    };
    ComponentOptions.loadIconOption = function (element, name, option) {
        var svgIconName = ComponentOptions.loadStringOption(element, name, option);
        if (svgIconName == null) {
            return null;
        }
        // Old card templates icons used these values as the icon option. These names have changed since we moved to SVG.
        // This avoids breaking old default templates that people may still have after moving to 2.0.
        svgIconName = svgIconName.replace('coveo-sprites-replies', 'replies');
        svgIconName = svgIconName.replace('coveo-sprites-main-search-active', 'search');
        if (Utils_1.Utils.isNullOrUndefined(SVGIcons_1.SVGIcons.icons[svgIconName])) {
            new Logger_1.Logger(element).warn("Icon with name " + svgIconName + " not found.");
            return null;
        }
        svgIconName = Utils_1.Utils.toCamelCase(svgIconName);
        return svgIconName;
    };
    ComponentOptions.loadFieldOption = function (element, name, option) {
        var field = ComponentOptions.loadStringOption(element, name, option);
        Assert_1.Assert.check(!Utils_1.Utils.isNonEmptyString(field) || Utils_1.Utils.isCoveoField(field), field + ' is not a valid field');
        return field;
    };
    ComponentOptions.loadFieldConditionOption = function (element, name, option) {
        var attrs = Dom_1.Dom.nodeListToArray(element.attributes).filter(function (attribute) {
            return Utils_1.Utils.stringStartsWith(attribute.nodeName, 'data-condition-field-');
        });
        return attrs.length != 0
            ? attrs.map(function (attribute) { return ({
                field: attribute.nodeName.replace('data-condition-field-not-', '').replace('data-condition-field-', ''),
                values: Utils_1.Utils.isNonEmptyString(attribute.nodeValue) ? attribute.nodeValue.split(/\s*,\s*/) : null,
                reverseCondition: attribute.nodeName.indexOf('data-condition-field-not-') == 0
            }); })
            : undefined;
    };
    ComponentOptions.loadFieldsOption = function (element, name, option) {
        var fieldsAttr = ComponentOptions.loadStringOption(element, name, option);
        if (fieldsAttr == null) {
            return null;
        }
        var fields = fieldsAttr.split(fieldsSeperator);
        underscore_1.each(fields, function (field) {
            Assert_1.Assert.check(Utils_1.Utils.isCoveoField(field), field + ' is not a valid field');
        });
        return fields;
    };
    ComponentOptions.loadLocalizedStringOption = function (element, name, option) {
        var attributeValue = ComponentOptions.loadStringOption(element, name, option);
        var locale = String['locale'] || String['defaultLocale'];
        if (locale != null && attributeValue != null) {
            var localeParts_1 = locale.toLowerCase().split('-');
            var locales = underscore_1.map(localeParts_1, function (part, i) { return localeParts_1.slice(0, i + 1).join('-'); });
            var localizers = attributeValue.match(localizer);
            if (localizers != null) {
                for (var i = 0; i < localizers.length; i++) {
                    var groups = localizer.exec(localizers[i]);
                    if (groups != null) {
                        var lang = groups[1].toLowerCase();
                        if (underscore_1.contains(locales, lang)) {
                            return groups[2].replace(/^\s+|\s+$/g, '');
                        }
                    }
                }
            }
            return attributeValue != null ? attributeValue.toLocaleString() : null;
        }
        return attributeValue;
    };
    ComponentOptions.loadNumberOption = function (element, name, option) {
        var attributeValue = ComponentOptions.loadStringOption(element, name, option);
        if (attributeValue == null) {
            return null;
        }
        var numberValue = option.float === true ? Utils_1.Utils.parseFloatIfNotUndefined(attributeValue) : Utils_1.Utils.parseIntIfNotUndefined(attributeValue);
        if (option.min != null && option.min > numberValue) {
            new Logger_1.Logger(element).info("Value for option " + name + " is less than the possible minimum (Value is " + numberValue + ", minimum is " + option.min + "). It has been forced to its minimum value.", option);
            numberValue = option.min;
        }
        if (option.max != null && option.max < numberValue) {
            new Logger_1.Logger(element).info("Value for option " + name + " is higher than the possible maximum (Value is " + numberValue + ", maximum is " + option.max + "). It has been forced to its maximum value.", option);
            numberValue = option.max;
        }
        return numberValue;
    };
    ComponentOptions.loadBooleanOption = function (element, name, option) {
        return Utils_1.Utils.parseBooleanIfNotUndefined(ComponentOptions.loadStringOption(element, name, option));
    };
    ComponentOptions.loadListOption = function (element, name, option) {
        var separator = option.separator || /\s*,\s*/;
        var attributeValue = ComponentOptions.loadStringOption(element, name, option);
        return Utils_1.Utils.isNonEmptyString(attributeValue) ? attributeValue.split(separator) : null;
    };
    ComponentOptions.loadEnumOption = function (element, name, option, _enum) {
        var enumAsString = ComponentOptions.loadStringOption(element, name, option);
        return enumAsString != null ? _enum[enumAsString] : null;
    };
    ComponentOptions.loadJsonObjectOption = function (element, name, option) {
        var jsonAsString = ComponentOptions.loadStringOption(element, name, option);
        if (jsonAsString == null) {
            return null;
        }
        try {
            return JSON.parse(jsonAsString);
        }
        catch (exception) {
            new Logger_1.Logger(element).info("Value for option " + name + " is not a valid JSON string (Value is " + jsonAsString + "). It has been disabled.", exception);
            return null;
        }
    };
    ComponentOptions.loadSelectorOption = function (element, name, option, doc) {
        if (doc === void 0) { doc = document; }
        var attributeValue = ComponentOptions.loadStringOption(element, name, option);
        return Utils_1.Utils.isNonEmptyString(attributeValue) ? doc.querySelector(attributeValue) : null;
    };
    ComponentOptions.loadChildHtmlElementOption = function (element, name, option, doc) {
        if (doc === void 0) { doc = document; }
        var htmlElement;
        // Attribute: selector
        var selectorAttr = option.selectorAttr || ComponentOptions.attrNameFromName(name, option) + '-selector';
        var selector = element.getAttribute(selectorAttr) || ComponentOptions.getAttributeFromAlias(element, option);
        if (selector != null) {
            htmlElement = doc.body.querySelector(selector);
        }
        // Child
        if (htmlElement == null) {
            var childSelector = option.childSelector;
            if (childSelector == null) {
                childSelector = '.' + name;
            }
            htmlElement = ComponentOptions.loadChildHtmlElementFromSelector(element, childSelector);
        }
        return htmlElement;
    };
    ComponentOptions.loadChildHtmlElementFromSelector = function (element, selector) {
        Assert_1.Assert.isNonEmptyString(selector);
        if (Dom_1.$$(element).is(selector)) {
            return element;
        }
        return Dom_1.$$(element).find(selector);
    };
    ComponentOptions.loadChildrenHtmlElementFromSelector = function (element, selector) {
        Assert_1.Assert.isNonEmptyString(selector);
        return Dom_1.$$(element).findAll(selector);
    };
    ComponentOptions.findParentScrolling = function (element, doc) {
        if (doc === void 0) { doc = document; }
        element = this.findParentScrollLockable(element, doc);
        return element instanceof HTMLBodyElement || !ComponentOptions.isElementScrollable(element) ? window : element;
    };
    ComponentOptions.findParentScrollLockable = function (element, doc) {
        if (doc === void 0) { doc = document; }
        if (!element) {
            return doc.body;
        }
        if (ComponentOptions.isElementScrollable(element) || element instanceof HTMLBodyElement || !element.parentElement) {
            return element;
        }
        return ComponentOptions.findParentScrollLockable(element.parentElement, doc);
    };
    ComponentOptions.isElementScrollable = function (element) {
        var overflowProperty = Dom_1.$$(element).css('overflow-y');
        return overflowProperty == 'scroll' || overflowProperty == 'auto';
    };
    ComponentOptions.getAttributeFromAlias = function (element, option) {
        if (underscore_1.isArray(option.alias)) {
            var attributeFound_1;
            underscore_1.each(option.alias, function (alias) {
                var attributeFoundWithThisAlias = element.getAttribute(ComponentOptions.attrNameFromName(alias));
                if (attributeFoundWithThisAlias) {
                    attributeFound_1 = attributeFoundWithThisAlias;
                }
            });
            return attributeFound_1;
        }
        if (option.alias) {
            return element.getAttribute(ComponentOptions.attrNameFromName(option.alias));
        }
        else {
            return undefined;
        }
    };
    return ComponentOptions;
}());
exports.ComponentOptions = ComponentOptions;


/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// Ensure that we're not going to get console is undefined error in IE8-9
Object.defineProperty(exports, "__esModule", { value: true });
/* istanbul ignore next */
if (!window['console']) {
    console = {
        log: function () { },
        debug: function () { },
        info: function () { },
        warn: function () { },
        error: function () { },
        assert: function () { },
        clear: function () { },
        count: function () { },
        dir: function () { },
        dirxml: function () { },
        group: function () { },
        groupCollapsed: function () { },
        groupEnd: function () { },
        msIsIndependentlyComposed: function (element) { },
        profile: function () { },
        profileEnd: function () { },
        select: function () { },
        time: function () { },
        timeEnd: function () { },
        trace: function () { }
    };
}
/* istanbul ignore next */
var Logger = /** @class */ (function () {
    function Logger(owner) {
        this.owner = owner;
    }
    Logger.prototype.trace = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        if (Logger.level <= Logger.TRACE) {
            this.log('TRACE', stuff);
        }
    };
    Logger.prototype.debug = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        if (Logger.level <= Logger.DEBUG) {
            this.log('DEBUG', stuff);
        }
    };
    Logger.prototype.info = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        if (Logger.level <= Logger.INFO) {
            this.log('INFO', stuff);
        }
    };
    Logger.prototype.warn = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        if (Logger.level <= Logger.WARN) {
            this.log('WARN', stuff);
        }
    };
    Logger.prototype.error = function () {
        var stuff = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            stuff[_i] = arguments[_i];
        }
        if (Logger.level <= Logger.ERROR) {
            this.log('ERROR', stuff);
        }
    };
    Logger.prototype.log = function (level, stuff) {
        if (window['console'] && console.log) {
            if (console.error && level == 'ERROR') {
                console.error([level, this.owner].concat(stuff));
            }
            else if (console.info && level == 'INFO') {
                console.info([level, this.owner].concat(stuff));
            }
            else if (console.warn && level == 'WARN') {
                console.warn([level, this.owner].concat(stuff));
            }
            else {
                console.log([level, this.owner].concat(stuff));
            }
            if (Logger.executionTime) {
                console.timeEnd('Execution time');
                console.time('Execution time');
            }
        }
    };
    Logger.enable = function () {
        Logger.level = Logger.TRACE;
    };
    Logger.disable = function () {
        Logger.level = Logger.NOTHING;
    };
    Logger.TRACE = 1;
    Logger.DEBUG = 2;
    Logger.INFO = 3;
    Logger.WARN = 4;
    Logger.ERROR = 5;
    Logger.NOTHING = 6;
    Logger.level = Logger.INFO;
    Logger.executionTime = false;
    return Logger;
}());
exports.Logger = Logger;


/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsSmartSnippetFeedbackReason;
(function (AnalyticsSmartSnippetFeedbackReason) {
    AnalyticsSmartSnippetFeedbackReason["DoesNotAnswer"] = "does_not_answer";
    AnalyticsSmartSnippetFeedbackReason["PartiallyAnswers"] = "partially_answers";
    AnalyticsSmartSnippetFeedbackReason["WasNotAQuestion"] = "was_not_a_question";
    AnalyticsSmartSnippetFeedbackReason["Other"] = "other";
})(AnalyticsSmartSnippetFeedbackReason = exports.AnalyticsSmartSnippetFeedbackReason || (exports.AnalyticsSmartSnippetFeedbackReason = {}));
exports.analyticsActionCauseList = {
    /**
     * Identifies the search event that gets logged when the initial query is performed as a result of loading a search interface.
     *
     * `actionCause`: `'interfaceLoad'`
     * `actionType`: `'interface'`
     */
    interfaceLoad: {
        name: 'interfaceLoad',
        type: 'interface'
    },
    /**
     * Identifies the search event that gets logged when a new tab is selected in the search interface.
     *
     * `actionCause`: `'interfaceChange'`
     * `actionType`: `'interface'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"interfaceChangeTo"`: <newTabId>
     */
    interfaceChange: {
        name: 'interfaceChange',
        type: 'interface'
    },
    /**
     * Identifies the search event that gets logged when any `hd` or `hq` gets cleared from {@link QueryStateModel}, and then triggers a new query.
     *
     * `actionCause`: `'contextRemove'`
     * `actionType`: `'misc'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"contextName"`: <contextName>
     */
    contextRemove: {
        name: 'contextRemove',
        type: 'misc'
    },
    /**
     * Identifies the search event that gets logged when `enableAutoCorrection: true` and the query is automatically corrected.
     *
     * `actionCause`: `'didyoumeanAutomatic'`
     * `actionType`: `'misc'`
     */
    didyoumeanAutomatic: {
        name: 'didyoumeanAutomatic',
        type: 'misc'
    },
    /**
     * Identifies the search event that gets logged when the query suggestion with the corrected term is selected and successfully updates the query.
     *
     * `actionCause`: `'didyoumeanClick'`
     * `actionType`: `'misc'`
     */
    didyoumeanClick: {
        name: 'didyoumeanClick',
        type: 'misc'
    },
    /**
     * Identifies the search event that gets logged when a sorting method is selected.
     *
     * `actionCause`: `'resultsSort'`
     * `actionType`: `'misc'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"resultsSortBy"`: <sortingCategory>
     */
    resultsSort: {
        name: 'resultsSort',
        type: 'misc'
    },
    /**
     * Identifies the search event that gets logged when a submit button is selected on a search box.
     *
     * `actionCause`: `'searchboxSubmit'`
     * `actionType`: `'search box'`
     */
    searchboxSubmit: {
        name: 'searchboxSubmit',
        type: 'search box'
    },
    /**
     * Identifies the search event that gets logged when a clear button is selected on a search box.
     *
     * `actionCause`: `'searchboxClear'`
     * `actionType`: `'search box'`
     */
    searchboxClear: {
        name: 'searchboxClear',
        type: 'search box'
    },
    /**
     * The search-as-you-type event that gets logged when a query is automatically generated, and results are displayed while a user is entering text in the search box before they voluntarily submit the query.
     *
     * `actionCause`: `'searchboxAsYouType'`
     * `actionType`: `'search box'`
     */
    searchboxAsYouType: {
        name: 'searchboxAsYouType',
        type: 'search box'
    },
    /**
     * The search-as-you-type event that gets logged when a breadcrumb facet is selected and the query is updated.
     *
     * `actionCause`: `'breadcrumbFacet'`
     * `actionType`: `'breadcrumb'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"facetId":`: <correspondingFacetId>
     */
    breadcrumbFacet: {
        name: 'breadcrumbFacet',
        type: 'breadcrumb'
    },
    /**
     * Identifies the search event that gets logged when a user clears all values from the advanced search filter summary.
     *
     * `actionCause`: `'breadcrumbAdvancedSearch'`
     * `actionType`: `'breadcrumb'`
     */
    breadcrumbAdvancedSearch: {
        name: 'breadcrumbAdvancedSearch',
        type: 'breadcrumb'
    },
    /**
     * Identifies the search event that gets logged when the event to clear the current breadcrumbs is triggered.
     *
     * `actionCause`: `'breadcrumbResetAll'`
     * `actionType`: `'breadcrumb'`
     */
    breadcrumbResetAll: {
        name: 'breadcrumbResetAll',
        type: 'breadcrumb'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a tag value from an item tag field to add a filter.
     *
     * `actionCause`: `'documentTag'`
     * `actionType`: `'document'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    documentTag: {
        name: 'documentTag',
        type: 'document'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a field value from an item field to add a filter.
     *
     * `actionCause`: `'documentField'`
     * `actionType`: `'document'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    documentField: {
        name: 'documentField',
        type: 'document'
    },
    /**
     * Identifies the click event that gets logged when the Quick View element is selected and a Quick View modal of the document is displayed.
     *
     * `actionCause`: `'documentQuickview'`
     * `actionType`: `'document'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"documentTitle":`: <correspondingDocumentTitle>
     * `"documentURL":`: <correspondingDocumentURL>
     */
    documentQuickview: {
        name: 'documentQuickview',
        type: 'document'
    },
    /**
     * Identifies the click event that gets logged when a user clicks on a search result to open an item.
     *
     * `actionCause`: `'documentOpen'`
     * `actionType`: `'document'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"documentTitle":`: <correspondingDocumentTitle>
     * `"documentURL":`: <correspondingDocumentURL>
     */
    documentOpen: {
        name: 'documentOpen',
        type: 'document'
    },
    /**
     * Identifies the search event that gets logged when a user selects or deselects a facet filter from the Omnibox.
     *
     * `actionCause`: `'omniboxFacetSelect'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxFacetMeta`](@link IAnalyticsOmniboxFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFacetSelect: {
        name: 'omniboxFacetSelect',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a facet value to filter out results containing this value from the Omnibox.
     *
     * `actionCause`: `'omniboxFacetExclude'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxFacetMeta`](@link IAnalyticsOmniboxFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFacetExclude: {
        name: 'omniboxFacetExclude',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user selects or deselects a facet filter from the Omnibox.
     *
     * `actionCause`: `'omniboxFacetDeselect'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxFacetMeta`](@link IAnalyticsOmniboxFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFacetDeselect: {
        name: 'omniboxFacetDeselect',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a facet value to not filter out results containing this value from the Omnibox.
     *
     * `actionCause`: `'omniboxFacetUnexclude'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxFacetMeta`](@link IAnalyticsOmniboxFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFacetUnexclude: {
        name: 'omniboxFacetUnexclude',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a query suggestion based on the usage analytics recorded queries.
     *
     * `actionCause`: `'omniboxAnalytics'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxSuggestionMeta`](@link IAnalyticsOmniboxSuggestionMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxAnalytics: {
        name: 'omniboxAnalytics',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a suggested search query is selected from a standalone searchbox.
     *
     * `actionCause`: `'omniboxFromLink'`
     * `actionType`: `'omnibox'`
     *
     * The required properties of an [`IAnalyticsOmniboxSuggestionMeta`](@link IAnalyticsOmniboxSuggestionMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    omniboxFromLink: {
        name: 'omniboxFromLink',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when a user selects a query suggestion from a list built from values of a field.
     *
     * `actionCause`: `'omniboxField'`
     * `actionType`: `'omnibox'`
     */
    omniboxField: {
        name: 'omniboxField',
        type: 'omnibox'
    },
    /**
     * Identifies the search event that gets logged when the Clear Facet **X** button is selected.
     *
     * `actionCause`: `'facetClearAll'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetClearAll: {
        name: 'facetClearAll',
        type: 'facet'
    },
    /**
     * Identifies the custom event that gets logged when a query is being typed into the facet search box.
     *
     * `actionCause`: `'facetSearch'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetSearch: {
        name: 'facetSearch',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when the user toggles the facet operator.
     *
     * `actionCause`: `'facetToggle'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetOperatorMeta`](@link IAnalyticsFacetOperatorMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetToggle: {
        name: 'facetToggle',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a facet slider changes range values.
     *
     * `actionCause`: `'facetRangeSlider'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetSliderChangeMeta`](@link IAnalyticsFacetSliderChangeMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetRangeSlider: {
        name: 'facetRangeSlider',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a facet graph changes range values.
     *
     * `actionCause`: `'facetRangeGraph'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetSliderChangeMeta`](@link IAnalyticsFacetSliderChangeMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetRangeGraph: {
        name: 'facetRangeGraph',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a facet check box is selected and the query is updated.
     *
     * `actionCause`: `'facetSelect'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetSelect: {
        name: 'facetSelect',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when all filters on a facet are selected.
     *
     * `actionCause`: `'facetSelectAll'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetSelectAll: {
        name: 'facetSelectAll',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a facet check box is deselected and the query is updated.
     *
     * `actionCause`: `'facetDeselect'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetDeselect: {
        name: 'facetDeselect',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a facet value to filter out results containing the facet value.
     *
     * `actionCause`: `'facetExclude'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetExclude: {
        name: 'facetExclude',
        type: 'facet'
    },
    /**
     * Identifies the search event that gets logged when a user clicks a facet value to not filter out results containing the facet value.
     *
     * `actionCause`: `'facetUnexclude'`
     * `actionType`: `'facet'`
     *
     * The required properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    facetUnexclude: {
        name: 'facetUnexclude',
        type: 'facet'
    },
    facetUpdateSort: {
        name: 'facetUpdateSort',
        type: 'facet'
    },
    /**
     * The custom event that gets logged when an end-user expands a facet to see additional values.
     *
     * `actionCause`: `'showMoreFacetResults'`
     * `actionType`: `'facet'`
     */
    facetShowMore: {
        name: 'showMoreFacetResults',
        type: 'facet'
    },
    /**
     * The custom event that gets logged when an end-user collapses a facet to see less values.
     *
     * `actionCause`: `'showLessFacetResults'`
     * `actionType`: `'facet'`
     */
    facetShowLess: {
        name: 'showLessFacetResults',
        type: 'facet'
    },
    categoryFacetSelect: {
        name: 'categoryFacetSelect',
        type: 'categoryFacet'
    },
    categoryFacetReload: {
        name: 'categoryFacetReload',
        type: 'categoryFacet'
    },
    categoryFacetClear: {
        name: 'categoryFacetClear',
        type: 'categoryFacet'
    },
    categoryFacetBreadcrumb: {
        name: 'categoryFacetBreadcrumb',
        type: 'categoryFacet'
    },
    categoryFacetSearch: {
        name: 'categoryFacetSearch',
        type: 'categoryFacet'
    },
    /**
     * Identifies the search event that gets logged when a DynamicFacet check box is selected and the query is updated.
     *
     * `actionCause`: `'facetSelect'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required and optional properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta)
     * object are added as custom data when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetSelect: {
        name: 'facetSelect',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search event that gets logged when a DynamicFacet check box is deselected and the query is updated.
     *
     * `actionCause`: `'facetDeselect'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required and optional properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta)
     * object are added as custom data when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetDeselect: {
        name: 'facetDeselect',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search event that gets logged when the **Clear** button of the DynamicFacet is clicked.
     *
     * `actionCause`: `'facetClearAll'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required and optional properties of an [`IAnalyticsFacetMeta`](@link IAnalyticsFacetMeta)
     * object are added as custom data when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetClearAll: {
        name: 'facetClearAll',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search event that gets logged when the **Show more** button of the DynamicFacet is clicked.
     *
     * `actionCause`: `'showMoreFacetResults'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required properties of an [`IAnalyticsDynamicFacetMeta`](@link IAnalyticsDynamicFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetShowMore: {
        name: 'showMoreFacetResults',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search event that gets logged when the **Show less** button of the DynamicFacet is clicked.
     *
     * `actionCause`: `'showLessFacetResults'`
     * `actionType`: `'dynamicFacet'`
     *
     * The required properties of an [`IAnalyticsDynamicFacetMeta`](@link IAnalyticsDynamicFacetMeta) object are added as custom data
     * when logging a usage analytics event matching this `actionCause`/`actionType`.
     */
    dynamicFacetShowLess: {
        name: 'showLessFacetResults',
        type: 'dynamicFacet'
    },
    /**
     * Identifies the search and custom event that gets logged when a user clicks the Go Back link after an error page.
     *
     * `actionCause`: `'errorBack'`
     * `actionType`: `'errors'`
     */
    errorBack: {
        name: 'errorBack',
        type: 'errors'
    },
    /**
     * Identifies the search and custom event that gets logged when a user clears the query box after an error page.
     *
     * `actionCause`: `'errorClearQuery'`
     * `actionType`: `'errors'`
     */
    errorClearQuery: {
        name: 'errorClearQuery',
        type: 'errors'
    },
    /**
     * Identifies the search and custom event that gets logged when a user clicks the Retry link after an error page.
     *
     * `actionCause`: `'errorRetry'`
     * `actionType`: `'errors'`
     */
    errorRetry: {
        name: 'errorRetry',
        type: 'errors'
    },
    /**
     * Identifies the search and custom event that gets logged when a user clicks the Cancel last action link when no results are returned following their last action.
     *
     * `actionCause`: `'noResultsBack'`
     * `actionType`: `'noResults'`
     */
    noResultsBack: {
        name: 'noResultsBack',
        type: 'noResults'
    },
    /**
     * In the context of Coveo for Salesforce, this search event is logged when a user switches from a search results list in the Insight Panel to the Expanded Search using the Expanded Search icon.
     *
     * `actionCause`: `'expandToFullUI'`
     * `actionType`: `'interface'`
     */
    expandToFullUI: {
        name: 'expandToFullUI',
        type: 'interface'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this search event is logged when a user fills a form input in the case creation page.
     *
     * `actionCause`: `'inputChange'`
     * `actionType`: `'caseCreation'`
     */
    caseCreationInputChange: {
        name: 'inputChange',
        type: 'caseCreation'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this custom event is logged when a user creates a case by clicking the submit button.
     *
     * `actionCause`: `'submitButton'`
     * `actionType`: `'caseCreation'`
     */
    caseCreationSubmitButton: {
        name: 'submitButton',
        type: 'caseCreation'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this custom event is logged when a user cancels the creation of their case by clicking the cancel button.
     *
     * `actionCause`: `'cancelButton'`
     * `actionType`: `'caseCreation'`
     */
    caseCreationCancelButton: {
        name: 'cancelButton',
        type: 'caseCreation'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this custom event is logged when a user leaves the case creation page.
     *
     * `actionCause`: `'unloadPage'`
     * `actionType`: `'caseCreation'`
     */
    caseCreationUnloadPage: {
        name: 'unloadPage',
        type: 'caseCreation'
    },
    /**
     * In the context of Coveo for Salesforce, this search event is logged when a user checks the Show only contextual result checkbox from the Insight Panel.
     *
     * `actionCause`: `'casecontextAdd'`
     * `actionType`: `'casecontext'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"caseID":`: <correspondingCaseId>
     */
    casecontextAdd: {
        name: 'casecontextAdd',
        type: 'casecontext'
    },
    /**
     * In the context of Coveo for Salesforce, this search event is logged when a user clears the Show only contextual result checkbox from the Insight Panel.
     *
     * `actionCause`: `'casecontextRemove'`
     * `actionType`: `'casecontext'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"caseID":`: <correspondingCaseId>
     */
    casecontextRemove: {
        name: 'casecontextRemove',
        type: 'casecontext'
    },
    /**
     * Identifies the search and custom event that gets logged when a checkbox in the search preferences is toggled.
     *
     * `actionCause`: `'preferencesChange'`
     * `actionType`: `'preferences'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"preferenceName":`: <correspondingPreferenceName>
     * `"preferenceType":`: <correspondingPreferenceType>
     */
    preferencesChange: {
        name: 'preferencesChange',
        type: 'preferences'
    },
    /**
     * In the context of Coveo for Salesforce, this is custom event logged when an agent opens the User Actions panel.
     *
     * `actionCause`: `'getUserHistory'`
     * `actionType`: `'userHistory'`
     */
    getUserHistory: {
        name: 'getUserHistory',
        type: 'userHistory'
    },
    /**
     * In the context of some Coveo for Salesforce user interfaces, this  custom event is logged when an agent clicks a link in the User Actions panel.
     *
     * `actionCause`: `'userActionDocumentClick'`
     * `actionType`: `'userHistory'`
     */
    userActionDocumentClick: {
        name: 'userActionDocumentClick',
        type: 'userHistory'
    },
    /**
     * In the context of Coveo for Salesforce, this custom event is logged when a user attaches a knowledge base article to a case.
     *
     * `actionCause`: `'caseAttach'`
     * `actionType`: `'case'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"documentTitle":`: <correspondingDocumentTitle>
     * `"resultUriHash":`: <correspondingResultUriHash>
     * `"articleID":`: <correspondingArticleId>
     * `"caseID":`: <correspondingCaseID>
     */
    caseAttach: {
        name: 'caseAttach',
        type: 'case'
    },
    /**
     * In the context of Coveo for Salesforce, this custom event is logged when a user detaches a knowledge base article to a case.
     *
     * `actionCause`: `'caseDetach'`
     * `actionType`: `'case'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"documentTitle":`: <correspondingDocumentTitle>
     * `"resultUriHash":`: <correspondingResultUriHash>
     * `"articleID":`: <correspondingArticleId>
     * `"caseID":`: <correspondingCaseID>
     */
    caseDetach: {
        name: 'caseDetach',
        type: 'case'
    },
    /**
     * Identifies the search event that gets logged when a user modifies a custom search filter or removes one from the breadcrumbs.
     *
     * `actionCause`: `'customfiltersChange'`
     * `actionType`: `'customfilters'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"customFilterName":`: <correspondingCustomFilterName>
     * `"customFilterType":`: <correspondingCustomFilterType>
     * `"customFilterExpression":`: <correspondingCustomFilterExpression>
     */
    customfiltersChange: {
        name: 'customfiltersChange',
        type: 'customfilters'
    },
    /**
     * Identifies the custom event that gets logged when a page number is selected and more items are loaded.
     *
     * `actionCause`: `'pagerNumber'`
     * `actionType`: `'getMoreResults'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"pagerNumber":`: <correspondingPageNumber>
     */
    pagerNumber: {
        name: 'pagerNumber',
        type: 'getMoreResults'
    },
    /**
     * Identifies the custom event that gets logged when the Next Page link is selected and more items are loaded.
     *
     * `actionCause`: `'pagerNext'`
     * `actionType`: `'getMoreResults'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"pagerNumber":`: <correspondingPageNumber>
     */
    pagerNext: {
        name: 'pagerNext',
        type: 'getMoreResults'
    },
    /**
     * Identifies the custom event that gets logged when the Previous Page link is selected and more items are loaded.
     *
     * `actionCause`: `'pagerPrevious'`
     * `actionType`: `'getMoreResults'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"pagerNumber":`: <correspondingPageNumber>
     */
    pagerPrevious: {
        name: 'pagerPrevious',
        type: 'getMoreResults'
    },
    /**
     * Identifies the custom event that gets logged when the user scrolls to the bottom of the item page and more results are loaded.
     *
     * `actionCause`: `'pagerScrolling'`
     * `actionType`: `'getMoreResults'`
     */
    pagerScrolling: {
        name: 'pagerScrolling',
        type: 'getMoreResults'
    },
    /**
     * Identifies the custom event that gets logged when the Results per page component is selected.
     *
     * `actionCause`: `'pagerResize'`
     * `actionType`: `'getMoreResults'`
     */
    pagerResize: {
        name: 'pagerResize',
        type: 'getMoreResults'
    },
    /**
     * Identifies the search event that gets logged when the user accepts to share their location (latitude and longitude) with the search page.
     *
     * `actionCause`: `'positionSet'`
     * `actionType`: `'distance'`
     */
    positionSet: {
        name: 'positionSet',
        type: 'distance'
    },
    /**
     * Identifies the search event that gets logged when the search page loads with a query, such as when a user clicks a link pointing to a search results page with a query or enters a query in a standalone search box that points to a search page.
     *
     * `actionCause`: `'searchFromLink'`
     * `actionType`: `'interface'`
     */
    searchFromLink: {
        name: 'searchFromLink',
        type: 'interface'
    },
    /**
     * Identifies the custom event that gets logged when a user action triggers a notification set in the effective query pipeline on the search page.
     *
     * `actionCause`: `'notify'`
     * `actionType`: `'queryPipelineTriggers'`
     */
    triggerNotify: {
        name: 'notify',
        type: 'queryPipelineTriggers'
    },
    /**
     * Identifies the custom event that gets logged when a user action executes a JavaScript function set in the effective query pipeline on the search page.
     *
     * `actionCause`: `'execute'`
     * `actionType`: `'queryPipelineTriggers'`
     */
    triggerExecute: {
        name: 'execute',
        type: 'queryPipelineTriggers'
    },
    /**
     * Identifies the custom event that gets logged when a user action triggers a new query set in the effective query pipeline on the search page.
     *
     * `actionCause`: `'query'`
     * `actionType`: `'queryPipelineTriggers'`
     */
    triggerQuery: {
        name: 'query',
        type: 'queryPipelineTriggers'
    },
    /**
     * Identifies the custom event that gets logged when a user action redirects them to a URL set in the effective query pipeline on the search page.
     *
     * `actionCause`: `'redirect'`
     * `actionType`: `'queryPipelineTriggers'`
     */
    triggerRedirect: {
        name: 'redirect',
        type: 'queryPipelineTriggers'
    },
    /**
     * Identifies the custom event that gets logged when a user query encounters an error during execution.
     *
     * `actionCause`: `'query'`
     * `actionType`: `'errors'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"query":`: <correspondingQuery>
     * `"aq":`: <correspondingAdvancedQuery>
     * `"cq":`: <correspondingConstantQuery>
     * `"dq":`: <correspondingDisjunctiveQuery>
     * `"errorType":`: <errorType>
     * `"errorMessage":`: <errorMessage>
     */
    queryError: {
        name: 'query',
        type: 'errors'
    },
    /**
     * Identifies the custom event that gets logged when a user exports search results in an XLS file by clicking the Export to Excel option.
     *
     * `actionCause`: `'exportToExcel'`
     * `actionType`: `'misc'`
     */
    exportToExcel: {
        name: 'exportToExcel',
        type: 'misc'
    },
    /**
     * Identifies the custom event that gets logged when a user performs a query that returns recommendations in the Recommendations panel.
     *
     * `actionCause`: `'recommendation'`
     * `actionType`: `'recommendation'`
     */
    recommendation: {
        name: 'recommendation',
        type: 'recommendation'
    },
    /**
     * Identifies the search event that gets logged when a user action (that is not a query) reloads the Recommendations panel with new recommendations.
     *
     * `actionCause`: `'recommendationInterfaceLoad'`
     * `actionType`: `'recommendation'`
     */
    recommendationInterfaceLoad: {
        name: 'recommendationInterfaceLoad',
        type: 'recommendation'
    },
    /**
     * Identifies the click event that gets logged when a user clicks a recommendation in the Recommendations panel.
     *
     * `actionCause`: `'recommendationOpen'`
     * `actionType`: `'recommendation'`
     */
    recommendationOpen: {
        name: 'recommendationOpen',
        type: 'recommendation'
    },
    /**
     * Identifies the search event that gets logged when a user creates an advanced query from the {@link AdvancedSearch} component.
     *
     * `actionCause`: `'advancedSearch'`
     * `actionType`: `'advancedSearch'`
     */
    advancedSearch: {
        name: 'advancedSearch',
        type: 'advancedSearch'
    },
    /**
     * Identifies the custom event that gets logged when a user follows a document.
     *
     * `actionCause`: `'followDocument'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsFollowDocument: {
        name: 'followDocument',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when a user follows a query.
     *
     * `actionCause`: `'followQuery'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsFollowQuery: {
        name: 'followQuery',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when the dropdown value for frequency is changed.
     *
     * `actionCause`: `'updateSubscription'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsUpdateSubscription: {
        name: 'updateSubscription',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when a subscription is successfully deleted.
     *
     * `actionCause`: `'deleteSubscription'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsDeleteSubscription: {
        name: 'deleteSubscription',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when a user unfollows a document.
     *
     * `actionCause`: `'unfollowDocument'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsUnfollowDocument: {
        name: 'unfollowDocument',
        type: 'searchAlerts'
    },
    /**
     * Identifies the custom event that gets logged when a user unfollows a query.
     *
     * `actionCause`: `'unfollowQuery'`
     * `actionType`: `'searchAlerts'`
     */
    searchAlertsUnfollowQuery: {
        name: 'unfollowQuery',
        type: 'searchAlerts'
    },
    /**
     * Identifies the search event that gets logged when a user selects a simple filter value under the search box.
     *
     * `actionCause`: `'selectValue'`
     * `actionType`: `'simpleFilter'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"simpleFilterTitle":`: <correspondingSimpleFilterTitle>
     * `"simpleFilterValue":`: <correspondingSimpleFilterValue>
     * `"simpleFilterField":`: <correspondingSimpleFilterField>
     */
    simpleFilterSelectValue: {
        name: 'selectValue',
        type: 'simpleFilter'
    },
    /**
     * Identifies the search event that gets logged when a user deselects a simple filter value under the search box.
     *
     * `actionCause`: `'deselectValue'`
     * `actionType`: `'simpleFilter'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"simpleFilterTitle":`: <correspondingSimpleFilterTitle>
     * `"simpleFilterValue":`: <correspondingSimpleFilterValue>
     * `"simpleFilterField":`: <correspondingSimpleFilterField>
     */
    simpleFilterDeselectValue: {
        name: 'deselectValue',
        type: 'simpleFilter'
    },
    /**
     * Identifies the search event that gets logged when a user clicks the Clear all button to remove all simple filters under the search box.
     *
     * `actionCause`: `'clearAll'`
     * `actionType`: `'simpleFilter'`
     *
     * Logging an event with this actionType also adds the following key-value pairs in the custom data property of the Usage Analytics HTTP service request.
     * `"simpleFilterTitle":`: <correspondingSimpleFilterTitle>
     * `"simpleFilterValue":`: <correspondingSimpleFilterValue>
     * `"simpleFilterField":`: <correspondingSimpleFilterField>
     */
    simpleFilterClearAll: {
        name: 'clearAll',
        type: 'simpleFilter'
    },
    /**
     * Identifies the search event that gets logged when a user changes the search results layout (list, card, or table).
     *
     * `actionCause`: `'changeResultsLayout'`
     * `actionType`: `'resultsLayout'`
     */
    resultsLayoutChange: {
        name: 'changeResultsLayout',
        type: 'resultsLayout'
    },
    /**
     * Identifies the click event that gets logged when a user clicks the Show More link under a search result that support the folding component
     *
     * `actionCause`: `'showMoreFoldedResults'`
     * `actionType`: `'folding'`
     */
    foldingShowMore: {
        name: 'showMoreFoldedResults',
        type: 'folding'
    },
    /**
     * Identifies the click event that gets logged when a user clicks the Show Less link under a search result that support the folding component
     *
     * `actionCause`: `'showMoreFoldedResults'`
     * `actionType`: `'folding'`
     */
    foldingShowLess: {
        name: 'showLessFoldedResults',
        type: 'folding'
    },
    /**
     * The search event that gets logged when an end-user triggers a new query by clicking a missing term in a result item.
     *
     * `actionCause`: `'addMissingTerm'`
     * `actionType`: `'missingTerm'`
     */
    addMissingTerm: {
        name: 'addMissingTerm',
        type: 'missingTerm'
    },
    /**
     * The search event that gets logged when an end-user triggers a new query by removing a missing term from the breadcrumb.
     *
     * `actionCause`: `'removeMissingTerm'`
     * `actionType`: `'missingTerm'`
     */
    removeMissingTerm: {
        name: 'removeMissingTerm',
        type: 'missingTerm'
    },
    /**
     * The search event logged when a preview is requested for a query suggestion (see the [QuerySuggestPreview]{@link QuerySuggestPreview} component).
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "showQuerySuggestPreview",
     *  actionType: "querySuggestPreview"
     * }
     * ```
     *
     * The framework sends an [`IAnalyticsTopSuggestionMeta`]{@link IAnalyticsTopSuggestionMeta} object as metadata when logging this event.
     */
    showQuerySuggestPreview: {
        name: 'showQuerySuggestPreview',
        type: 'querySuggestPreview'
    },
    /**
     * The custom event logged when an item is opened in a query suggestion preview (see the [QuerySuggestPreview]{@link QuerySuggestPreview} component).
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "clickQuerySuggestPreview",
     *  actionType: "querySuggestPreview"
     * }
     * ```
     *
     * The framework sends an [`IAnalyticsClickQuerySuggestPreviewMeta`]{@link IAnalyticsClickQuerySuggestPreviewMeta} object as metadata when logging this event.
     */
    clickQuerySuggestPreview: {
        name: 'clickQuerySuggestPreview',
        type: 'querySuggestPreview'
    },
    /**
     * The custom event logged when the "Yes" button is pressed in a [SmartSnippet]{@link SmartSnippet}'s feedback banner.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "likeSmartSnippet",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    likeSmartSnippet: {
        name: 'likeSmartSnippet',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the "No" button is pressed in a [SmartSnippet]{@link SmartSnippet}'s feedback banner.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "dislikeSmartSnippet",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    dislikeSmartSnippet: {
        name: 'dislikeSmartSnippet',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the "Show more" button is pressed in a [SmartSnippet]{@link SmartSnippet}.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "expandSmartSnippet",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    expandSmartSnippet: {
        name: 'expandSmartSnippet',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the "Show less" button is pressed in a [SmartSnippet]{@link SmartSnippet}.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "collapseSmartSnippet",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    collapseSmartSnippet: {
        name: 'collapseSmartSnippet',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the "Explain why" button in a [SmartSnippet]{@link SmartSnippet} is pressed.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetFeedbackModal",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetFeedbackModal: {
        name: 'openSmartSnippetFeedbackModal',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when the modal opened by clicking the "Explain why" button in a [SmartSnippet]{@link SmartSnippet} is closed.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "closeSmartSnippetFeedbackModal",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    closeSmartSnippetFeedbackModal: {
        name: 'closeSmartSnippetFeedbackModal',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a generic reason was sent from the modal opened when clicking the "Explain why" button in a [SmartSnippet]{@link SmartSnippet}.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "sendSmartSnippetReason",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    sendSmartSnippetReason: {
        name: 'sendSmartSnippetReason',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a user clicks on the source of an answer in a [SmartSnippet]{@link SmartSnippet}..
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetSource",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetSource: {
        name: 'openSmartSnippetSource',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a user clicks on an inline link inside of an answer in a [SmartSnippet]{@link SmartSnippet}.
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetInlineLink",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetInlineLink: {
        name: 'openSmartSnippetInlineLink',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a suggestion from [SmartSnippetSuggestions]{@link SmartSnippetSuggestions} is expanded.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "expandSmartSnippetSuggestion",
     *  actionType: "smartSnippetSuggestions"
     * }
     * ```
     */
    expandSmartSnippetSuggestion: {
        name: 'expandSmartSnippetSuggestion',
        type: 'smartSnippetSuggestions'
    },
    /**
     * The custom event logged when a suggestion from [SmartSnippetSuggestions]{@link SmartSnippetSuggestions} is collapsed.
     *
     * Implements the [IAnalyticsActionCause]{@link IAnalyticsActionCause} interface as such:
     *
     * ```javascript
     * {
     *  actionCause: "collapseSmartSnippetSuggestion",
     *  actionType: "smartSnippetSuggestions"
     * }
     * ```
     */
    collapseSmartSnippetSuggestion: {
        name: 'collapseSmartSnippetSuggestion',
        type: 'smartSnippetSuggestions'
    },
    /**
     * The custom event logged when a user clicks on the source of an answer in a [SmartSnippetSuggestion]{@link SmartSnippetSuggestions}.
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetSuggestionSource",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetSuggestionSource: {
        name: 'openSmartSnippetSuggestionSource',
        type: 'smartSnippet'
    },
    /**
     * The custom event logged when a user clicks on an inline link inside of an answer in an expanded [SmartSnippetSuggestion]{@link SmartSnippetSuggestions}.
     *
     * ```javascript
     * {
     *  actionCause: "openSmartSnippetSuggestionInlineLink",
     *  actionType: "smartSnippet"
     * }
     * ```
     */
    openSmartSnippetSuggestionInlineLink: {
        name: 'openSmartSnippetSuggestionInlineLink',
        type: 'smartSnippet'
    }
};


/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * This static class is there to contains the different string definition for all the events related to query.
 *
 * Note that these events will only be triggered when the {@link QueryController.executeQuery} method is used, either directly or by using {@link executeQuery}
 */
var QueryEvents = /** @class */ (function () {
    function QueryEvents() {
    }
    /**
     * Triggered when a new query is launched.
     *
     * All bound handlers will receive {@link INewQueryEventArgs} as an argument.
     *
     * The string value is `newQuery`.
     * @type {string}
     */
    QueryEvents.newQuery = 'newQuery';
    /**
     * Triggered when the query is being built.
     *
     * This is typically where all components will contribute their part to the {@link IQuery} using the {@link QueryBuilder}.
     *
     * All bound handlers will receive {@link IBuildingQueryEventArgs} as an argument.
     *
     * The string value is `buildingQuery`.
     * @type {string}
     */
    QueryEvents.buildingQuery = 'buildingQuery';
    /**
     * Triggered when the query is done being built.
     *
     * This is typically where the facet will add it's {@link IGroupByRequest} to the {@link IQuery}.
     *
     * All bound handlers will receive {@link IDoneBuildingQueryEventArgs} as an argument.
     *
     * The string value is `doneBuildingQuery`.
     * @type {string}
     */
    QueryEvents.doneBuildingQuery = 'doneBuildingQuery';
    /**
     * Triggered when the query is being executed on the Search API.
     *
     * All bound handlers will receive {@link IDuringQueryEventArgs} as an argument.
     *
     * The string value is `duringQuery`.
     * @type {string}
     */
    QueryEvents.duringQuery = 'duringQuery';
    /**
     * Triggered when more results are being fetched on the Search API (think : infinite scrolling, or pager).
     *
     * All bound handlers will receive {@link IDuringQueryEventArgs} as an argument.
     *
     * The string value is `duringFetchMoreQuery`.
     * @type {string}
     */
    QueryEvents.duringFetchMoreQuery = 'duringFetchMoreQuery';
    /**
     * Triggered when a query successfully returns from the Search API.
     *
     * All bound handlers will receive {@link IQuerySuccessEventArgs} as an argument.
     *
     * The string value is `querySuccess`.
     * @type {string}
     */
    QueryEvents.querySuccess = 'querySuccess';
    /**
     * Triggered when a more results were successfully returned from the Search API. (think : infinite scrolling, or pager).
     *
     * All bound handlers will receive {@link IFetchMoreSuccessEventArgs} as an argument.
     *
     * The string value is `fetchMoreSuccess`.
     * @type {string}
     */
    QueryEvents.fetchMoreSuccess = 'fetchMoreSuccess';
    /**
     * Triggered after the main query success event has finished executing.
     *
     * This is typically where facets will process the {@link IGroupByResult} and render themselves.
     *
     * All bound handlers will receive {@link IQuerySuccessEventArgs} as an argument.
     *
     * The string value is `deferredQuerySuccess`.
     * @type {string}
     */
    QueryEvents.deferredQuerySuccess = 'deferredQuerySuccess';
    /**
     * Triggered when there was an error executing a query on the Search API.
     *
     * All bound handlers will receive {@link IQueryErrorEventArgs} as an argument.
     *
     * The string value is `queryError`.
     * @type {string}
     */
    QueryEvents.queryError = 'queryError';
    /**
     * Triggered before the {@link QueryEvents.querySuccess} event.
     *
     * This allows external code to modify the results before rendering them.
     *
     * For example, the {@link Folding} component might use this event to construct a coherent parent child relationship between query results.
     *
     * All bound handlers will receive {@link IPreprocessResultsEventArgs} as an argument.
     *
     * The string value is `preprocessResults`.
     * @type {string}
     */
    QueryEvents.preprocessResults = 'preprocessResults';
    /**
     * Triggered before the {@link QueryEvents.fetchMoreSuccess} event.
     *
     * This allows external code to modify the results before rendering them.
     *
     * For example, the {@link Folding} component might use this event to construct a coherent parent child relationship between query results.
     *
     * All bound handlers will receive {@link IPreprocessResultsEventArgs} as an argument.
     *
     * The string value is `preprocessMoreResults`.
     * @type {string}
     */
    QueryEvents.preprocessMoreResults = 'preprocessMoreResults';
    /**
     * Triggered when there is no result for a particular query.
     *
     * All bound handlers will receive {@link INoResultsEventArgs} as an argument.
     *
     * The string value is `noResults`.
     * @type {string}
     */
    QueryEvents.noResults = 'noResults';
    QueryEvents.buildingCallOptions = 'buildingCallOptions';
    return QueryEvents;
}());
exports.QueryEvents = QueryEvents;


/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var SVGIcons = /** @class */ (function () {
    function SVGIcons() {
    }
    SVGIcons.icons = {
        search: __webpack_require__(344),
        more: __webpack_require__(345),
        loading: __webpack_require__(346),
        checkboxHookExclusionMore: __webpack_require__(347),
        arrowUp: __webpack_require__(348),
        arrowDown: __webpack_require__(349),
        mainClear: __webpack_require__(350),
        clearSmall: __webpack_require__(351),
        clear: __webpack_require__(352),
        close: __webpack_require__(353),
        delete: __webpack_require__(354),
        save: __webpack_require__(355),
        checkYes: __webpack_require__(356),
        orAnd: __webpack_require__(357),
        sort: __webpack_require__(358),
        ascending: __webpack_require__(359),
        descending: __webpack_require__(360),
        dropdownMore: __webpack_require__(361),
        dropdownLess: __webpack_require__(362),
        facetCollapse: __webpack_require__(363),
        facetExpand: __webpack_require__(364),
        dropdownShareQuery: __webpack_require__(365),
        dropdownPreferences: __webpack_require__(366),
        dropdownAuthenticate: __webpack_require__(367),
        dropdownExport: __webpack_require__(368),
        dropdownFollowQuery: __webpack_require__(369),
        quickview: __webpack_require__(370),
        pagerRightArrow: __webpack_require__(371),
        pagerLeftArrow: __webpack_require__(372),
        replies: __webpack_require__(373),
        video: __webpack_require__(374),
        coveoLogo: __webpack_require__(375),
        coveoPoweredBy: __webpack_require__(376),
        taggingOk: __webpack_require__(377),
        edit: __webpack_require__(378),
        star: __webpack_require__(379),
        listLayout: __webpack_require__(380),
        cardLayout: __webpack_require__(381),
        tableLayout: __webpack_require__(382),
        plus: __webpack_require__(383)
    };
    return SVGIcons;
}());
exports.SVGIcons = SVGIcons;


/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Model_1 = __webpack_require__(18);
var Assert_1 = __webpack_require__(5);
var _ = __webpack_require__(0);
var Utils_1 = __webpack_require__(4);
exports.QUERY_STATE_ATTRIBUTES = {
    Q: 'q',
    FIRST: 'first',
    T: 't',
    TG: 'tg',
    SORT: 'sort',
    LAYOUT: 'layout',
    HD: 'hd',
    HQ: 'hq',
    QUICKVIEW: 'quickview',
    DEBUG: 'debug',
    NUMBER_OF_RESULTS: 'numberOfResults',
    MISSING_TERMS: 'missingTerms'
};
/**
 * The `QueryStateModel` class is a key-value store which contains the current state of the components that can affect
 * the query (see [State](https://docs.coveo.com/en/344/)). This class inherits from the [`Model`](https://coveo.github.io/search-ui/classes/model.html)
 * class. Optionally, it is possible to persist the state in the query string in order to enable browser history
 * management (see the [`HistoryController`]{@link HistoryController} class).
 *
 * Components set values in the `QueryStateModel` instance to reflect their current state. The `QueryStateModel`
 * triggers state events (see [`eventTypes`]{@link Model.eventTypes}) whenever one of its values is modified. Components
 * listen to triggered state events to update themselves when appropriate.
 *
 * For instance, when a query is triggered, the [`Searchbox`]{@link Searchbox} component sets the `q` attribute (the
 * basic query expression), while the [`Pager`]{@link Pager} component sets the `first` attribute (the index of the
 * first result to display in the result list), and so on.
 *
 * **Example:**
 *
 * > The user modifies the content of the `Searchbox` and submits a query. This triggers the following state events:
 * > - `state:change:q` (because the value of `q` has changed).
 * > - `state:change` (because at least one value has changed in the `QueryStateModel`).
 * >
 * > Components or external code can attach handlers to those events:
 * > ```javascript
 * > Coveo.$$(document).on('state:change:q', function() {
 * >   [ ... ]
 * > });
 * > ```
 *
 * **Note:**
 * > Normally, you should interact with the `QueryStateModel` instance using the [`Coveo.state`]{@link state} top-level
 * > function.
 */
var QueryStateModel = /** @class */ (function (_super) {
    __extends(QueryStateModel, _super);
    /**
     * Creates a new `QueryStateModel` instance.
     * @param element The HTMLElement on which to instantiate the `QueryStateModel`.
     * @param attributes The state key-value store to instantiate the `QueryStateModel` with.
     */
    function QueryStateModel(element, attributes) {
        var _this = this;
        var merged = __assign({}, QueryStateModel.defaultAttributes, attributes);
        _this = _super.call(this, element, QueryStateModel.ID, merged) || this;
        return _this;
    }
    QueryStateModel.getFacetId = function (id, include) {
        if (include === void 0) { include = true; }
        return 'f:' + id + (include ? '' : ':not');
    };
    QueryStateModel.getFacetOperator = function (id) {
        return 'f:' + id + ':operator';
    };
    QueryStateModel.getFacetLookupValue = function (id) {
        return QueryStateModel.getFacetId(id) + ':lookupvalues';
    };
    /**
     * Validates whether at least one facet is currently active (has selected or excluded values) in the interface.
     *
     * @returns {boolean} `true` if at least one facet is active; `false` otherwise.
     */
    QueryStateModel.prototype.atLeastOneFacetIsActive = function () {
        var _this = this;
        return !_.isUndefined(_.find(this.attributes, function (value, key) {
            return key.match(/^f:/) && !Utils_1.Utils.arrayEqual(_this.getDefault(key), value);
        }));
    };
    QueryStateModel.prototype.set = function (attribute, value, options) {
        this.validate(attribute, value);
        _super.prototype.set.call(this, attribute, value, options);
    };
    QueryStateModel.prototype.validate = function (attribute, value) {
        if (attribute == QueryStateModel.attributesEnum.first) {
            Assert_1.Assert.isNumber(value);
            Assert_1.Assert.isLargerOrEqualsThan(0, value);
        }
    };
    QueryStateModel.ID = 'state';
    QueryStateModel.defaultAttributes = {
        q: '',
        first: 0,
        fv: '',
        t: '',
        hd: '',
        hq: '',
        sort: '',
        layout: 'list',
        tg: '',
        quickview: '',
        debug: false,
        numberOfResults: 10,
        missingTerms: []
    };
    QueryStateModel.attributesEnum = {
        q: 'q',
        first: 'first',
        fv: 'fv',
        t: 't',
        sort: 'sort',
        layout: 'layout',
        hd: 'hd',
        hq: 'hq',
        tg: 'tg',
        quickview: 'quickview',
        debug: 'debug',
        numberOfResults: 'numberOfResults',
        missingTerms: 'missingTerms'
    };
    return QueryStateModel;
}(Model_1.Model));
exports.QueryStateModel = QueryStateModel;
function setState(model, args) {
    Assert_1.Assert.exists(model);
    if (args.length == 0 || args[0] == undefined) {
        // No args means return the model
        return model;
    }
    else if (args.length == 1 && Utils_1.Utils.isNonEmptyString(args[0])) {
        // One string arg means retrieve value from model
        return model.get(args[0]);
    }
    else if (_.isObject(args[0])) {
        // One dictionary means set multiple values
        var toSet = args[0];
        var options = _.extend({ customAttribute: true }, args[1]);
        return model.setMultiple(toSet, options);
    }
    else if (args.length > 1) {
        // Otherwise we're setting a value
        var name_1 = args[0];
        var value = args[1];
        var options = _.extend({ customAttribute: true }, args[2]);
        Assert_1.Assert.isNonEmptyString(name_1);
        return model.set(name_1, value, options);
    }
}
exports.setState = setState;


/***/ }),
/* 14 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return VERSION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return root; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArrayProto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ObjProto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SymbolProto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return push; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return slice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return hasOwnProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return supportsArrayBuffer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return supportsDataView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return nativeIsArray; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return nativeKeys; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return nativeCreate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return nativeIsView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return _isNaN; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _isFinite; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return hasEnumBug; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return nonEnumerableProps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MAX_ARRAY_INDEX; });
// Current version.
var VERSION = '1.13.1';

// Establish the root object, `window` (`self`) in the browser, `global`
// on the server, or `this` in some virtual machines. We use `self`
// instead of `window` for `WebWorker` support.
var root = typeof self == 'object' && self.self === self && self ||
          typeof global == 'object' && global.global === global && global ||
          Function('return this')() ||
          {};

// Save bytes in the minified (but not gzipped) version:
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;

// Create quick reference variables for speed access to core prototypes.
var push = ArrayProto.push,
    slice = ArrayProto.slice,
    toString = ObjProto.toString,
    hasOwnProperty = ObjProto.hasOwnProperty;

// Modern feature detection.
var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
    supportsDataView = typeof DataView !== 'undefined';

// All **ECMAScript 5+** native function implementations that we hope to use
// are declared here.
var nativeIsArray = Array.isArray,
    nativeKeys = Object.keys,
    nativeCreate = Object.create,
    nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;

// Create references to these builtin functions because we override them.
var _isNaN = isNaN,
    _isFinite = isFinite;

// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
  'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];

// The largest integer that can be represented exactly.
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;

/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(76)))

/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(9);
var KeyboardUtils_1 = __webpack_require__(25);
var Dom_1 = __webpack_require__(1);
__webpack_require__(454);
var ArrowDirection;
(function (ArrowDirection) {
    ArrowDirection[ArrowDirection["UP"] = 0] = "UP";
    ArrowDirection[ArrowDirection["RIGHT"] = 1] = "RIGHT";
    ArrowDirection[ArrowDirection["DOWN"] = 2] = "DOWN";
    ArrowDirection[ArrowDirection["LEFT"] = 3] = "LEFT";
})(ArrowDirection = exports.ArrowDirection || (exports.ArrowDirection = {}));
var AccessibleButton = /** @class */ (function () {
    function AccessibleButton() {
        this.labelOrTitleRequired = true;
        this.logger = new Logger_1.Logger(this);
    }
    AccessibleButton.prototype.withOwner = function (owner) {
        this.eventOwner = owner;
        return this;
    };
    AccessibleButton.prototype.withElement = function (element) {
        if (element instanceof HTMLElement) {
            this.element = Dom_1.$$(element);
        }
        else {
            this.element = element;
        }
        return this;
    };
    AccessibleButton.prototype.withLabel = function (label) {
        this.label = label;
        return this;
    };
    AccessibleButton.prototype.withoutLabelOrTitle = function () {
        this.labelOrTitleRequired = false;
        return this;
    };
    AccessibleButton.prototype.withTitle = function (title) {
        this.title = title;
        return this;
    };
    AccessibleButton.prototype.withSelectAction = function (action) {
        this.clickAction = action;
        this.enterKeyboardAction = action;
        return this;
    };
    AccessibleButton.prototype.withClickAction = function (clickAction) {
        this.clickAction = clickAction;
        return this;
    };
    AccessibleButton.prototype.withEnterKeyboardAction = function (enterAction) {
        this.enterKeyboardAction = enterAction;
        return this;
    };
    AccessibleButton.prototype.withFocusAndMouseEnterAction = function (action) {
        this.focusAction = action;
        this.mouseenterAction = action;
        return this;
    };
    AccessibleButton.prototype.withFocusAction = function (action) {
        this.focusAction = action;
        return this;
    };
    AccessibleButton.prototype.withMouseEnterAction = function (action) {
        this.mouseenterAction = action;
        return this;
    };
    AccessibleButton.prototype.withBlurAndMouseLeaveAction = function (action) {
        this.mouseleaveAction = action;
        this.blurAction = action;
        return this;
    };
    AccessibleButton.prototype.withMouseLeaveAction = function (action) {
        this.mouseleaveAction = action;
        return this;
    };
    AccessibleButton.prototype.withBlurAction = function (action) {
        this.blurAction = action;
        return this;
    };
    AccessibleButton.prototype.withArrowsAction = function (action) {
        this.arrowsAction = action;
        return this;
    };
    AccessibleButton.prototype.withRole = function (role) {
        this.role = role;
        return this;
    };
    AccessibleButton.prototype.build = function () {
        if (!this.element) {
            this.element = Dom_1.$$('div');
        }
        this.ensureCorrectRole();
        this.ensureCorrectLabelOrTitle();
        this.ensureSelectAction();
        this.ensureUnselectAction();
        this.ensureMouseenterAndFocusAction();
        this.ensureMouseleaveAndBlurAction();
        this.ensureArrowsAction();
        this.ensureDifferentiationBetweenKeyboardAndMouseFocus();
        return this;
    };
    AccessibleButton.prototype.ensureDifferentiationBetweenKeyboardAndMouseFocus = function () {
        var _this = this;
        var classWhenPressed = 'coveo-accessible-button-pressed';
        Dom_1.$$(this.element).addClass('coveo-accessible-button');
        Dom_1.$$(this.element).on('mouseup', function () { return Dom_1.$$(_this.element).addClass(classWhenPressed); });
        Dom_1.$$(this.element).on('focus', function () {
            Dom_1.$$(_this.element).removeClass(classWhenPressed);
        });
    };
    AccessibleButton.prototype.ensureCorrectRole = function () {
        if (!this.element.getAttribute('role')) {
            this.element.setAttribute('role', this.role || 'button');
        }
    };
    AccessibleButton.prototype.ensureCorrectLabelOrTitle = function () {
        if (!this.labelOrTitleRequired) {
            return;
        }
        if (!this.label && !this.title) {
            this.logger.error("Missing a label or title to create an accessible button!");
            return;
        }
        if (this.title) {
            this.element.setAttribute('title', this.title);
            return;
        }
        this.element.setAttribute('aria-label', this.label);
    };
    AccessibleButton.prototype.ensureTabIndex = function () {
        this.element.setAttribute('tabindex', '0');
    };
    AccessibleButton.prototype.ensureSelectAction = function () {
        var _this = this;
        if (this.enterKeyboardAction) {
            this.ensureTabIndex();
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ENTER, function (e) { return _this.enterKeyboardAction(e); }));
            this.bindEvent('keydown', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.SPACEBAR, function (e) {
                if (e.target instanceof HTMLInputElement) {
                    return;
                }
                e.preventDefault();
            }));
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.SPACEBAR, function (e) {
                if (e.target instanceof HTMLInputElement) {
                    return;
                }
                _this.enterKeyboardAction(e);
            }));
        }
        if (this.clickAction) {
            this.bindEvent('click', this.clickAction);
        }
    };
    AccessibleButton.prototype.ensureUnselectAction = function () {
        if (this.blurAction) {
            this.bindEvent('blur', this.blurAction);
        }
        if (this.mouseleaveAction) {
            this.bindEvent('mouseleave', this.mouseleaveAction);
        }
    };
    AccessibleButton.prototype.ensureMouseenterAndFocusAction = function () {
        if (this.mouseenterAction) {
            this.bindEvent('mouseenter', this.mouseenterAction);
        }
        if (this.focusAction) {
            this.bindEvent('focus', this.focusAction);
        }
    };
    AccessibleButton.prototype.ensureMouseleaveAndBlurAction = function () {
        if (this.mouseleaveAction) {
            this.bindEvent('mouseleave', this.mouseleaveAction);
        }
        if (this.blurAction) {
            this.bindEvent('blur', this.blurAction);
        }
    };
    AccessibleButton.prototype.ensureArrowsAction = function () {
        var _this = this;
        if (this.arrowsAction) {
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.UP_ARROW, function (e) { return _this.arrowsAction(ArrowDirection.UP, e); }));
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.RIGHT_ARROW, function (e) { return _this.arrowsAction(ArrowDirection.RIGHT, e); }));
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.DOWN_ARROW, function (e) { return _this.arrowsAction(ArrowDirection.DOWN, e); }));
            this.bindEvent('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.LEFT_ARROW, function (e) { return _this.arrowsAction(ArrowDirection.LEFT, e); }));
        }
    };
    AccessibleButton.prototype.bindEvent = function (event, action) {
        if (this.eventOwner) {
            this.eventOwner.on(this.element, event, action);
        }
        else {
            Dom_1.$$(this.element).on(event, action);
        }
    };
    return AccessibleButton;
}());
exports.AccessibleButton = AccessibleButton;


/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var SVGDom = /** @class */ (function () {
    function SVGDom() {
    }
    SVGDom.addClassToSVGInContainer = function (svgContainer, classToAdd) {
        var svgElement = svgContainer.querySelector('svg');
        svgElement.setAttribute('class', "" + SVGDom.getClass(svgElement) + classToAdd);
    };
    SVGDom.removeClassFromSVGInContainer = function (svgContainer, classToRemove) {
        var svgElement = svgContainer.querySelector('svg');
        svgElement.setAttribute('class', SVGDom.getClass(svgElement).replace(classToRemove, ''));
    };
    SVGDom.addStyleToSVGInContainer = function (svgContainer, styleToAdd) {
        var svgElement = svgContainer.querySelector('svg');
        underscore_1.each(styleToAdd, function (styleValue, styleKey) {
            svgElement.style[styleKey] = styleValue;
        });
    };
    SVGDom.addAttributesToSVGInContainer = function (svgContainer, attributesToAdd) {
        var svgElement = svgContainer.querySelector('svg');
        underscore_1.each(attributesToAdd, function (attributeValue, attributeKey) {
            svgElement.setAttribute(attributeKey, attributeValue);
        });
    };
    SVGDom.getClass = function (svgElement) {
        var className = svgElement.getAttribute('class');
        return className ? className + ' ' : '';
    };
    return SVGDom;
}());
exports.SVGDom = SVGDom;


/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * This static class is there to contain the different string definitions for all the events related to initialization.
 *
 * Note that these events will only be triggered when the {@link init} function is called.
 *
 * This means these events are normally called only once when the search interface is initialized.
 */
var InitializationEvents = /** @class */ (function () {
    function InitializationEvents() {
    }
    /**
     * This event is triggered right before each components inside the search interface get initialized (eg: Before the constructor of each component is executed).
     *
     * The string value is `beforeInitialization`.
     * @type {string}
     */
    InitializationEvents.beforeInitialization = 'beforeInitialization';
    /**
     * Triggered after the components are initialized (eg: After the constructor of each component is executed)
     * but before their state is set from the hash portion of the URL (e.g., `http://mysearchinterface#q=myQuery`).
     *
     * This is also before the first query is launched (if the {@link SearchInterface.options.autoTriggerQuery} is `true`).
     *
     * The string value is `afterComponentsInitialization`.
     * @type {string}
     */
    InitializationEvents.afterComponentsInitialization = 'afterComponentsInitialization';
    /**
     * Triggered right before the state from the URL (e.g., `http://mysearchinterface#q=myQuery`) gets applied in the interface.
     *
     * This will typically only be useful if the {@link SearchInterface.options.enableHistory} is set to `true`.
     *
     * The string value is `restoreHistoryState`.
     * @type {string}
     */
    InitializationEvents.restoreHistoryState = 'restoreHistoryState';
    /**
     * Triggered right after the UI is fully initialized.
     *
     * Concretely this means that the constructor of each component has been executed, and that the state coming for the URL (e.g., `http://mysearchinterface#q=myquery`) has been applied.
     *
     * It is triggered *before* the first query is launched, and if the {@link SearchInterface.options.autoTriggerQuery} is `true`.
     *
     * The string value is `afterInitialization`.
     * @type {string}
     */
    InitializationEvents.afterInitialization = 'afterInitialization';
    /**
     * This is triggered when the UI needs to be dynamically removed so that components can unbind any internal handlers they might have set globally on the window or the document.
     *
     * After this event has been executed, the search interface can be dynamically removed and all handlers can be considered cleanly removed.
     *
     * The string value is `nuke`.
     * @type {string}
     */
    InitializationEvents.nuke = 'nuke';
    return InitializationEvents;
}());
exports.InitializationEvents = InitializationEvents;


/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(5);
var Utils_1 = __webpack_require__(4);
var BaseComponent_1 = __webpack_require__(36);
var _ = __webpack_require__(0);
exports.MODEL_EVENTS = {
    PREPROCESS: 'preprocess',
    CHANGE_ONE: 'change:',
    CHANGE: 'change',
    RESET: 'reset',
    ALL: 'all'
};
/**
 * A *model* is a key-value store that triggers various JavaScript events when any value associated to one of its key changes.<br/>
 * This class is meant to be extended, one of the most important extension being the {@link QueryStateModel} class.<br/>
 * Components set values in this key-value store and listen to triggered events in order to update themselves accordingly.<br/>
 */
var Model = /** @class */ (function (_super) {
    __extends(Model, _super);
    function Model(element, id, attributes) {
        var _this = _super.call(this, element, id) || this;
        _this.eventNameSpace = id;
        _this.defaultAttributes = Utils_1.Utils.extendDeep(_this.defaultAttributes, attributes);
        _this.attributes = attributes;
        _this.logger.debug('Creating model');
        return _this;
    }
    /**
     * Sets the value of a single specific attribute.</br>
     * Note: this method calls the `setMultiple` method.
     * @param attribute
     * the specific attribute whose value is to be set.
     * @param value
     * the value to set the attribute to.
     * @param options
     * the options (see {@link setMultiple}).
     */
    Model.prototype.set = function (attribute, value, options) {
        var toSet = {};
        toSet[attribute] = value;
        this.setMultiple(toSet, options);
    };
    /**
     * Gets an object containing all *active* registered attribute key-values.</br>
     * An attribute is considered active when its value is not in its default state.
     * @returns {{object}}
     */
    Model.prototype.getAttributes = function () {
        var _this = this;
        var attributes = {};
        _.each(this.attributes, function (attribute, key) {
            if (_.isObject(attribute)) {
                if (!Utils_1.Utils.objectEqual(attribute, _this.defaultAttributes[key])) {
                    attributes[key] = Utils_1.Utils.extendDeep({}, attribute);
                }
            }
            else if (attribute != _this.defaultAttributes[key]) {
                attributes[key] = attribute;
            }
        });
        return attributes;
    };
    /**
     * Sets the values of one or many attributes.</br>
     * This method may trigger the following events (in order):</br>
     * • `preprocess`</br>
     * • `changeOne`</br>
     * • `change`</br>
     * • `all`
     * @param toSet
     * the key-value list of attributes with their new intended values.
     * @param options
     * if the `customAttribute` option is set to `true`, the method will not validate whether an attribute is registered or not.</br>
     * If the `validateType` option is set to `true`, the method will ensure that each value type is correct.</br>
     * If the `silent` option is set to `true`, then the `changeOne`, `change` and `all` events will not be triggered.
     */
    Model.prototype.setMultiple = function (toSet, options) {
        var _this = this;
        var anythingChanged = false;
        this.preprocessEvent(toSet);
        _.each(toSet, function (value, attribute) {
            if (!options || !options.customAttribute) {
                _this.checkIfAttributeExists(attribute);
            }
            value = _this.parseToCorrectType(attribute, value);
            if (!options || options.validateType) {
                if (!_this.typeIsValid(attribute, value)) {
                    return;
                }
            }
            if (_this.checkIfAttributeChanged(attribute, value)) {
                _this.attributes[attribute] = value;
                anythingChanged = true;
                if (options == null || !options.silent) {
                    _this.attributeHasChangedEvent(attribute);
                }
            }
        });
        if (anythingChanged && (options == null || !options.silent)) {
            this.attributesHasChangedEvent();
            this.anyEvent();
        }
    };
    /**
     * Sets a new default value to a single specific attribute.</br>
     * Note: specifying a new attribute default value does not set the attribute to that value. This can be done using the {@link setDefault} method.
     * @param attribute
     * the specific attribute whose default value is to be changed.
     * @param value
     * the new intended default value.
     * @param options
     * if the `customAttribute` option is set to `true`, the method will not validate whether the attribute is registered or not.
     */
    Model.prototype.setNewDefault = function (attribute, value, options) {
        if (!options || !options.customAttribute) {
            this.checkIfAttributeExists(attribute);
        }
        this.defaultAttributes[attribute] = value;
    };
    /**
     * Sets a single specific attribute to its default value.</br>
     * Note: this method calls the {@link setMultiple} method without specifying any option.
     * @param attribute
     * the specific attribute whose value is to be set to its default value.
     */
    Model.prototype.setDefault = function (attribute) {
        this.set(attribute, this.defaultAttributes[attribute]);
    };
    /**
     * Gets the value of a single specific attribute.</br>
     * If no attribute is specified, the method instead returns an object containing all registered attribute key-values.
     * @param attribute
     * the specific attribute whose value should be returned.
     * @returns {any}
     */
    Model.prototype.get = function (attribute) {
        if (attribute == undefined) {
            return this.attributes;
        }
        else {
            return this.attributes[attribute];
        }
    };
    /**
     * Gets the default value of a single specific attribute.</br>
     * If no attribute is specified, the method instead returns an object containing all registered attribute key-default values.
     * @param attribute
     * the specific attribute whose default value should be returned.
     * @returns {any}
     */
    Model.prototype.getDefault = function (attribute) {
        if (attribute == undefined) {
            return this.defaultAttributes;
        }
        else {
            return this.defaultAttributes[attribute];
        }
    };
    /**
     * Resets each registered attribute to its default value.</br>
     * Note: this method calls the {@link setMultiple} method without specifying any options.</br>
     * After the `setMultiple` call has returned, this method triggers the `reset` event.
     */
    Model.prototype.reset = function () {
        this.setMultiple(this.defaultAttributes);
        this.modelWasResetEvent();
    };
    /**
     * Registers a new attribute key-value.
     * @param attribute
     * the name of the new attribute to register.
     * @param defaultValue
     * the newly registered attribute default value.
     */
    Model.prototype.registerNewAttribute = function (attribute, defaultValue) {
        this.defaultAttributes[attribute] = defaultValue;
        this.attributes[attribute] = defaultValue;
    };
    /**
     * Gets a string displaying the event namespace followed by the specific event name. The returned string is formatted thus:</br>
     * `[eventNameSpace]:[eventName]`
     * @example `getEventName("reset");` could return `"state:reset"`.
     * @param event
     * the event name.
     * @returns {string}
     */
    Model.prototype.getEventName = function (event) {
        return this.eventNameSpace + ':' + event;
    };
    Model.prototype.attributesHasChangedEvent = function () {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.change), this.createAttributesChangedArgument());
    };
    Model.prototype.attributeHasChangedEvent = function (attr) {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.changeOne) + attr, this.createAttributeChangedArgument(attr));
    };
    Model.prototype.preprocessEvent = function (attributes) {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.preprocess), attributes);
    };
    Model.prototype.modelWasResetEvent = function () {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.reset), this.createModelChangedArgument());
    };
    Model.prototype.anyEvent = function () {
        Dom_1.$$(this.element).trigger(this.getEventName(Model.eventTypes.all), this.createModelChangedArgument());
    };
    Model.prototype.createAttributeChangedArgument = function (attribute) {
        return { attribute: attribute, value: this.attributes[attribute] };
    };
    Model.prototype.createAttributesChangedArgument = function () {
        return { attributes: this.attributes };
    };
    Model.prototype.createModelChangedArgument = function () {
        return { model: this };
    };
    Model.prototype.checkIfAttributeExists = function (attribute) {
        Assert_1.Assert.check(_.has(this.attributes, attribute), "The attribute " + attribute + " is not registered.");
    };
    Model.prototype.typeIsValid = function (attribute, value) {
        if (!Utils_1.Utils.isNullOrUndefined(this.attributes[attribute]) && !Utils_1.Utils.isUndefined(value)) {
            if (_.isNumber(this.attributes[attribute])) {
                return this.validateNumber(attribute, value);
            }
            else if (_.isBoolean(this.attributes[attribute])) {
                return this.validateBoolean(attribute, value);
            }
            else {
                return this.validateOther(attribute, value);
            }
        }
        return true;
    };
    Model.prototype.validateNumber = function (attribute, value) {
        if (!_.isNumber(value) || isNaN(value)) {
            this.logger.error("Non-matching type for " + attribute + ". Expected number and got " + value);
            return false;
        }
        return true;
    };
    Model.prototype.validateBoolean = function (attribute, value) {
        if (!_.isBoolean(value) && !Utils_1.Utils.parseBooleanIfNotUndefined(value) !== undefined) {
            this.logger.error("Non matching type for " + attribute + ". Expected boolean and got " + value);
            return false;
        }
        return true;
    };
    Model.prototype.validateOther = function (attribute, value) {
        if (!Utils_1.Utils.isNullOrUndefined(this.defaultAttributes[attribute])) {
            var valueType = typeof value;
            var attributeType = typeof this.defaultAttributes[attribute];
            if (valueType !== attributeType) {
                this.logger.error("Non-matching type for " + attribute + ". Expected " + attributeType + " and got " + valueType);
                return false;
            }
        }
        return true;
    };
    Model.prototype.parseToCorrectType = function (attribute, value) {
        if (_.isNumber(this.attributes[attribute])) {
            return parseInt(value, 10);
        }
        else if (_.isBoolean(this.attributes[attribute])) {
            if (_.isBoolean(value)) {
                return value;
            }
            else {
                return Utils_1.Utils.parseBooleanIfNotUndefined(value);
            }
        }
        return value;
    };
    Model.prototype.checkIfAttributeChanged = function (attribute, newValue) {
        var oldValue = this.attributes[attribute];
        if (_.isNumber(oldValue) || _.isString(oldValue) || _.isBoolean(oldValue)) {
            return oldValue !== newValue;
        }
        if (_.isArray(oldValue)) {
            return !Utils_1.Utils.arrayEqual(oldValue, newValue);
        }
        if (_.isObject(oldValue)) {
            return !Utils_1.Utils.objectEqual(oldValue, newValue);
        }
        return true;
    };
    Model.prototype.debugInfo = function () {
        return null;
    };
    /**
     * The event types that can be triggered:<br/>
     * • `preprocess`: triggered before a value is set on an attribute. This allows the value to be modified before it is set.<br/>
     * • `changeOne`: triggered when a single value changes.</br>
     * • `change`: triggered when one or many values change.</br>
     * • `reset`: triggered when all attributes are reset to their default values. </br>
     * • `all`: triggered after the `change` event.</br>
     * @type {{preprocess: string, changeOne: string, change: string, reset: string, all: string}}
     */
    Model.eventTypes = {
        preprocess: 'preprocess',
        changeOne: 'change:',
        change: 'change',
        reset: 'reset',
        all: 'all'
    };
    return Model;
}(BaseComponent_1.BaseComponent));
exports.Model = Model;


/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var jstz = __webpack_require__(334);
__webpack_require__(337);
__webpack_require__(338);
__webpack_require__(339);
__webpack_require__(340);
var underscore_1 = __webpack_require__(0);
var HistoryController_1 = __webpack_require__(156);
var LocalStorageHistoryController_1 = __webpack_require__(157);
var NoopHistoryController_1 = __webpack_require__(341);
var QueryController_1 = __webpack_require__(44);
var InitializationEvents_1 = __webpack_require__(17);
var QueryEvents_1 = __webpack_require__(11);
var StandaloneSearchInterfaceEvents_1 = __webpack_require__(100);
var Assert_1 = __webpack_require__(5);
var ComponentOptionsModel_1 = __webpack_require__(28);
var ComponentStateModel_1 = __webpack_require__(79);
var Model_1 = __webpack_require__(18);
var QueryStateModel_1 = __webpack_require__(13);
var SearchEndpoint_1 = __webpack_require__(53);
var Dom_1 = __webpack_require__(1);
var HashUtils_1 = __webpack_require__(42);
var Utils_1 = __webpack_require__(4);
var AnalyticsActionListMeta_1 = __webpack_require__(10);
var NoopAnalyticsClient_1 = __webpack_require__(107);
var AriaLive_1 = __webpack_require__(342);
var BaseComponent_1 = __webpack_require__(36);
var ComponentOptions_1 = __webpack_require__(8);
var InitializationPlaceholder_1 = __webpack_require__(177);
var RootComponent_1 = __webpack_require__(45);
var Debug_1 = __webpack_require__(160);
var MissingTermManager_1 = __webpack_require__(207);
var OmniboxAnalytics_1 = __webpack_require__(449);
var ResponsiveComponents_1 = __webpack_require__(55);
var FacetColumnAutoLayoutAdjustment_1 = __webpack_require__(450);
var FacetValueStateHandler_1 = __webpack_require__(451);
var ComponentsTypes_1 = __webpack_require__(47);
var ScrollRestorer_1 = __webpack_require__(452);
/**
 * The SearchInterface component is the root and main component of your Coveo search interface. You should place all
 * other Coveo components inside the SearchInterface component.
 *
 * It is also on the HTMLElement of the SearchInterface component that you call the {@link init} function.
 *
 * It is advisable to specify a unique HTML `id` attribute for the SearchInterface component in order to be able to
 * reference it easily.
 *
 * **Example:**
 *
 * ```html
 * <head>
 *
 * [ ... ]
 *
 * <script>
 *   document.addEventListener('DOMContentLoaded', function() {
 *
 *     [ ... ]
 *     // The init function is called on the SearchInterface element, in this case, the body of the page.
 *     Coveo.init(document.body);
 *
 *     [ ... ]
 *
 *     });
 * </script>
 *
 * [ ... ]
 * </head>
 *
 * <!-- Specifying a unique HTML id attribute for the SearchInterface component is good practice. -->
 * <body id='search' class='CoveoSearchInterface' [ ... other options ... ]>
 *
 *   [ ... ]
 *
 *   <!-- You should place all other Coveo components here, inside the SearchInterface component. -->
 *
 *   [ ... ]
 *
 * </body>
 * ```
 */
var SearchInterface = /** @class */ (function (_super) {
    __extends(SearchInterface, _super);
    /**
     * Creates a new SearchInterface. Initialize various singletons for the interface (e.g., usage analytics, query
     * controller, state model, etc.). Binds events related to the query.
     * @param element The HTMLElement on which to instantiate the component. This cannot be an `HTMLInputElement` for
     * technical reasons.
     * @param options The options for the SearchInterface.
     * @param analyticsOptions The options for the {@link Analytics} component. Since the Analytics component is normally
     * global, it needs to be passed at initialization of the whole interface.
     * @param _window The window object for the search interface. Used for unit tests, which can pass a mock. Default is
     * the global window object.
     */
    function SearchInterface(element, options, analyticsOptions, _window) {
        if (_window === void 0) { _window = window; }
        var _this = _super.call(this, element, SearchInterface.ID) || this;
        _this.element = element;
        _this.options = options;
        _this.analyticsOptions = analyticsOptions;
        _this._window = _window;
        _this.isResultsPerPageModifiedByPipeline = false;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, SearchInterface, options);
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(_this.options);
        _this.root = element;
        _this.setupQueryMode();
        _this.queryStateModel = new QueryStateModel_1.QueryStateModel(element);
        _this.componentStateModel = new ComponentStateModel_1.ComponentStateModel(element);
        _this.componentOptionsModel = new ComponentOptionsModel_1.ComponentOptionsModel(element);
        _this.usageAnalytics = _this.initializeAnalytics();
        _this.queryController = new QueryController_1.QueryController(element, _this.options, _this.usageAnalytics, _this);
        _this.facetValueStateHandler = new FacetValueStateHandler_1.FacetValueStateHandler(_this);
        var missingTermManagerArgs = {
            element: _this.element,
            queryStateModel: _this.queryStateModel,
            queryController: _this.queryController,
            usageAnalytics: _this.usageAnalytics
        };
        new MissingTermManager_1.MissingTermManager(missingTermManagerArgs);
        _this.omniboxAnalytics = new OmniboxAnalytics_1.OmniboxAnalytics();
        _this.setupEventsHandlers();
        _this.setupHistoryManager(element, _window);
        _this.setupScrollRestorer(element, _window, _this.queryStateModel);
        _this.element.style.display = element.style.display || 'block';
        _this.setupDebugInfo();
        _this.setupResponsiveComponents();
        _this.ariaLive = new AriaLive_1.AriaLive(element);
        return _this;
    }
    Object.defineProperty(SearchInterface.prototype, "resultsPerPage", {
        get: function () {
            if (this.queryPipelineConfigurationForResultsPerPage != null && this.queryPipelineConfigurationForResultsPerPage != 0) {
                return this.queryPipelineConfigurationForResultsPerPage;
            }
            if (this.queryController.options.resultsPerPage != null && this.queryController.options.resultsPerPage != 0) {
                return this.queryController.options.resultsPerPage;
            }
            // Things would get weird if somehow the number of results per page was set to 0 or not available.
            // Specially for the pager component. As such, we try to cover that corner case.
            this.logger.warn('Results per page is incoherent in the search interface.', this);
            return 10;
        },
        set: function (resultsPerPage) {
            this.options.resultsPerPage = this.queryController.options.resultsPerPage = resultsPerPage;
        },
        enumerable: true,
        configurable: true
    });
    SearchInterface.prototype.getOmniboxAnalytics = function () {
        return this.omniboxAnalytics;
    };
    /**
     * Attaches a component to the search interface. This allows the search interface to easily list and iterate over its
     * components.
     * @param type Normally, the component type is a unique identifier without the `Coveo` prefix (e.g., `CoveoFacet` ->
     * `Facet`, `CoveoPager` -> `Pager`, `CoveoQuerybox` -> `Querybox`, etc.).
     * @param component The component instance to attach.
     */
    SearchInterface.prototype.attachComponent = function (type, component) {
        this.getComponents(type).push(component);
    };
    /**
     * Detaches a component from the search interface.
     * @param type Normally, the component type is a unique identifier without the `Coveo` prefix (e.g., `CoveoFacet` ->
     * `Facet`, `CoveoPager` -> `Pager`, `CoveoQuerybox` -> `Querybox`, etc.).
     * @param component The component instance to detach.
     */
    SearchInterface.prototype.detachComponent = function (type, component) {
        var components = this.getComponents(type);
        var index = underscore_1.indexOf(components, component);
        if (index > -1) {
            components.splice(index, 1);
        }
    };
    /**
     * Returns the bindings, or environment, for the current component.
     * @returns {IComponentBindings}
     */
    SearchInterface.prototype.getBindings = function () {
        return {
            root: this.root,
            queryStateModel: this.queryStateModel,
            queryController: this.queryController,
            searchInterface: this,
            componentStateModel: this.componentStateModel,
            componentOptionsModel: this.componentOptionsModel,
            usageAnalytics: this.usageAnalytics
        };
    };
    /**
     * Gets the query context for the current search interface.
     *
     * If the search interface has performed at least one query, it will try to resolve the context from the last query sent to the Coveo Search API.
     *
     * If the search interface has not performed a query yet, it will try to resolve the context from any avaiable {@link PipelineContext} component.
     *
     * If multiple {@link PipelineContext} components are available, it will merge all context values together.
     *
     * **Note:**
     * Having multiple PipelineContext components in the same search interface is not recommended, especially if some context keys are repeated across those components.
     *
     * If no context is found, returns `undefined`
     */
    SearchInterface.prototype.getQueryContext = function () {
        var ret;
        var lastQuery = this.queryController.getLastQuery();
        if (lastQuery.context) {
            ret = lastQuery.context;
        }
        else {
            var pipelines = this.getComponents('PipelineContext');
            if (pipelines && !underscore_1.isEmpty(pipelines)) {
                var contextMerged = underscore_1.chain(pipelines)
                    .map(function (pipeline) { return pipeline.getContext(); })
                    .reduce(function (memo, context) { return (__assign({}, memo, context)); }, {})
                    .value();
                if (!underscore_1.isEmpty(contextMerged)) {
                    ret = contextMerged;
                }
            }
        }
        return ret;
    };
    /**
     * Gets all the components of a given type.
     * @param type Normally, the component type is a unique identifier without the `Coveo` prefix (e.g., `CoveoFacet` ->
     * `Facet`, `CoveoPager` -> `Pager`, `CoveoQuerybox` -> `Querybox`, etc.).
     */
    SearchInterface.prototype.getComponents = function (type) {
        if (this.attachedComponents == null) {
            this.attachedComponents = {};
        }
        if (!(type in this.attachedComponents)) {
            this.attachedComponents[type] = [];
        }
        return this.attachedComponents[type];
    };
    /**
     * Detaches from the SearchInterface every component that is inside the given element.
     * @param element
     */
    SearchInterface.prototype.detachComponentsInside = function (element) {
        var _this = this;
        underscore_1.each(this.attachedComponents, function (components, type) {
            components
                .filter(function (component) { return element != component.element && element.contains(component.element); })
                .forEach(function (component) { return _this.detachComponent(type, component); });
        });
    };
    SearchInterface.prototype.initializeAnalytics = function () {
        var analyticsRef = BaseComponent_1.BaseComponent.getComponentRef('Analytics');
        if (analyticsRef) {
            return analyticsRef.create(this.element, this.analyticsOptions, this.getBindings());
        }
        return new NoopAnalyticsClient_1.NoopAnalyticsClient();
    };
    SearchInterface.prototype.setupHistoryManager = function (element, _window) {
        var _this = this;
        if (!this.options.enableHistory) {
            this.historyManager = new NoopHistoryController_1.NoopHistoryController();
            Dom_1.$$(this.element).on(InitializationEvents_1.InitializationEvents.restoreHistoryState, function () {
                return _this.queryStateModel.setMultiple(__assign({}, _this.queryStateModel.defaultAttributes));
            });
            return;
        }
        if (this.options.useLocalStorageForHistory) {
            this.historyManager = new LocalStorageHistoryController_1.LocalStorageHistoryController(element, _window, this.queryStateModel, this.queryController);
            return;
        }
        this.historyManager = new HistoryController_1.HistoryController(element, _window, this.queryStateModel, this.queryController);
    };
    SearchInterface.prototype.setupQueryMode = function () {
        if (this.options.allowQueriesWithoutKeywords) {
            this.initializeEmptyQueryAllowed();
        }
        else {
            this.initializeEmptyQueryNotAllowed();
        }
    };
    SearchInterface.prototype.setupEventsHandlers = function () {
        var _this = this;
        var eventName = this.queryStateModel.getEventName(Model_1.Model.eventTypes.preprocess);
        Dom_1.$$(this.element).on(eventName, function (e, args) { return _this.handlePreprocessQueryStateModel(args); });
        Dom_1.$$(this.element).on(QueryEvents_1.QueryEvents.buildingQuery, function (e, args) { return _this.handleBuildingQuery(args); });
        Dom_1.$$(this.element).on(QueryEvents_1.QueryEvents.querySuccess, function (e, args) { return _this.handleQuerySuccess(args); });
        Dom_1.$$(this.element).on(QueryEvents_1.QueryEvents.queryError, function (e, args) { return _this.handleQueryError(args); });
        Dom_1.$$(this.element).on(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () { return _this.handleAfterComponentsInitialization(); });
        var debugChanged = this.queryStateModel.getEventName(Model_1.Model.eventTypes.changeOne + QueryStateModel_1.QueryStateModel.attributesEnum.debug);
        Dom_1.$$(this.element).on(debugChanged, function (e, args) { return _this.handleDebugModeChange(args); });
        this.queryStateModel.registerNewAttribute(QueryStateModel_1.QueryStateModel.attributesEnum.fv, {});
        var eventNameQuickview = this.queryStateModel.getEventName(Model_1.Model.eventTypes.changeOne + QueryStateModel_1.QueryStateModel.attributesEnum.quickview);
        Dom_1.$$(this.element).on(eventNameQuickview, function (e, args) { return _this.handleQuickviewChanged(args); });
    };
    SearchInterface.prototype.setupDebugInfo = function () {
        var _this = this;
        if (this.options.enableDebugInfo) {
            setTimeout(function () { return new Debug_1.Debug(_this.element, _this.getBindings()); });
        }
    };
    SearchInterface.prototype.setupScrollRestorer = function (element, _window, queryStateModel) {
        if (this.options.enableScrollRestoration) {
            this.scrollRestorer = new ScrollRestorer_1.ScrollRestorer(element, queryStateModel);
        }
    };
    SearchInterface.prototype.setupResponsiveComponents = function () {
        this.responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents();
        this.responsiveComponents.setMediumScreenWidth(this.options.responsiveMediumBreakpoint);
        this.responsiveComponents.setSmallScreenWidth(this.options.responsiveSmallBreakpoint);
        this.responsiveComponents.setResponsiveMode(this.options.responsiveMode);
        this.ensureFacetsMobileMode();
    };
    SearchInterface.prototype.ensureFacetsMobileMode = function () {
        var _this = this;
        if (this.root.querySelector('.CoveoFacetsMobileMode')) {
            return;
        }
        __webpack_require__.e/* require.ensure */(3).then((function () {
            var loadedModule = __webpack_require__(86);
            var facetsMobileModeCtor = loadedModule.FacetsMobileMode;
            var facetsMobileModeEl = Dom_1.$$('div');
            Dom_1.$$(_this.element).prepend(facetsMobileModeEl.el);
            var options = _this.options.originalOptionsObject['FacetsMobileMode'] || {};
            new facetsMobileModeCtor(facetsMobileModeEl.el, options, _this.getBindings());
        }).bind(null, __webpack_require__)).catch(null);
    };
    SearchInterface.prototype.handleDebugModeChange = function (args) {
        var _this = this;
        if (args.value && !this.relevanceInspector && this.options.enableDebugInfo) {
            __webpack_require__.e/* require.ensure */(0).then((function () {
                var loadedModule = __webpack_require__(236);
                var relevanceInspectorCtor = loadedModule.RelevanceInspector;
                var relevanceInspectorElement = Dom_1.$$('btn');
                Dom_1.$$(_this.element).prepend(relevanceInspectorElement.el);
                _this.relevanceInspector = new relevanceInspectorCtor(relevanceInspectorElement.el, _this.getBindings());
            }).bind(null, __webpack_require__)).catch(null);
        }
    };
    SearchInterface.prototype.handlePreprocessQueryStateModel = function (args) {
        var tgFromModel = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.tg);
        var tFromModel = this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.t);
        var tg = tgFromModel;
        var t = tFromModel;
        // if you want to set the tab group
        if (args && args.tg !== undefined) {
            args.tg = this.getTabGroupId(args.tg);
            if (tg != args.tg) {
                args.t = args.t || QueryStateModel_1.QueryStateModel.defaultAttributes.t;
                args.sort = args.sort || QueryStateModel_1.QueryStateModel.defaultAttributes.sort;
                tg = args.tg;
            }
        }
        if (args && args.t !== undefined) {
            args.t = this.getTabId(tg, args.t);
            if (t != args.t) {
                args.sort = args.sort || QueryStateModel_1.QueryStateModel.defaultAttributes.sort;
                t = args.t;
            }
        }
        if (args && args.sort !== undefined) {
            args.sort = this.getSort(t, args.sort);
        }
        if (args && args.quickview !== undefined) {
            args.quickview = this.getQuickview(args.quickview);
        }
        // `fv:` states are intended to be redirected and used on a standard Search Interface,
        // else the state gets transformed to `hd` before the redirection.
        if (args && args.fv && !(this instanceof StandaloneSearchInterface)) {
            this.facetValueStateHandler.handleFacetValueState(args);
        }
    };
    SearchInterface.prototype.getTabGroupId = function (tabGroupId) {
        var tabGroupRef = BaseComponent_1.BaseComponent.getComponentRef('TabGroup');
        if (tabGroupRef) {
            var tabGroups = this.getComponents(tabGroupRef.ID);
            // check if the tabgroup is correct
            if (tabGroupId != QueryStateModel_1.QueryStateModel.defaultAttributes.tg &&
                underscore_1.any(tabGroups, function (tabGroup) { return !tabGroup.disabled && tabGroupId == tabGroup.options.id; })) {
                return tabGroupId;
            }
            // select the first tabGroup
            if (tabGroups.length > 0) {
                return tabGroups[0].options.id;
            }
        }
        return QueryStateModel_1.QueryStateModel.defaultAttributes.tg;
    };
    SearchInterface.prototype.getTabId = function (tabGroupId, tabId) {
        var tabRef = BaseComponent_1.BaseComponent.getComponentRef('Tab');
        var tabGroupRef = BaseComponent_1.BaseComponent.getComponentRef('TabGroup');
        if (tabRef) {
            var tabs = this.getComponents(tabRef.ID);
            if (tabGroupRef) {
                // if has a tabGroup
                if (tabGroupId != QueryStateModel_1.QueryStateModel.defaultAttributes.tg) {
                    var tabGroups = this.getComponents(tabGroupRef.ID);
                    var tabGroup_1 = underscore_1.find(tabGroups, function (tabGroup) { return tabGroupId == tabGroup.options.id; });
                    // check if the tabgroup contain this tab
                    if (tabId != QueryStateModel_1.QueryStateModel.defaultAttributes.t &&
                        underscore_1.any(tabs, function (tab) { return tabId == tab.options.id && tabGroup_1.isElementIncludedInTabGroup(tab.element); })) {
                        return tabId;
                    }
                    // select the first tab in the tabGroup
                    var tab = underscore_1.find(tabs, function (tab) { return tabGroup_1.isElementIncludedInTabGroup(tab.element); });
                    if (tab != null) {
                        return tab.options.id;
                    }
                    return QueryStateModel_1.QueryStateModel.defaultAttributes.t;
                }
            }
            // check if the tab is correct
            if (tabId != QueryStateModel_1.QueryStateModel.defaultAttributes.t && underscore_1.any(tabs, function (tab) { return tabId == tab.options.id; })) {
                return tabId;
            }
            // select the first tab
            if (tabs.length > 0) {
                return tabs[0].options.id;
            }
        }
        return QueryStateModel_1.QueryStateModel.defaultAttributes.t;
    };
    SearchInterface.prototype.getSort = function (tabId, sortId) {
        var sortRef = BaseComponent_1.BaseComponent.getComponentRef('Sort');
        if (sortRef) {
            var sorts = this.getComponents(sortRef.ID);
            // if has a selected tab
            var tabRef = BaseComponent_1.BaseComponent.getComponentRef('Tab');
            if (tabRef) {
                if (tabId != QueryStateModel_1.QueryStateModel.defaultAttributes.t) {
                    var tabs = this.getComponents(tabRef.ID);
                    var tab_1 = underscore_1.find(tabs, function (tab) { return tabId == tab.options.id; });
                    var sortCriteria = tab_1.options.sort;
                    // check if the tab contain this sort
                    if (sortId != QueryStateModel_1.QueryStateModel.defaultAttributes.sort &&
                        underscore_1.any(sorts, function (sort) { return tab_1.isElementIncludedInTab(sort.element) && sort.match(sortId); })) {
                        return sortId;
                    }
                    else if (sortCriteria != null) {
                        // if not and tab.options.sort is set apply it
                        return sortCriteria.toString();
                    }
                    // select the first sort in the tab
                    var sort = underscore_1.find(sorts, function (sort) { return tab_1.isElementIncludedInTab(sort.element); });
                    if (sort != null) {
                        return sort.options.sortCriteria[0].toString();
                    }
                    return QueryStateModel_1.QueryStateModel.defaultAttributes.sort;
                }
            }
            // check if the sort is correct
            if (sortId != QueryStateModel_1.QueryStateModel.defaultAttributes.sort && underscore_1.any(sorts, function (sort) { return sort.match(sortId); })) {
                return sortId;
            }
            // select the first sort
            if (sorts.length > 0) {
                return sorts[0].options.sortCriteria[0].toString();
            }
        }
        return QueryStateModel_1.QueryStateModel.defaultAttributes.sort;
    };
    SearchInterface.prototype.getQuickview = function (quickviewId) {
        var quickviewRef = BaseComponent_1.BaseComponent.getComponentRef('Quickview');
        if (quickviewRef) {
            var quickviews = this.getComponents(quickviewRef.ID);
            if (underscore_1.any(quickviews, function (quickview) { return quickview.getHashId() == quickviewId; })) {
                return quickviewId;
            }
        }
        return QueryStateModel_1.QueryStateModel.defaultAttributes.quickview;
    };
    SearchInterface.prototype.handleQuickviewChanged = function (args) {
        var quickviewRef = BaseComponent_1.BaseComponent.getComponentRef('Quickview');
        if (quickviewRef) {
            var quickviews = this.getComponents(quickviewRef.ID);
            if (args.value != '') {
                var quickviewsPartition = underscore_1.partition(quickviews, function (quickview) { return quickview.getHashId() == args.value; });
                if (quickviewsPartition[0].length != 0) {
                    underscore_1.first(quickviewsPartition[0]).open();
                    underscore_1.each(underscore_1.tail(quickviewsPartition[0]), function (quickview) { return quickview.close(); });
                }
                underscore_1.each(quickviewsPartition[1], function (quickview) { return quickview.close(); });
            }
            else {
                underscore_1.each(quickviews, function (quickview) {
                    quickview.close();
                });
            }
        }
    };
    SearchInterface.prototype.handleBuildingQuery = function (data) {
        if (this.options.enableDuplicateFiltering) {
            data.queryBuilder.enableDuplicateFiltering = true;
        }
        if (!Utils_1.Utils.isNullOrUndefined(this.options.pipeline)) {
            data.queryBuilder.pipeline = this.options.pipeline;
        }
        if (!Utils_1.Utils.isNullOrUndefined(this.options.maximumAge)) {
            data.queryBuilder.maximumAge = this.options.maximumAge;
        }
        if (!Utils_1.Utils.isNullOrUndefined(this.options.resultsPerPage)) {
            data.queryBuilder.numberOfResults = this.options.resultsPerPage;
        }
        if (!Utils_1.Utils.isNullOrUndefined(this.options.excerptLength)) {
            data.queryBuilder.excerptLength = this.options.excerptLength;
        }
        if (Utils_1.Utils.isNonEmptyString(this.options.expression)) {
            data.queryBuilder.constantExpression.add(this.options.expression);
        }
        if (Utils_1.Utils.isNonEmptyString(this.options.filterField)) {
            data.queryBuilder.filterField = this.options.filterField;
        }
        if (Utils_1.Utils.isNonEmptyString(this.options.timezone)) {
            data.queryBuilder.timezone = this.options.timezone;
        }
        data.queryBuilder.enableCollaborativeRating = this.options.enableCollaborativeRating;
        data.queryBuilder.enableDuplicateFiltering = this.options.enableDuplicateFiltering;
        data.queryBuilder.allowQueriesWithoutKeywords = this.options.allowQueriesWithoutKeywords;
        var endpoint = this.queryController.getEndpoint();
        if (endpoint != null && endpoint.options) {
            if (this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.debug)) {
                data.queryBuilder.maximumAge = 0;
                data.queryBuilder.enableDebug = true;
                data.queryBuilder.fieldsToExclude = ['allmetadatavalues'];
                data.queryBuilder.fieldsToInclude = null;
            }
        }
    };
    SearchInterface.prototype.handleQuerySuccess = function (data) {
        var noResults = data.results.results.length == 0;
        this.toggleSectionState('coveo-no-results', noResults);
        this.handlePossiblyModifiedNumberOfResultsInQueryPipeline(data);
        var resultsHeader = Dom_1.$$(this.element).find('.coveo-results-header');
        if (resultsHeader) {
            Dom_1.$$(resultsHeader).removeClass('coveo-query-error');
        }
    };
    SearchInterface.prototype.handlePossiblyModifiedNumberOfResultsInQueryPipeline = function (data) {
        if (!data || !data.query || !data.results) {
            return;
        }
        var numberOfRequestedResults = data.query.numberOfResults;
        var numberOfResultsActuallyReturned = data.results.results.length;
        var areLastPageResults = data.results.totalCountFiltered - data.query.firstResult === numberOfResultsActuallyReturned;
        var moreResultsAvailable = !areLastPageResults && data.results.totalCountFiltered > numberOfResultsActuallyReturned;
        if (numberOfRequestedResults != numberOfResultsActuallyReturned && moreResultsAvailable) {
            this.isResultsPerPageModifiedByPipeline = true;
            this.queryPipelineConfigurationForResultsPerPage = numberOfResultsActuallyReturned;
        }
        else {
            this.isResultsPerPageModifiedByPipeline = false;
            this.queryPipelineConfigurationForResultsPerPage = null;
        }
    };
    SearchInterface.prototype.handleQueryError = function (data) {
        this.toggleSectionState('coveo-no-results');
        var resultsHeader = Dom_1.$$(this.element).find('.coveo-results-header');
        if (resultsHeader) {
            Dom_1.$$(resultsHeader).addClass('coveo-query-error');
        }
    };
    SearchInterface.prototype.handleAfterComponentsInitialization = function () {
        var _this = this;
        underscore_1.each(this.attachedComponents, function (components) {
            components.forEach(function (component) {
                if (FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.isAutoLayoutAdjustable(component)) {
                    FacetColumnAutoLayoutAdjustment_1.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(_this.element, component);
                }
            });
        });
        if (this.duplicatesFacets.length) {
            this.logger.warn("The following facets have duplicate id/field:", this.duplicatesFacets, "Ensure that each facet in your search interface has a unique id.");
        }
    };
    Object.defineProperty(SearchInterface.prototype, "duplicatesFacets", {
        get: function () {
            var duplicate = [];
            var facets = ComponentsTypes_1.ComponentsTypes.getAllFacetsFromSearchInterface(this);
            facets.forEach(function (facet) {
                facets.forEach(function (cmp) {
                    if (facet == cmp) {
                        return;
                    }
                    if (facet.options.id === cmp.options.id) {
                        duplicate.push(facet);
                        return;
                    }
                });
            });
            return duplicate;
        },
        enumerable: true,
        configurable: true
    });
    SearchInterface.prototype.toggleSectionState = function (cssClass, toggle) {
        var _this = this;
        if (toggle === void 0) { toggle = true; }
        var facetSection = Dom_1.$$(this.element).find('.coveo-facet-column');
        var resultsSection = Dom_1.$$(this.element).find('.coveo-results-column');
        var resultsHeader = Dom_1.$$(this.element).find('.coveo-results-header');
        var facetSearchs = Dom_1.$$(this.element).findAll('.coveo-facet-search-results');
        var recommendationSection = Dom_1.$$(this.element).find('.coveo-recommendation-main-section');
        if (facetSection) {
            Dom_1.$$(facetSection).toggleClass(cssClass, toggle && !this.queryStateModel.atLeastOneFacetIsActive());
        }
        if (resultsSection) {
            Dom_1.$$(resultsSection).toggleClass(cssClass, toggle && !this.queryStateModel.atLeastOneFacetIsActive());
        }
        if (resultsHeader) {
            Dom_1.$$(resultsHeader).toggleClass(cssClass, toggle && !this.queryStateModel.atLeastOneFacetIsActive());
        }
        if (recommendationSection) {
            Dom_1.$$(recommendationSection).toggleClass(cssClass, toggle);
        }
        if (facetSearchs && facetSearchs.length > 0) {
            underscore_1.each(facetSearchs, function (facetSearch) {
                Dom_1.$$(facetSearch).toggleClass(cssClass, toggle && !_this.queryStateModel.atLeastOneFacetIsActive());
            });
        }
    };
    SearchInterface.prototype.initializeEmptyQueryAllowed = function () {
        new InitializationPlaceholder_1.InitializationPlaceholder(this.element).withFullInitializationStyling().withAllPlaceholders();
    };
    SearchInterface.prototype.initializeEmptyQueryNotAllowed = function () {
        var _this = this;
        var placeholder = new InitializationPlaceholder_1.InitializationPlaceholder(this.element)
            .withEventToRemovePlaceholder(QueryEvents_1.QueryEvents.newQuery)
            .withFullInitializationStyling()
            .withHiddenRootElement()
            .withPlaceholderForFacets()
            .withPlaceholderForResultList();
        Dom_1.$$(this.root).on(InitializationEvents_1.InitializationEvents.restoreHistoryState, function () {
            placeholder.withVisibleRootElement();
            if (_this.queryStateModel.get('q') == '') {
                placeholder.withWaitingForFirstQueryMode();
            }
        });
        Dom_1.$$(this.element).on(QueryEvents_1.QueryEvents.doneBuildingQuery, function (e, args) {
            if (!args.queryBuilder.containsEndUserKeywords()) {
                var lastQuery = _this.queryController.getLastQuery().q;
                if (Utils_1.Utils.isNonEmptyString(lastQuery)) {
                    _this.queryStateModel.set(QueryStateModel_1.QUERY_STATE_ATTRIBUTES.Q, lastQuery);
                    args.queryBuilder.expression.add(lastQuery);
                }
                else {
                    _this.logger.info('Query cancelled by the Search Interface', 'Configuration does not allow empty query', _this, _this.options);
                    args.cancel = true;
                    _this.queryStateModel.reset();
                    new InitializationPlaceholder_1.InitializationPlaceholder(_this.element)
                        .withEventToRemovePlaceholder(QueryEvents_1.QueryEvents.newQuery)
                        .withFullInitializationStyling()
                        .withVisibleRootElement()
                        .withPlaceholderForFacets()
                        .withPlaceholderForResultList()
                        .withWaitingForFirstQueryMode();
                }
            }
        });
    };
    SearchInterface.ID = 'SearchInterface';
    /**
     * The options for the search interface
     * @componentOptions
     */
    SearchInterface.options = {
        /**
         * Whether to allow the end user to navigate search history using the **Back** and **Forward** buttons
         * of the browser.
         *
         * If this option is set to `true`, the state of the current query will be saved in the hash portion
         * of the URL when the user submits the query.
         *
         * **Example:**
         * > If the `enableHistory` option is `true` and the current query is `foobar`, the SearchInterface component
         * > saves `q=foobar` in the URL hash when the user submits the query.
         *
         * **Note:** Avoid setting this option to `true` on a search interface that relates to a Coveo for Salesforce Full Search or Insight Panel component, otherwise the component won't initialize correctly.
         */
        enableHistory: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies whether to enable automatic responsive mode (i.e., automatically placing {@link Facet} and {@link Tab}
         * components in dropdown menus under the search box when the width of the SearchInterface HTML element reaches or
         * falls behind a certain pixel threshold).
         *
         * You might want to set this option to `false` if automatic responsive mode does not suit the specific design needs
         * of your implementation.
         *
         * **Note:**
         *
         * > If this option is `true`, you can also specify whether to enable responsive mode for Facet components (see
         * > {@link Facet.options.enableResponsiveMode}) and for Tab components (see
         * > {@link Tab.options.enableResponsiveMode}).
         * >
         * > In addition, you can specify the label you wish to display on the dropdown buttons (see
         * > {@link Facet.options.dropdownHeaderLabel} and {@link Tab.options.dropdownHeaderLabel}).
         *
         * Default value is `true`.
         */
        enableAutomaticResponsiveMode: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies whether to save the interface state in the local storage of the browser.
         *
         * You might want to set this option to `true` for reasons specifically important for your implementation.
         *
         * Default value is `false`.
         */
        useLocalStorageForHistory: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies the number of results to display on each page.
         *
         * For more advanced features, see the {@link ResultsPerPage} component.
         *
         * **Note:**
         *
         * > When the {@link ResultsPerPage} component is present in the page, this option gets overridden and is useless.
         *
         * Default value is `10`. Minimum value is `0`.
         */
        resultsPerPage: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 10, min: 0 }),
        /**
         * Specifies the number of characters to get at query time to create an excerpt of the result.
         *
         * This setting is global and cannot be modified on a per-result basis.
         *
         * See also the {@link Excerpt} component.
         *
         * Default value is `200`. Minimum value is `0`.
         */
        excerptLength: ComponentOptions_1.ComponentOptions.buildNumberOption({ defaultValue: 200, min: 0 }),
        /**
         * Specifies an expression to add to each query.
         *
         * You might want to use this options to add a global filter to your entire search interface that applies for all
         * tabs.
         *
         * You should not use this option to address security concerns (it is JavaScript, after all).
         *
         * **Note:**
         *
         * > It also is possible to set this option separately for each {@link Tab} component
         * > (see {@link Tab.options.expression}).
         *
         * Default value is `''`.
         */
        expression: ComponentOptions_1.ComponentOptions.buildQueryExpressionOption({ defaultValue: '' }),
        /**
         * Specifies the name of a field to use as a custom filter when executing the query (also referred to as
         * "folding").
         *
         * Setting a value for this option causes the index to return only one result having any particular value inside the
         * filter field. Any other matching result is "folded" inside the childResults member of each JSON query result.
         *
         * This feature is typically useful with threaded conversations to include only one top-level result per
         * conversation. Thus, the field you specify for this option will typically be value unique to each thread that is
         * shared by all items (e.g., posts, emails, etc) in the thread.
         *
         * For more advanced features, see the {@link Folding} component.
         *
         * Default value is the empty string (`''`).
         */
        filterField: ComponentOptions_1.ComponentOptions.buildFieldOption({ defaultValue: '' }),
        /**
         * Specifies whether to display a loading animation before the first query successfully returns.
         *
         * **Note:**
         *
         * > If you do not set this options to `false`, the loading animation will still run until the first query
         * > successfully returns even if the [autoTriggerQuery]{@link SearchInterface.options.autoTriggerQuery} option is
         * `false`.
         *
         * See also the [firstLoadingAnimation]{@link SearchInterface.options.firstLoadingAnimation} option.
         *
         * Default value is `true`.
         *
         * @deprecated This option is exposed for legacy reasons. Since the
         * [July 2017 Release (v2.2900.23)](https://docs.coveo.com/en/432/), the loading animation is composed of
         * placeholders, making this option is obsolete.
         */
        hideUntilFirstQuery: ComponentOptions_1.ComponentOptions.buildBooleanOption({
            deprecated: 'Exposed for legacy reasons. The loading animation is now composed of placeholders, and this option is obsolete.'
        }),
        /**
         * Specifies the animation that you wish to display while your interface is loading.
         *
         * You can either specify the CSS selector of an HTML element that matches the default CSS class
         * (`coveo-first-loading-animation`), or add `-selector` to the markup attribute of this option to specify the CSS
         * selector of an HTML element that matches any CSS class.
         *
         * See also the [hideUntilFirstQuery]{@link SearchInterface.options.hideUntilFirstQuery} option.
         *
         * **Examples:**
         *
         * In this first case, the SearchInterface uses the HTML element whose `id` attribute is `MyAnimation` as the
         * loading animation only if the `class` attribute of this element also matches `coveo-first-loading-animation`.
         * Default loading animation CSS, which you can customize as you see fit, applies to this HTML element.
         * ```html
         * <div class='CoveoSearchInterface' data-first-loading-animation='#MyAnimation'>
         *   <div id='MyAnimation' class='coveo-first-loading-animation'>
         *     <!-- ... -->
         *   </div>
         *   <!-- ... -->
         * </div>
         * ```
         *
         * In this second case, the SearchInterface uses the HTML element whose `id` attribute is `MyAnimation` as the
         * loading animation no matter what CSS class it matches. However, if the `class` attribute of the HTML element does
         * not match `coveo-first-loading-animation`, no default loading animation CSS applies to this HTML element.
         * Normally, you should only use `data-first-loading-animation-selector` if you want to completely override the
         * default loading animation CSS.
         * ```html
         * <div class='CoveoSearchInterface' data-first-loading-animation-selector='#MyAnimation'>
         *   <div id='MyAnimation' class='my-custom-loading-animation-class'>
         *     <!-- ... -->
         *   </div>
         *   <!-- ... -->
         * </div>
         * ```
         *
         * By default, the loading animation is a Coveo CSS animation (which you can customize with CSS).
         *
         * @deprecated This option is exposed for legacy reasons. Since the
         * [July 2017 Release (v2.2900.23)](https://docs.coveo.com/en/432/), the loading animation is composed of
         * placeholders, making this option is obsolete.
         */
        firstLoadingAnimation: ComponentOptions_1.ComponentOptions.buildChildHtmlElementOption({
            deprecated: 'Exposed for legacy reasons. The loading animation is now composed of placeholder, and this options is obsolete.'
        }),
        /**
         * Specifies whether to trigger the first query automatically when the page finishes loading.
         *
         * Default value is `true`.
         */
        autoTriggerQuery: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies if the search interface should perform queries when no keywords are entered by the end user.
         *
         * When this option is set to true, the interface will initially only load with the search box, as long as you have a search box component in your interface.
         *
         * Once the user submits a query, the full search interface loads to display the results.
         *
         * When using the Coveo for Salesforce Free edition, this option is automatically set to false, and should not be changed.
         *
         * This option interacts closely with the {@link SearchInterface.options.autoTriggerQuery} option, as the automatic query is not triggered when there are no keywords.
         *
         * It also modifies the {@link IQuery.allowQueriesWithoutKeywords} query parameter.
         *
         * Default value is `true`, except in Coveo for Salesforce Free edition in which it is `false`.
         */
        allowQueriesWithoutKeywords: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        endpoint: ComponentOptions_1.ComponentOptions.buildCustomOption(function (endpoint) { return (endpoint != null && endpoint in SearchEndpoint_1.SearchEndpoint.endpoints ? SearchEndpoint_1.SearchEndpoint.endpoints[endpoint] : null); }, { defaultFunction: function () { return SearchEndpoint_1.SearchEndpoint.endpoints['default']; } }),
        /**
         * Specifies the timezone in which the search interface is loaded. This allows the index to recognize some special
         * query syntax.
         *
         * This option must have a valid IANA zone info key (AKA the Olson time zone database) as its value.
         *
         * **Example:** `America/New_York`.
         *
         * By default, the search interface allows a library to try to detect the timezone automatically.
         */
        timezone: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultFunction: function () { return jstz.determine().name(); } }),
        /**
         * Specifies whether to enable the feature that allows the end user to ALT + double click any result to open a debug
         * page with detailed information about all properties and fields for that result.
         *
         * Enabling this feature causes no security concern; the entire debug information is always visible to the end user
         * through the browser developer console or by calling the Coveo API directly.
         *
         * Default value is `true`.
         */
        enableDebugInfo: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * **Note:**
         *
         * > The Coveo Cloud V2 platform does not support collaborative rating. Therefore, this option is obsolete in Coveo Cloud V2.
         *
         * Specifies whether to enable collaborative rating, which you can leverage using the
         * [`ResultRating`]{@link ResultRating} component.
         *
         * Setting this option to `true` has no effect unless collaborative rating is also enabled on your Coveo index.
         *
         * Default value is `false`.
         */
        enableCollaborativeRating: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Whether to filter out duplicates, so that items resembling one another only appear once in the query results.
         *
         * **Notes:**
         * - Two items must be at least 85% similar to one another to be considered duplicates.
         * - When a pair of duplicates is found, only the higher-ranked item of the two is kept in the result set.
         * - Enabling this feature can make the total result count less precise, as only the requested page of query results is submitted to duplicate filtering.
         * - This option can also be explicitly set on the [`Tab`]{@link Tab} component. When this is the case, the `Tab` configuration prevails.
         */
        enableDuplicateFiltering: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies the name of the query pipeline to use for the queries.
         *
         * You can specify a value for this option if your index is in a Coveo Cloud organization in which pipelines have
         * been created (see [Adding and Managing Query Pipelines](https://docs.coveo.com/en/1791/)).
         *
         * **Note:**
         *
         * > It also is possible to set this option separately for each {@link Tab} component
         * > (see {@link Tab.options.pipeline}).
         *
         * Default value is `undefined`, which means that the search interface uses the default pipeline.
         */
        pipeline: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the maximum age (in milliseconds) that cached query results can have to still be usable as results
         * instead of performing a new query on the index. The cache is located in the Coveo Search API (which resides
         * between the index and the search interface).
         *
         * If cached results that are older than the age you specify in this option are available, the framework will not
         * use these results; it will rather perform a new query on the index.
         *
         * On high-volume public web sites, specifying a higher value for this option can greatly improve query response
         * time at the cost of result freshness.
         *
         * **Note:**
         *
         * > It also is possible to set this option separately for each {@link Tab} component
         * > (see {@link Tab.options.maximumAge}).
         *
         * Default value is `undefined`, which means that the search interface lets the Coveo Search API determine the
         * maximum cache age. This is typically equivalent to 30 minutes (see
         * [maximumAge](https://docs.coveo.com/en/13#operation/searchUsingPost-maximumAge)).
         */
        maximumAge: ComponentOptions_1.ComponentOptions.buildNumberOption(),
        /**
         * Specifies the search page you wish to navigate to when instantiating a standalone search box interface.
         *
         * Default value is `undefined`, which means that the search interface does not redirect.
         */
        searchPageUri: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the search interface width that should be considered "medium" size, in pixels.
         *
         * When the width of the window/device that displays the search page reaches or falls short of this threshold (but still exceeds the [responsiveSmallBreakpoint]{@link SearchInterface.options.responsiveSmallBreakpoint} value), the search page layout will change so that, for instance, facets within the element that has the coveo-facet-column class will be accessible from a dropdown menu on top of the result list rather than being fully rendered next to the result list.
         *
         * This option is only taken into account when [enableAutomaticResponsiveMode]{@link SearchInterface.options.enableAutomaticResponsiveMode} is set to true.
         *
         * Default value is `800`.
         */
        responsiveMediumBreakpoint: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: ResponsiveComponents_1.MEDIUM_SCREEN_WIDTH,
            depend: 'enableAutomaticResponsiveMode'
        }),
        /**
         * Specifies the search interface width that should be considered "small" size, in pixels.
         *
         * When the width of the window/device that displays the search page reaches or falls short of this threshold, the search page layout will change so that, for instance, some result list layouts which are not suited for being rendered on a small screen/area will be disabled.
         *
         * This option is only taken into account when [enableAutomaticResponsiveMode]{@link SearchInterface.options.enableAutomaticResponsiveMode} is set to true.
         *
         * Default value is `480`.
         */
        responsiveSmallBreakpoint: ComponentOptions_1.ComponentOptions.buildNumberOption({
            defaultValue: ResponsiveComponents_1.SMALL_SCREEN_WIDTH,
            depend: 'enableAutomaticResponsiveMode'
        }),
        /**
         * Specifies the search interface responsive mode that should be used.
         *
         * When the mode is auto, the width of the window/device that displays the search page is used to determine which layout the search page should use
         * (see [enableAutomaticResponsiveMode]{@link SearchInterface.options.enableAutomaticResponsiveMode}, [responsiveMediumBreakpoint]{@link SearchInterface.options.responsiveMediumBreakpoint}
         * and [responsiveSmallBreakpoint{@link SearchInterface.options.responsiveSmallBreakpoint}])
         *
         * When it's not on auto, the width is ignored and the the layout used depends on this option
         * (e.g. If set to "small", then the search interface layout will be the same as if it was on a narrow window/device)
         */
        responsiveMode: ComponentOptions_1.ComponentOptions.buildCustomOption(function (value) {
            // Validator function for the string passed, verify it's one of the accepted values.
            if (value === 'auto' || value === 'small' || value === 'medium' || value === 'large') {
                return value;
            }
            else {
                console.warn(value + " is not a proper value for responsiveMode, auto has been used instead.");
                return 'auto';
            }
        }, {
            defaultValue: 'auto'
        }),
        /**
         * Specifies whether to restore the last scroll position when navigating back
         * to the search interface.
         *
         * @availablesince [March 2020 Release (v2.8521)](https://docs.coveo.com/en/3203/)
         */
        enableScrollRestoration: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Specifies the HTMLElement to which Modals components of the search interface will be attached to. You can
         * either specify a CSS selector or pass an HTMLElement in the options when calling Coveo.init.
         *
         * Default value is `element.ownerDocument.body`.
         *
         * **Example in attribute:**
         * ```html
         * <div class="CoveoSearchInterface" data-modal-container="#my-modal-container"></div>
         * ```
         *
         * **Example in init options:**
         * ```javascript
         * var myContainer = document.getElementById('my-modal-container');
         * Coveo.init(root, {
         *   SearchInterface: {
         *     modalContainer: myContainer
         *   }
         * });
         * ```
         */
        modalContainer: ComponentOptions_1.ComponentOptions.buildSelectorOption({ defaultFunction: function (element) { return element.ownerDocument.body; } })
    };
    SearchInterface.SMALL_INTERFACE_CLASS_NAME = 'coveo-small-search-interface';
    return SearchInterface;
}(RootComponent_1.RootComponent));
exports.SearchInterface = SearchInterface;
var StandaloneSearchInterface = /** @class */ (function (_super) {
    __extends(StandaloneSearchInterface, _super);
    function StandaloneSearchInterface(element, options, analyticsOptions, _window) {
        if (_window === void 0) { _window = window; }
        var _this = _super.call(this, element, ComponentOptions_1.ComponentOptions.initComponentOptions(element, StandaloneSearchInterface, options), analyticsOptions, _window) || this;
        _this.element = element;
        _this.options = options;
        _this.analyticsOptions = analyticsOptions;
        _this._window = _window;
        Dom_1.$$(_this.root).on(QueryEvents_1.QueryEvents.newQuery, function (e, args) { return _this.handleRedirect(e, args); });
        return _this;
    }
    StandaloneSearchInterface.prototype.handleRedirect = function (e, data) {
        if (data.shouldRedirectStandaloneSearchbox === false) {
            return;
        }
        var dataToSendOnBeforeRedirect = {
            searchPageUri: this.options.searchPageUri,
            cancel: false
        };
        Dom_1.$$(this.root).trigger(StandaloneSearchInterfaceEvents_1.StandaloneSearchInterfaceEvents.beforeRedirect, dataToSendOnBeforeRedirect);
        if (dataToSendOnBeforeRedirect.cancel) {
            return;
        }
        data.cancel = true;
        if (!this.searchboxIsEmpty() || this.options.redirectIfEmpty) {
            this.doRedirect(dataToSendOnBeforeRedirect.searchPageUri);
        }
    };
    StandaloneSearchInterface.prototype.doRedirect = function (searchPage) {
        return __awaiter(this, void 0, void 0, function () {
            var cachedHashValue, executionPlan, redirectionURL;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        cachedHashValue = this.encodedHashValues;
                        return [4 /*yield*/, this.queryController.fetchQueryExecutionPlan()];
                    case 1:
                        executionPlan = _a.sent();
                        redirectionURL = executionPlan && executionPlan.redirectionURL;
                        if (!redirectionURL) {
                            return [2 /*return*/, this.redirectToSearchPage(searchPage, cachedHashValue)];
                        }
                        this.redirectToURL(redirectionURL);
                        return [2 /*return*/];
                }
            });
        });
    };
    StandaloneSearchInterface.prototype.redirectToURL = function (url) {
        this.usageAnalytics.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.triggerRedirect, {
            redirectedTo: url,
            query: this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q)
        }, this.element);
        this._window.location.assign(url);
    };
    StandaloneSearchInterface.prototype.redirectToSearchPage = function (searchPage, hashValueToUse) {
        var _this = this;
        var link = document.createElement('a');
        link.href = searchPage;
        link.href = link.href; // IE11 needs this to correctly fill the properties that are used below.
        var pathname = link.pathname.indexOf('/') == 0 ? link.pathname : '/' + link.pathname; // IE11 does not add a leading slash to this property.
        var hash = link.hash ? link.hash + '&' : '#';
        var hashValue = hashValueToUse || this.encodedHashValues;
        // By using a setTimeout, we allow other possible code related to the search box / magic box time to complete.
        // eg: onblur of the magic box.
        setTimeout(function () {
            _this._window.location.href = link.protocol + "//" + link.host + pathname + link.search + hash + hashValue;
        }, 0);
    };
    Object.defineProperty(StandaloneSearchInterface.prototype, "encodedHashValues", {
        get: function () {
            var values = __assign({}, this.modelAttributesToIncludeInUrl, this.uaCausedByAttribute, this.uaMetadataAttribute);
            return HashUtils_1.HashUtils.encodeValues(values);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StandaloneSearchInterface.prototype, "modelAttributesToIncludeInUrl", {
        get: function () {
            var usingLocalStorageHistory = this.historyManager instanceof LocalStorageHistoryController_1.LocalStorageHistoryController;
            return usingLocalStorageHistory ? {} : this.queryStateModel.getAttributes();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StandaloneSearchInterface.prototype, "uaCausedByAttribute", {
        get: function () {
            var uaCausedBy = this.uaCausedBy;
            return uaCausedBy ? { firstQueryCause: uaCausedBy } : {};
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StandaloneSearchInterface.prototype, "uaCausedBy", {
        get: function () {
            var uaCausedBy = this.usageAnalytics.getCurrentEventCause();
            var isSearchboxSubmit = uaCausedBy === AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit.name;
            // For legacy reasons, searchbox submit were always logged as a search from link in an external search box.
            return isSearchboxSubmit ? AnalyticsActionListMeta_1.analyticsActionCauseList.searchFromLink.name : uaCausedBy;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StandaloneSearchInterface.prototype, "uaMetadataAttribute", {
        get: function () {
            var uaMeta = this.usageAnalytics.getCurrentEventMeta();
            return uaMeta && !underscore_1.isEmpty(uaMeta) ? { firstQueryMeta: uaMeta } : {};
        },
        enumerable: true,
        configurable: true
    });
    StandaloneSearchInterface.prototype.searchboxIsEmpty = function () {
        return Utils_1.Utils.isEmptyString(this.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q));
    };
    StandaloneSearchInterface.ID = 'StandaloneSearchInterface';
    StandaloneSearchInterface.options = {
        redirectIfEmpty: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true })
    };
    return StandaloneSearchInterface;
}(SearchInterface));
exports.StandaloneSearchInterface = StandaloneSearchInterface;


/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
// We need a custom trigger function for our Promise polyfill
// because the default one can cause issues in other frameworks that relies on
// their own Promise polyfill like the Salesforce Aura framework.
var promise = window['Promise'];
if (!(promise instanceof Function)) {
    __webpack_require__(301);
}
var CoveoUnderscore_1 = __webpack_require__(211);
exports._ = CoveoUnderscore_1.underscoreInstance;
__export(__webpack_require__(303));
__export(__webpack_require__(67));
__export(__webpack_require__(330));
__export(__webpack_require__(102));
__export(__webpack_require__(155));
__export(__webpack_require__(205));
__export(__webpack_require__(333));
__export(__webpack_require__(458));
__export(__webpack_require__(74));


/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var Utils_1 = __webpack_require__(4);
var _ = __webpack_require__(0);
var QueryUtils = /** @class */ (function () {
    function QueryUtils() {
    }
    QueryUtils.createGuid = function () {
        var guid;
        var success = false;
        if (typeof crypto != 'undefined' && typeof crypto.getRandomValues != 'undefined') {
            try {
                guid = QueryUtils.generateWithCrypto();
                success = true;
            }
            catch (e) {
                success = false;
            }
        }
        if (!success) {
            guid = QueryUtils.generateWithRandom();
        }
        return guid;
    };
    // This method is a fallback as it's generate a lot of collisions in Chrome.
    QueryUtils.generateWithRandom = function () {
        // http://stackoverflow.com/a/2117523
        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
            var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
            return v.toString(16);
        });
    };
    QueryUtils.generateWithCrypto = function () {
        var buf = new Uint16Array(8);
        crypto.getRandomValues(buf);
        var S4 = function (num) {
            var ret = num.toString(16);
            while (ret.length < 4) {
                ret = '0' + ret;
            }
            return ret;
        };
        var prefix = function (str, version) {
            return version + str.slice(1);
        };
        return (S4(buf[0]) +
            S4(buf[1]) +
            '-' +
            S4(buf[2]) +
            '-' +
            prefix(S4(buf[3]), 4) +
            '-' +
            S4(buf[4]) +
            '-' +
            S4(buf[5]) +
            S4(buf[6]) +
            S4(buf[7]));
    };
    QueryUtils.setStateObjectOnQueryResults = function (state, results) {
        QueryUtils.setPropertyOnResults(results, 'state', state);
    };
    QueryUtils.setStateObjectOnQueryResult = function (state, result) {
        QueryUtils.setPropertyOnResult(result, 'state', state);
    };
    QueryUtils.setSearchInterfaceObjectOnQueryResult = function (searchInterface, result) {
        QueryUtils.setPropertyOnResult(result, 'searchInterface', searchInterface);
    };
    QueryUtils.setIndexAndUidOnQueryResults = function (query, results, queryUid, pipeline, splitTestRun) {
        Assert_1.Assert.exists(query);
        Assert_1.Assert.exists(results);
        var index = query.firstResult;
        QueryUtils.setPropertyOnResults(results, 'queryUid', queryUid);
        QueryUtils.setPropertyOnResults(results, 'pipeline', pipeline);
        QueryUtils.setPropertyOnResults(results, 'splitTestRun', splitTestRun);
        QueryUtils.setPropertyOnResults(results, 'index', index, function () { return ++index; });
    };
    QueryUtils.setTermsToHighlightOnQueryResults = function (query, results) {
        QueryUtils.setPropertyOnResults(results, 'termsToHighlight', results.termsToHighlight);
        QueryUtils.setPropertyOnResults(results, 'phrasesToHighlight', results.phrasesToHighlight);
    };
    QueryUtils.splitFlags = function (flags, delimiter) {
        if (delimiter === void 0) { delimiter = ';'; }
        Assert_1.Assert.exists(flags);
        return flags.split(delimiter);
    };
    QueryUtils.isAttachment = function (result) {
        return _.contains(QueryUtils.splitFlags(result.flags), 'IsAttachment');
    };
    QueryUtils.containsAttachment = function (result) {
        return _.contains(QueryUtils.splitFlags(result.flags), 'ContainsAttachment');
    };
    QueryUtils.hasHTMLVersion = function (result) {
        return _.contains(QueryUtils.splitFlags(result.flags), 'HasHtmlVersion');
    };
    QueryUtils.hasThumbnail = function (result) {
        return _.contains(QueryUtils.splitFlags(result.flags), 'HasThumbnail');
    };
    QueryUtils.hasExcerpt = function (result) {
        return result.excerpt != undefined && result.excerpt != '';
    };
    QueryUtils.getAuthor = function (result) {
        return result.raw['author'];
    };
    QueryUtils.getUriHash = function (result) {
        return result.raw['urihash'];
    };
    QueryUtils.getObjectType = function (result) {
        return result.raw['objecttype'];
    };
    QueryUtils.getCollection = function (result) {
        return result.raw['collection'] || 'default';
    };
    QueryUtils.getSource = function (result) {
        return result.raw['source'];
    };
    QueryUtils.getLanguage = function (result) {
        return result.raw['language'];
    };
    QueryUtils.getPermanentId = function (result) {
        var fieldValue;
        var fieldUsed;
        var permanentId = Utils_1.Utils.getFieldValue(result, 'permanentid');
        if (permanentId) {
            fieldUsed = 'permanentid';
            fieldValue = permanentId;
        }
        else {
            fieldUsed = 'urihash';
            fieldValue = Utils_1.Utils.getFieldValue(result, 'urihash');
        }
        return {
            fieldValue: fieldValue,
            fieldUsed: fieldUsed
        };
    };
    QueryUtils.quoteAndEscapeIfNeeded = function (str, forceEscape) {
        if (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isString(str);
        return !forceEscape &&
            (QueryUtils.isAtomicString(str) || QueryUtils.isRangeString(str) || QueryUtils.isRangeWithoutOuterBoundsString(str))
            ? str
            : QueryUtils.quoteAndEscape(str);
    };
    QueryUtils.quoteAndEscape = function (str) {
        Assert_1.Assert.isString(str);
        return "\"" + QueryUtils.escapeString(str) + "\"";
    };
    QueryUtils.escapeString = function (str) {
        Assert_1.Assert.isString(str);
        return str.replace(/"/g, ' ');
    };
    QueryUtils.isAtomicString = function (str) {
        Assert_1.Assert.isString(str);
        return /^\d+(\.\d+)?$|^[\d\w]+$/.test(str);
    };
    QueryUtils.isRangeString = function (str) {
        Assert_1.Assert.isString(str);
        return /^\d+(\.\d+)?\.\.\d+(\.\d+)?$|^\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}\.\.\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}$/.test(str);
    };
    QueryUtils.isRangeWithoutOuterBoundsString = function (str) {
        Assert_1.Assert.isString(str);
        return /^\d+(\.\d+)?$|^\d{4}\/\d{2}\/\d{2}@\d{2}:\d{2}:\d{2}$/.test(str);
    };
    QueryUtils.buildFieldExpression = function (field, operator, values, forceEscape) {
        if (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isNonEmptyString(field);
        Assert_1.Assert.stringStartsWith(field, '@');
        Assert_1.Assert.isNonEmptyString(operator);
        Assert_1.Assert.isLargerOrEqualsThan(1, values.length);
        if (values.length == 1) {
            return field + operator + QueryUtils.quoteAndEscapeIfNeeded(values[0], forceEscape);
        }
        else {
            return field + operator + '(' + _.map(values, function (str) { return QueryUtils.quoteAndEscapeIfNeeded(str, forceEscape); }).join(',') + ')';
        }
    };
    QueryUtils.buildFieldNotEqualExpression = function (field, values, forceEscape) {
        if (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isNonEmptyString(field);
        Assert_1.Assert.stringStartsWith(field, '@');
        Assert_1.Assert.isLargerOrEqualsThan(1, values.length);
        var filter;
        if (values.length == 1) {
            filter = field + '==' + QueryUtils.quoteAndEscapeIfNeeded(values[0], forceEscape);
        }
        else {
            filter = field + '==' + '(' + _.map(values, function (str) { return QueryUtils.quoteAndEscapeIfNeeded(str, forceEscape); }).join(',') + ')';
        }
        return '(NOT ' + filter + ')';
    };
    QueryUtils.setPropertyOnResults = function (results, property, value, afterOneLoop) {
        _.each(results.results, function (result) {
            QueryUtils.setPropertyOnResult(result, property, value);
            value = afterOneLoop ? afterOneLoop() : value;
        });
    };
    QueryUtils.setPropertyOnResult = function (result, property, value) {
        result[property] = value;
        _.each(result.childResults, function (child) {
            child[property] = value;
        });
        if (!Utils_1.Utils.isNullOrUndefined(result.parentResult)) {
            result.parentResult[property] = value;
        }
    };
    QueryUtils.isStratusAgnosticField = function (fieldToVerify, fieldToMatch) {
        var checkForSystem = /^(@?)(sys)?(.*)/i;
        var matchFieldToVerify = checkForSystem.exec(fieldToVerify);
        var matchFieldToMatch = checkForSystem.exec(fieldToMatch);
        if (matchFieldToVerify && matchFieldToMatch) {
            return (matchFieldToVerify[1] + matchFieldToVerify[3]).toLowerCase() == (matchFieldToMatch[1] + matchFieldToMatch[3]).toLowerCase();
        }
        return false;
    };
    return QueryUtils;
}());
exports.QueryUtils = QueryUtils;


/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(9);
var Latinize_1 = __webpack_require__(388);
var _ = __webpack_require__(0);
var StringUtils = /** @class */ (function () {
    function StringUtils() {
    }
    StringUtils.javascriptEncode = function (value) {
        Assert_1.Assert.isString(value);
        value = value.replace(/\\/g, '\\\\');
        value = value.replace(/'/g, "\\'");
        value = value.replace(/"/g, '\\"');
        return value;
    };
    StringUtils.htmlEncode = function (value) {
        Assert_1.Assert.isString(value);
        var div = Dom_1.$$('div');
        div.text(value);
        return div.el.innerHTML;
    };
    StringUtils.splice = function (value, index, remove, toAdd) {
        return value.slice(0, index) + toAdd + value.slice(index + Math.abs(remove));
    };
    StringUtils.removeMiddle = function (value, length, toAdd) {
        if (value.length < length) {
            return value;
        }
        var toRemove = value.length - length;
        var index = Math.floor(length / 2);
        return StringUtils.splice(value, index, toRemove, toAdd);
    };
    StringUtils.regexEncode = function (value) {
        Assert_1.Assert.isString(value);
        return value.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
    };
    StringUtils.stringToRegex = function (value, ignoreAccent) {
        if (ignoreAccent === void 0) { ignoreAccent = false; }
        Assert_1.Assert.isString(value);
        var encoded = StringUtils.regexEncode(value);
        if (ignoreAccent) {
            return _.map(encoded, function (char) {
                var regexp = _.find(StringUtils.accented, function (regexp) { return char.match(regexp) != null; });
                if (regexp) {
                    return regexp.source;
                }
                return char;
            }).join('');
        }
        return encoded;
    };
    StringUtils.wildcardsToRegex = function (value, ignoreAccent) {
        if (ignoreAccent === void 0) { ignoreAccent = false; }
        Assert_1.Assert.isString(value);
        var encoded = StringUtils.stringToRegex(value, ignoreAccent);
        encoded = encoded.replace(/\\\*/, '.*');
        encoded = encoded.replace(/\\\?/, '.');
        return encoded;
    };
    StringUtils.getHighlights = function (strToSearch, regexToFind, dataHighlightGroupTerm) {
        var match, indexes = [];
        while ((match = regexToFind.exec(strToSearch))) {
            var desiredMatch = match[2];
            var undesiredMatch = match[1];
            var offset = match.index + undesiredMatch.length;
            indexes.push({ offset: offset, length: desiredMatch.length, dataHighlightGroupTerm: dataHighlightGroupTerm });
            if (!regexToFind.global) {
                break;
            }
        }
        return _.isEmpty(indexes) ? undefined : indexes;
    };
    StringUtils.encodeCarriageReturn = function (strToEncode) {
        Assert_1.Assert.isString(strToEncode);
        return strToEncode.replace(/\n/g, '<br/>');
    };
    StringUtils.equalsCaseInsensitive = function (str1, str2) {
        return str1.toLowerCase() == str2.toLowerCase();
    };
    StringUtils.match = function (value, regex) {
        var results = [];
        var arr;
        while ((arr = regex.exec(value)) !== null) {
            results.push(arr);
        }
        return results;
    };
    StringUtils.hashCode = function (str) {
        var hash = 0;
        var len = str.length;
        for (var i = 0; i < len; i++) {
            var char = str.charCodeAt(i);
            hash = (hash << 5) - hash + char;
            hash = hash & hash; // Convert to 32bit integer
        }
        return hash.toString(16);
    };
    // http://stackoverflow.com/a/25575009
    StringUtils.latinize = function (str) {
        return Latinize_1.latinize(str);
    };
    StringUtils.capitalizeFirstLetter = function (str) {
        return str.charAt(0).toUpperCase() + str.slice(1);
    };
    StringUtils.buildStringTemplateFromResult = function (template, result) {
        var _this = this;
        if (!template) {
            return '';
        }
        return template.replace(/\$\{(.*?)\}/g, function (value) {
            var key = value.substring(2, value.length - 1);
            var newValue = StringUtils.readFromObject(result, key);
            if (!newValue) {
                newValue = StringUtils.readFromObject(window, key);
            }
            if (!newValue) {
                new Logger_1.Logger(_this).warn(key + " used in the ResultLink template is undefined for this result: " + result.title);
            }
            return newValue || value;
        });
    };
    StringUtils.readFromObject = function (object, key) {
        var firstPeriodIndex = key.indexOf('.');
        if (object && firstPeriodIndex !== -1) {
            var newKey = key.substring(firstPeriodIndex + 1);
            key = key.substring(0, firstPeriodIndex);
            return this.readFromObject(object[key], newKey);
        }
        return object ? object[key] : undefined;
    };
    StringUtils.accented = {
        A: /[Aa\xaa\xc0-\xc5\xe0-\xe5\u0100-\u0105\u01cd\u01ce\u0200-\u0203\u0226\u0227\u1d2c\u1d43\u1e00\u1e01\u1e9a\u1ea0-\u1ea3\u2090\u2100\u2101\u213b\u249c\u24b6\u24d0\u3371-\u3374\u3380-\u3384\u3388\u3389\u33a9-\u33af\u33c2\u33ca\u33df\u33ff\uff21\uff41]/g,
        B: /[Bb\u1d2e\u1d47\u1e02-\u1e07\u212c\u249d\u24b7\u24d1\u3374\u3385-\u3387\u33c3\u33c8\u33d4\u33dd\uff22\uff42]/g,
        C: /[Cc\xc7\xe7\u0106-\u010d\u1d9c\u2100\u2102\u2103\u2105\u2106\u212d\u216d\u217d\u249e\u24b8\u24d2\u3376\u3388\u3389\u339d\u33a0\u33a4\u33c4-\u33c7\uff23\uff43]/g,
        D: /[Dd\u010e\u010f\u01c4-\u01c6\u01f1-\u01f3\u1d30\u1d48\u1e0a-\u1e13\u2145\u2146\u216e\u217e\u249f\u24b9\u24d3\u32cf\u3372\u3377-\u3379\u3397\u33ad-\u33af\u33c5\u33c8\uff24\uff44]/g,
        E: /[Ee\xc8-\xcb\xe8-\xeb\u0112-\u011b\u0204-\u0207\u0228\u0229\u1d31\u1d49\u1e18-\u1e1b\u1eb8-\u1ebd\u2091\u2121\u212f\u2130\u2147\u24a0\u24ba\u24d4\u3250\u32cd\u32ce\uff25\uff45]/g,
        F: /[Ff\u1da0\u1e1e\u1e1f\u2109\u2131\u213b\u24a1\u24bb\u24d5\u338a-\u338c\u3399\ufb00-\ufb04\uff26\uff46]/g,
        G: /[Gg\u011c-\u0123\u01e6\u01e7\u01f4\u01f5\u1d33\u1d4d\u1e20\u1e21\u210a\u24a2\u24bc\u24d6\u32cc\u32cd\u3387\u338d-\u338f\u3393\u33ac\u33c6\u33c9\u33d2\u33ff\uff27\uff47]/g,
        H: /[Hh\u0124\u0125\u021e\u021f\u02b0\u1d34\u1e22-\u1e2b\u1e96\u210b-\u210e\u24a3\u24bd\u24d7\u32cc\u3371\u3390-\u3394\u33ca\u33cb\u33d7\uff28\uff48]/g,
        I: /[Ii\xcc-\xcf\xec-\xef\u0128-\u0130\u0132\u0133\u01cf\u01d0\u0208-\u020b\u1d35\u1d62\u1e2c\u1e2d\u1ec8-\u1ecb\u2071\u2110\u2111\u2139\u2148\u2160-\u2163\u2165-\u2168\u216a\u216b\u2170-\u2173\u2175-\u2178\u217a\u217b\u24a4\u24be\u24d8\u337a\u33cc\u33d5\ufb01\ufb03\uff29\uff49]/g,
        J: /[Jj\u0132-\u0135\u01c7-\u01cc\u01f0\u02b2\u1d36\u2149\u24a5\u24bf\u24d9\u2c7c\uff2a\uff4a]/g,
        K: /[Kk\u0136\u0137\u01e8\u01e9\u1d37\u1d4f\u1e30-\u1e35\u212a\u24a6\u24c0\u24da\u3384\u3385\u3389\u338f\u3391\u3398\u339e\u33a2\u33a6\u33aa\u33b8\u33be\u33c0\u33c6\u33cd-\u33cf\uff2b\uff4b]/g,
        L: /[Ll\u0139-\u0140\u01c7-\u01c9\u02e1\u1d38\u1e36\u1e37\u1e3a-\u1e3d\u2112\u2113\u2121\u216c\u217c\u24a7\u24c1\u24db\u32cf\u3388\u3389\u33d0-\u33d3\u33d5\u33d6\u33ff\ufb02\ufb04\uff2c\uff4c]/g,
        M: /[Mm\u1d39\u1d50\u1e3e-\u1e43\u2120\u2122\u2133\u216f\u217f\u24a8\u24c2\u24dc\u3377-\u3379\u3383\u3386\u338e\u3392\u3396\u3399-\u33a8\u33ab\u33b3\u33b7\u33b9\u33bd\u33bf\u33c1\u33c2\u33ce\u33d0\u33d4-\u33d6\u33d8\u33d9\u33de\u33df\uff2d\uff4d]/g,
        N: /[Nn\xd1\xf1\u0143-\u0149\u01ca-\u01cc\u01f8\u01f9\u1d3a\u1e44-\u1e4b\u207f\u2115\u2116\u24a9\u24c3\u24dd\u3381\u338b\u339a\u33b1\u33b5\u33bb\u33cc\u33d1\uff2e\uff4e]/g,
        O: /[Oo\xba\xd2-\xd6\xf2-\xf6\u014c-\u0151\u01a0\u01a1\u01d1\u01d2\u01ea\u01eb\u020c-\u020f\u022e\u022f\u1d3c\u1d52\u1ecc-\u1ecf\u2092\u2105\u2116\u2134\u24aa\u24c4\u24de\u3375\u33c7\u33d2\u33d6\uff2f\uff4f]/g,
        P: /[Pp\u1d3e\u1d56\u1e54-\u1e57\u2119\u24ab\u24c5\u24df\u3250\u3371\u3376\u3380\u338a\u33a9-\u33ac\u33b0\u33b4\u33ba\u33cb\u33d7-\u33da\uff30\uff50]/g,
        Q: /[Qq\u211a\u24ac\u24c6\u24e0\u33c3\uff31\uff51]/g,
        R: /[Rr\u0154-\u0159\u0210-\u0213\u02b3\u1d3f\u1d63\u1e58-\u1e5b\u1e5e\u1e5f\u20a8\u211b-\u211d\u24ad\u24c7\u24e1\u32cd\u3374\u33ad-\u33af\u33da\u33db\uff32\uff52]/g,
        S: /[Ss\u015a-\u0161\u017f\u0218\u0219\u02e2\u1e60-\u1e63\u20a8\u2101\u2120\u24ae\u24c8\u24e2\u33a7\u33a8\u33ae-\u33b3\u33db\u33dc\ufb06\uff33\uff53]/g,
        T: /[Tt\u0162-\u0165\u021a\u021b\u1d40\u1d57\u1e6a-\u1e71\u1e97\u2121\u2122\u24af\u24c9\u24e3\u3250\u32cf\u3394\u33cf\ufb05\ufb06\uff34\uff54]/g,
        U: /[Uu\xd9-\xdc\xf9-\xfc\u0168-\u0173\u01af\u01b0\u01d3\u01d4\u0214-\u0217\u1d41\u1d58\u1d64\u1e72-\u1e77\u1ee4-\u1ee7\u2106\u24b0\u24ca\u24e4\u3373\u337a\uff35\uff55]/g,
        V: /[Vv\u1d5b\u1d65\u1e7c-\u1e7f\u2163-\u2167\u2173-\u2177\u24b1\u24cb\u24e5\u2c7d\u32ce\u3375\u33b4-\u33b9\u33dc\u33de\uff36\uff56]/g,
        W: /[Ww\u0174\u0175\u02b7\u1d42\u1e80-\u1e89\u1e98\u24b2\u24cc\u24e6\u33ba-\u33bf\u33dd\uff37\uff57]/g,
        X: /[Xx\u02e3\u1e8a-\u1e8d\u2093\u213b\u2168-\u216b\u2178-\u217b\u24b3\u24cd\u24e7\u33d3\uff38\uff58]/g,
        Y: /[Yy\xdd\xfd\xff\u0176-\u0178\u0232\u0233\u02b8\u1e8e\u1e8f\u1e99\u1ef2-\u1ef9\u24b4\u24ce\u24e8\u33c9\uff39\uff59]/g,
        Z: /[Zz\u0179-\u017e\u01f1-\u01f3\u1dbb\u1e90-\u1e95\u2124\u2128\u24b5\u24cf\u24e9\u3390-\u3394\uff3a\uff5a]/g
    };
    return StringUtils;
}());
exports.StringUtils = StringUtils;


/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Globalize"] = __webpack_require__(329);
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(76)))

/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
// Not sure about this : In year 2033 who's to say that this list won't be 50 pages long !
var ResponsiveComponents_1 = __webpack_require__(55);
var mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
var DeviceUtils = /** @class */ (function () {
    function DeviceUtils() {
    }
    DeviceUtils.getDeviceName = function (userAgent) {
        if (userAgent === void 0) { userAgent = navigator.userAgent; }
        if (userAgent.match(/Edge/i)) {
            return 'Edge';
        }
        if (userAgent.match(/Opera Mini/i)) {
            return 'Opera Mini';
        }
        if (userAgent.match(/Android/i)) {
            return 'Android';
        }
        if (userAgent.match(/BlackBerry/i)) {
            return 'BlackBerry';
        }
        if (userAgent.match(/iPhone/i)) {
            return 'iPhone';
        }
        if (userAgent.match(/iPad/i) || this.isSafariIPadOS(userAgent)) {
            return 'iPad';
        }
        if (userAgent.match(/iPod/i)) {
            return 'iPod';
        }
        if (userAgent.match(/Chrome/i)) {
            return 'Chrome';
        }
        if (userAgent.match(/MSIE/i) || userAgent.match(/Trident/i)) {
            return 'IE';
        }
        if (userAgent.match(/Opera/i)) {
            return 'Opera';
        }
        if (userAgent.match(/Firefox/i)) {
            return 'Firefox';
        }
        if (userAgent.match(/Safari/i)) {
            return 'Safari';
        }
        return 'Others';
    };
    DeviceUtils.isAndroid = function () {
        return DeviceUtils.getDeviceName() == 'Android';
    };
    DeviceUtils.isIos = function () {
        var deviceName = DeviceUtils.getDeviceName();
        return deviceName == 'iPhone' || deviceName == 'iPad' || deviceName == 'iPod';
    };
    DeviceUtils.isMobileDevice = function () {
        if (this.isSafariIPadOS()) {
            return true;
        }
        return mobile;
    };
    // Workaround for Safari on iPadOS https://developer.apple.com/forums/thread/119186
    DeviceUtils.isSafariIPadOS = function (userAgent) {
        if (userAgent === void 0) { userAgent = navigator.userAgent; }
        return userAgent.match(/Macintosh/i) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2;
    };
    /**
     * @deprecated
     *
     * Use ResponsiveComponents.isSmallScreenWidth() instead
     */
    DeviceUtils.isSmallScreenWidth = function () {
        return new ResponsiveComponents_1.ResponsiveComponents().isSmallScreenWidth();
    };
    return DeviceUtils;
}());
exports.DeviceUtils = DeviceUtils;


/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(4);
var _ = __webpack_require__(0);
var KEYBOARD;
(function (KEYBOARD) {
    KEYBOARD[KEYBOARD["BACKSPACE"] = 8] = "BACKSPACE";
    KEYBOARD[KEYBOARD["TAB"] = 9] = "TAB";
    KEYBOARD[KEYBOARD["ENTER"] = 13] = "ENTER";
    KEYBOARD[KEYBOARD["SHIFT"] = 16] = "SHIFT";
    KEYBOARD[KEYBOARD["CTRL"] = 17] = "CTRL";
    KEYBOARD[KEYBOARD["ALT"] = 18] = "ALT";
    KEYBOARD[KEYBOARD["ESCAPE"] = 27] = "ESCAPE";
    KEYBOARD[KEYBOARD["SPACEBAR"] = 32] = "SPACEBAR";
    KEYBOARD[KEYBOARD["PAGE_UP"] = 33] = "PAGE_UP";
    KEYBOARD[KEYBOARD["PAGE_DOWN"] = 34] = "PAGE_DOWN";
    KEYBOARD[KEYBOARD["END"] = 35] = "END";
    KEYBOARD[KEYBOARD["HOME"] = 36] = "HOME";
    KEYBOARD[KEYBOARD["LEFT_ARROW"] = 37] = "LEFT_ARROW";
    KEYBOARD[KEYBOARD["UP_ARROW"] = 38] = "UP_ARROW";
    KEYBOARD[KEYBOARD["RIGHT_ARROW"] = 39] = "RIGHT_ARROW";
    KEYBOARD[KEYBOARD["DOWN_ARROW"] = 40] = "DOWN_ARROW";
    KEYBOARD[KEYBOARD["INSERT"] = 45] = "INSERT";
    KEYBOARD[KEYBOARD["DELETE"] = 46] = "DELETE";
})(KEYBOARD = exports.KEYBOARD || (exports.KEYBOARD = {}));
var KeyboardUtils = /** @class */ (function () {
    function KeyboardUtils() {
    }
    KeyboardUtils.keysEqual = function (key, code) {
        if (!Utils_1.Utils.isNullOrUndefined(key.keyCode)) {
            return key.keyCode == code;
        }
        else if (!Utils_1.Utils.isNullOrUndefined(key.which)) {
            return key.which == code;
        }
        return false;
    };
    KeyboardUtils.isAllowedKeyForOmnibox = function (e) {
        var keycode = e.keyCode;
        var valid = KeyboardUtils.isNumberKeyPushed(keycode) ||
            keycode == 32 ||
            keycode == 13 || // spacebar & return key(s)
            KeyboardUtils.isLetterKeyPushed(keycode) ||
            (keycode > 95 && keycode < 112) || // numpad keys
            (keycode > 185 && keycode < 193) || // ;=,-./` (in order)
            (keycode > 218 && keycode < 223) || // [\]' (in order)
            keycode == KEYBOARD.BACKSPACE ||
            keycode == KEYBOARD.DELETE ||
            KeyboardUtils.isArrowKeyPushed(keycode);
        return valid;
    };
    KeyboardUtils.isAllowedKeyForSearchAsYouType = function (e) {
        return KeyboardUtils.isAllowedKeyForOmnibox(e) && !KeyboardUtils.isArrowKeyPushed(e.keyCode);
    };
    KeyboardUtils.isDeleteOrBackspace = function (e) {
        return KeyboardUtils.keysEqual(e, KEYBOARD.BACKSPACE) || KeyboardUtils.keysEqual(e, KEYBOARD.DELETE);
    };
    KeyboardUtils.isArrowKeyPushed = function (keycode) {
        return (keycode == KEYBOARD.LEFT_ARROW || keycode == KEYBOARD.UP_ARROW || keycode == KEYBOARD.RIGHT_ARROW || keycode == KEYBOARD.DOWN_ARROW);
    };
    KeyboardUtils.isNumberKeyPushed = function (keycode) {
        return keycode > 47 && keycode < 58;
    };
    KeyboardUtils.isLetterKeyPushed = function (keycode) {
        return keycode > 64 && keycode < 91;
    };
    // Return a keyboard event listener that only executes the function if certain keys are pressed.
    KeyboardUtils.keypressAction = function (keyCode, action) {
        return function (e) {
            var data = [];
            for (var _i = 1; _i < arguments.length; _i++) {
                data[_i - 1] = arguments[_i];
            }
            if (e) {
                var eventCode = e.charCode || e.keyCode;
                if (eventCode) {
                    if (_.isArray(keyCode) && _.contains(keyCode, eventCode)) {
                        action(e);
                    }
                    else if (eventCode === keyCode) {
                        action(e);
                    }
                }
            }
        };
    };
    return KeyboardUtils;
}());
exports.KeyboardUtils = KeyboardUtils;


/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ModalBox = __webpack_require__(327);
exports.LocaleString = __webpack_require__(328);


/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(9);
var Dom_1 = __webpack_require__(1);
var TemplateConditionEvaluator_1 = __webpack_require__(158);
var TemplateFieldsEvaluator_1 = __webpack_require__(137);
var ResponsiveComponents_1 = __webpack_require__(55);
var _ = __webpack_require__(0);
var Initialization_1 = __webpack_require__(2);
var Utils_1 = __webpack_require__(4);
var DefaultInstantiateTemplateOptions = /** @class */ (function () {
    function DefaultInstantiateTemplateOptions() {
        this.currentLayout = null;
        this.checkCondition = true;
        this.wrapInDiv = true;
        this.responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents();
    }
    DefaultInstantiateTemplateOptions.prototype.get = function () {
        return {
            currentLayout: this.currentLayout,
            checkCondition: this.checkCondition,
            wrapInDiv: this.wrapInDiv,
            responsiveComponents: this.responsiveComponents
        };
    };
    DefaultInstantiateTemplateOptions.prototype.merge = function (other) {
        if (other) {
            return _.extend(this.get(), other);
        }
        return this.get();
    };
    return DefaultInstantiateTemplateOptions;
}());
exports.DefaultInstantiateTemplateOptions = DefaultInstantiateTemplateOptions;
var Template = /** @class */ (function () {
    function Template(dataToString) {
        this.dataToString = dataToString;
        this.logger = new Logger_1.Logger(this);
        this.fields = [];
    }
    Template.prototype.instantiateToString = function (object, instantiateOptions) {
        if (instantiateOptions === void 0) { instantiateOptions = new DefaultInstantiateTemplateOptions(); }
        if (this.dataToString) {
            if (instantiateOptions.checkCondition === false) {
                return this.dataToString(object);
            }
            // Should not happen but...
            // Normally, top level call from sub-class will have already created a
            // DefaultInstantiateTemplateOptions and merged down
            if (instantiateOptions.responsiveComponents == null) {
                instantiateOptions.responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents();
            }
            // Mobile/tablet/desktop checks are only for "hard" set value (triple equal)
            // If it's undefined, we skip those checks, and we assume the template works correctly for any given screen size
            if (this.mobile === true && !instantiateOptions.responsiveComponents.isSmallScreenWidth()) {
                this.logger.trace('Template was skipped because it is optimized for small screen width', this);
                return null;
            }
            else if (this.mobile === false && instantiateOptions.responsiveComponents.isSmallScreenWidth()) {
                this.logger.trace('Template was skipped because it is not optimized for small screen width', this);
                return null;
            }
            if (this.tablet === true && !instantiateOptions.responsiveComponents.isMediumScreenWidth()) {
                this.logger.trace('Template was skipped because it is optimized for medium screen width', this);
                return null;
            }
            else if (this.tablet === false && instantiateOptions.responsiveComponents.isMediumScreenWidth()) {
                this.logger.trace('Template was skipped because it is not optimized for medium screen width', this);
                return null;
            }
            if (this.desktop === true && !instantiateOptions.responsiveComponents.isLargeScreenWidth()) {
                this.logger.trace('Template was skipped because it is optimized for large screen width', this);
                return null;
            }
            else if (this.desktop === false && instantiateOptions.responsiveComponents.isLargeScreenWidth()) {
                this.logger.trace('Template was skipped because it is not optimized for large screen width', this);
                return null;
            }
            if (this.layout != null && instantiateOptions.currentLayout != null && instantiateOptions.currentLayout !== this.layout) {
                this.logger.trace('Template was skipped because layout does not match', this, this.layout);
                return null;
            }
            try {
                this.logger.trace('Evaluating template ...');
                // Condition (as a function) is eval'ed, first
                if (this.condition != null && this.condition(object)) {
                    this.logger.trace('Template was loaded because condition was :', this.condition, object);
                    return this.dataToString(object);
                }
                // Condition (as a string) is parsed, if available.
                if (this.conditionToParse != null &&
                    TemplateConditionEvaluator_1.TemplateConditionEvaluator.evaluateCondition(this.conditionToParse, object, instantiateOptions.responsiveComponents)) {
                    this.logger.trace('Template was loaded because condition was :', this.conditionToParse, object);
                    return this.dataToString(object);
                }
                // fieldsToMatch is yet another fallback that allows to specify if a template should be loaded.
                if (this.fieldsToMatch != null && TemplateFieldsEvaluator_1.TemplateFieldsEvaluator.evaluateFieldsToMatch(this.fieldsToMatch, object)) {
                    this.logger.trace('Template was loaded because condition was :', this.fieldsToMatch, object);
                    return this.dataToString(object);
                }
                // If there is no condition at all, this means "true"
                if (this.condition == null && this.conditionToParse == null && this.fieldsToMatch == null) {
                    this.logger.trace('Template was loaded because there was *NO* condition', this.condition, object);
                    return this.dataToString(object);
                }
            }
            catch (e) {
                new Logger_1.Logger(this).error('Cannot instantiate template', e.message, this.getTemplateInfo());
                new Logger_1.Logger(this).warn('A default template was used');
                return null;
            }
        }
        this.logger.trace('Template was skipped because it did not match any condition', this);
        return null;
    };
    Template.prototype.addField = function (field) {
        if (!_.contains(this.fields, field)) {
            this.fields.push(field);
        }
    };
    Template.prototype.addFields = function (fields) {
        if (Utils_1.Utils.isNonEmptyArray(fields)) {
            this.fields = Utils_1.Utils.concatWithoutDuplicate(this.fields, fields);
        }
    };
    Template.prototype.getComponentsInside = function (tmplString) {
        var allComponentsInsideCurrentTemplate = _.map(Initialization_1.Initialization.getListOfRegisteredComponents(), function (componentId) {
            var regex = new RegExp("Coveo" + componentId, 'g');
            return regex.exec(tmplString) ? componentId : null;
        });
        return _.compact(allComponentsInsideCurrentTemplate);
    };
    Template.prototype.instantiateToElement = function (result, templateOptions) {
        var _this = this;
        if (templateOptions === void 0) { templateOptions = {}; }
        var mergedOptions = new DefaultInstantiateTemplateOptions().merge(templateOptions);
        var html = this.instantiateToString(result, mergedOptions);
        if (html == null) {
            return null;
        }
        return this.ensureComponentsInHtmlStringHaveLoaded(html).then(function () {
            var template = _this.buildTemplate(html, mergedOptions);
            _this.logger.trace('Instantiated result template', result, template);
            return template;
        });
    };
    Template.prototype.toHtmlElement = function () {
        return null;
    };
    Template.prototype.getFields = function () {
        return this.fields;
    };
    Template.prototype.getType = function () {
        return 'Template';
    };
    Template.prototype.setConditionWithFallback = function (condition) {
        // In some circumstances (eg: locker service in SF), with strict Content-Security-Policy, eval / new Function are not allowed by the browser.
        // Try to use the eval method, if possible. Otherwise fallback to a mechanism where we will try to parse/evaluate the condition as a simple string.
        try {
            this.condition = new Function('obj', 'with(obj||{}){return ' + condition + '}');
        }
        catch (e) {
            this.conditionToParse = condition;
        }
    };
    Template.prototype.getTemplateInfo = function () {
        // Try to get info on the template by returning the first parameter found that is not undefined.
        return this.conditionToParse != undefined ? this.conditionToParse : this.condition != undefined ? this.condition : this.fieldsToMatch;
    };
    Template.prototype.ensureComponentsInHtmlStringHaveLoaded = function (html) {
        var components = this.getComponentsInside(html).map(function (component) { return Initialization_1.LazyInitialization.getLazyRegisteredComponent(component); });
        return Promise.all(components);
    };
    Template.prototype.buildTemplate = function (html, templateOptions) {
        var layout = this.layout || templateOptions.currentLayout;
        var elemType = layout === 'table' ? 'tr' : 'div';
        var element = Dom_1.$$(elemType, {}, html).el;
        if (!templateOptions.wrapInDiv && element.children.length === 1) {
            element = element.children.item(0);
        }
        if (layout) {
            Dom_1.$$(element).addClass("coveo-" + layout + "-layout");
        }
        element['template'] = this;
        return element;
    };
    return Template;
}());
exports.Template = Template;


/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Model_1 = __webpack_require__(18);
var _ = __webpack_require__(0);
exports.COMPONENT_OPTIONS_ATTRIBUTES = {
    RESULT_LINK: 'resultLink',
    SEARCH_HUB: 'searchHub',
    SEARCH_BOX: 'searchBox'
};
var ComponentOptionsModel = /** @class */ (function (_super) {
    __extends(ComponentOptionsModel, _super);
    function ComponentOptionsModel(element, attributes) {
        var _this = this;
        var merged = _.extend({}, ComponentOptionsModel.defaultAttributes, attributes);
        _this = _super.call(this, element, ComponentOptionsModel.ID, merged) || this;
        return _this;
    }
    ComponentOptionsModel.ID = 'ComponentOptions';
    ComponentOptionsModel.defaultAttributes = {
        resultLink: undefined,
        searchHub: undefined,
        searchBox: undefined
    };
    ComponentOptionsModel.attributesEnum = {
        resultLink: 'resultLink',
        searchHub: 'searchHub',
        searchBox: 'searchBox'
    };
    return ComponentOptionsModel;
}(Model_1.Model));
exports.ComponentOptionsModel = ComponentOptionsModel;


/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `ResultListEvents` static class contains the string definitions of all events that strongly relate to the result
 * list.
 *
 * See [Events](https://docs.coveo.com/en/417/).
 */
var ResultListEvents = /** @class */ (function () {
    function ResultListEvents() {
    }
    /**
     * Triggered when the result list has just finished rendering the current page of results.
     *
     * @type {string} The string value is `newResultsDisplayed`.
     */
    ResultListEvents.newResultsDisplayed = 'newResultsDisplayed';
    /**
     * Triggered each time the result list has just finished rendering a single result.
     *
     * All `newResultDisplayed` event handlers receive a
     * [`DisplayedNewResultEventArgs`]{@link IDisplayedNewResultEventArgs} object as an argument.
     *
     * @type {string} The string value is `newResultDisplayed`.
     */
    ResultListEvents.newResultDisplayed = 'newResultDisplayed';
    /**
     * Triggered by the [`ResultLink`]{@link ResultLink} result template component when its
     * [`openQuickview`]{@link ResultLink.options.openQuickview} option is set to `true` and the end user clicks the
     * result link. The [`Quickview`]{@link Quickview} component listens to this event to be able to open the quickview
     * modal window in reaction.
     *
     * See also the [`openQuickview`]{@link QuickviewEvents.openQuickview} event (which is identical to this one, except
     * that it is triggered by the [`QuickviewDocument`] result template component instead).
     *
     * All `openQuickview` event handlers receive an [`OpenQuickviewEventArgs`]{@link IOpenQuickviewEventArgs} object as
     * an argument
     *
     * @type {string} The string value is `openQuickview`.
     */
    ResultListEvents.openQuickview = 'openQuickview';
    /**
     * Triggered by the [`ResultLayout`]{@link ResultLayout} component whenever the current result layout changes (see
     * [Result Layouts](https://docs.coveo.com/en/360/)).
     *
     * All `changeLayout` event handlers receive a [`ChangeLayoutEventArgs`]{@link IChangeLayoutEventArgs} object as an
     * argument.
     *
     * @type {string} The string value is `changeLayout`.
     */
    ResultListEvents.changeLayout = 'changeLayout';
    return ResultListEvents;
}());
exports.ResultListEvents = ResultListEvents;


/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var Assert_1 = __webpack_require__(5);
var QueryController_1 = __webpack_require__(44);
var QueryStateModel_1 = __webpack_require__(13);
var InitializationEvents_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(1);
var Component_1 = __webpack_require__(7);
var SearchInterface_1 = __webpack_require__(19);
var _ = __webpack_require__(0);
var PublicPathUtils_1 = __webpack_require__(129);
var Logger_1 = __webpack_require__(9);
var Analytics_1 = __webpack_require__(130);
var AnalyticsUtils_1 = __webpack_require__(212);
var registeredNamedMethodsLogger = new Logger_1.Logger('RegisteredNamedMethods');
/**
 * Initialize the framework with a basic search interface. Calls {@link Initialization.initSearchInterface}.
 *
 * If using the jQuery extension, this is called using <code>$('#root').coveo('init');</code>.
 * @param element The root of the interface to initialize.
 * @param options JSON options for the framework (e.g.: <code>{Searchbox : {enableSearchAsYouType : true}}</code>).
 * @returns {Promise<{elem: HTMLElement}>}
 */
function init(element, options) {
    if (options === void 0) { options = {}; }
    return Initialization_1.Initialization.initializeFramework(element, options, function () {
        return Initialization_1.Initialization.initSearchInterface(element, options);
    });
}
exports.init = init;
Initialization_1.Initialization.registerNamedMethod('init', function (element, options) {
    if (options === void 0) { options = {}; }
    return init(element, options);
});
/**
 * Initialize the framework with a standalone search box. Calls {@link Initialize.initStandaloneSearchInterface}.
 *
 * If using the jQuery extension, this is called using <code>$('#root').coveo('initSearchbox');</code>.
 * @param element The root of the interface to initialize.
 * @param searchPageUri The search page on which to redirect when there is a query.
 * @param options JSON options for the framework (e.g.: <code>{Searchbox : {enableSearchAsYouType : true}}</code>).
 * @returns {Promise<{elem: HTMLElement}>}
 */
function initSearchbox(element, searchPageUri, options) {
    if (options === void 0) { options = {}; }
    Assert_1.Assert.isNonEmptyString(searchPageUri);
    var searchInterfaceOptions = {};
    searchInterfaceOptions.searchPageUri = searchPageUri;
    searchInterfaceOptions.autoTriggerQuery = false;
    searchInterfaceOptions.enableHistory = false;
    searchInterfaceOptions = __assign({}, searchInterfaceOptions, options.StandaloneSearchInterface);
    options = _.extend({}, options, { StandaloneSearchInterface: searchInterfaceOptions });
    return Initialization_1.Initialization.initializeFramework(element, options, function () {
        return Initialization_1.Initialization.initStandaloneSearchInterface(element, options);
    });
}
exports.initSearchbox = initSearchbox;
Initialization_1.Initialization.registerNamedMethod('initSearchbox', function (element, searchPageUri, options) {
    if (options === void 0) { options = {}; }
    initSearchbox(element, searchPageUri, options);
});
/**
 * Initialize the framework with a recommendation interface. Calls {@link Initialization.initRecommendationInterface}.
 *
 * If using the jQuery extension, this is called using <code>$('#root').coveo('initRecommendation');</code>.
 * @param element The root of the interface to initialize.
 * @param mainSearchInterface The search interface to link with the recommendation interface (see {@link Recommendation}).
 * @param userContext The user context to pass with the query generated in the recommendation interface (see {@link Recommendation}).
 * @param options JSON options for the framework (e.g.: <code>{Searchbox : {enableSearchAsYouType: true}}</code>).
 * @returns {Promise<{elem: HTMLElement}>}
 */
function initRecommendation(element, mainSearchInterface, userContext, options) {
    if (options === void 0) { options = {}; }
    var recommendationOptions = {};
    recommendationOptions.mainSearchInterface = mainSearchInterface;
    recommendationOptions.userContext = userContext;
    recommendationOptions.enableHistory = false;
    options = _.extend({}, options, { Recommendation: recommendationOptions });
    // Recommendation component is special : It is not explicitely registered like other "basic" components since it's a full search interface.
    // Since it's not done using the "standard" path, we need to register this manually here
    // This ensure that we can always call `getLazyRegisteredComponent`, no matter if it was loaded from eager or lazy mode.
    if (window['Coveo']['Recommendation'] != null) {
        Initialization_1.LazyInitialization.registerLazyComponent('Recommendation', function () { return Promise.resolve(window['Coveo']['Recommendation']); });
        Initialization_1.EagerInitialization.eagerlyLoadedComponents['Recommendation'] = window['Coveo']['Recommendation'];
    }
    return Initialization_1.LazyInitialization.getLazyRegisteredComponent('Recommendation').then(function () {
        return Initialization_1.Initialization.initializeFramework(element, options, function () {
            return Initialization_1.Initialization.initRecommendationInterface(element, options);
        });
    });
}
exports.initRecommendation = initRecommendation;
Initialization_1.Initialization.registerNamedMethod('initRecommendation', function (element, mainSearchInterface, userContext, options) {
    if (userContext === void 0) { userContext = {}; }
    if (options === void 0) { options = {}; }
    initRecommendation(element, mainSearchInterface, userContext, options);
});
/**
 * Execute a standard query. Active component in the interface will react to events/ push data in the query / handle the query success or failure as needed.
 *
 * It triggers a standard query flow for which the standard component will perform their expected behavior.
 *
 * If you wish to only perform a query on the index to retrieve results (without the component reacting), look into {@link SearchInterface} instead.
 *
 * Calling this method is the same as calling {@link QueryController.executeQuery}.
 *
 * @param element The root of the interface to initialize.
 * @returns {Promise<IQueryResults>}
 */
function executeQuery(element) {
    Assert_1.Assert.exists(element);
    var queryController = Component_1.Component.resolveBinding(element, QueryController_1.QueryController);
    Assert_1.Assert.exists(queryController);
    return queryController.executeQuery();
}
exports.executeQuery = executeQuery;
Initialization_1.Initialization.registerNamedMethod('executeQuery', function (element) {
    return executeQuery(element);
});
/**
 * Performs read and write operations on the [`QueryStateModel`]{@link QueryStateModel} instance of the search
 * interface. See [State](https://docs.coveo.com/en/344/).
 *
 * Can perform the following actions:
 *
 * - Get the `QueryStateModel` instance:
 * ```javascript
 * Coveo.state(element);
 * ```
 *
 * - Get the value of a single state attribute from the `QueryStateModel` instance:
 * ```javascript
 * // You can replace `q` with any registered state attribute.
 * Coveo.state(element, "q");
 * ```
 *
 * - Set the value of a single state attribute in the `QueryStateModel` instance:
 * ```javascript
 * // You can replace `q` with any registered state attribute.
 * Coveo.state(element, "q", "my new value");
 * ```
 *
 * - Set multiple state attribute values in the `QueryStateModel` instance:
 * ```javascript
 * // You can replace `q` and `sort` with any registered state attributes.
 * Coveo.state(element, {
 *     "q" : "my new value",
 *     "sort" : "relevancy"
 * });
 * ```
 *
 * **Note:**
 * > When setting one or several state attribute values with this function, you can pass an additional argument to set
 * > the `silent` attribute to `true` in order to prevent the state change from triggering state change events.
 * >
 * > **Example:**
 * > ```javascript
 * > Coveo.state(element, "q", "my new value", { "silent" : true });
 * > ```
 *
 * @param element The root of the interface whose `QueryStateModel` instance the function should interact with.
 * @param args The arguments that determine the action to perform on the `QueryStateModel` instance.
 * @returns {any} Depends on the action performed.
 */
function state(element) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    Assert_1.Assert.exists(element);
    var model = Component_1.Component.resolveBinding(element, QueryStateModel_1.QueryStateModel);
    return QueryStateModel_1.setState(model, args);
}
exports.state = state;
Initialization_1.Initialization.registerNamedMethod('state', function (element) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    if (args.length != 0) {
        return state.apply(undefined, [element].concat(args));
    }
    else {
        return state.apply(undefined, [element]);
    }
});
/**
 * Get the component bound on the given `HTMLElement`.
 * @param element The `HTMLElement` for which to get the component instance.
 * @param componentClass If multiple components are bound to a single `HTMLElement`, you need to specify which components you wish to get.
 * @param noThrow By default, the GET method will throw if there is no component bound, or if there are multiple component and no `componentClass` is specified. This deletes the error if set to true.
 * @returns {Component}
 */
function get(element, componentClass, noThrow) {
    Assert_1.Assert.exists(element);
    return Component_1.Component.get(element, componentClass, noThrow);
}
exports.get = get;
Initialization_1.Initialization.registerNamedMethod('get', function (element, componentClass, noThrow) {
    return get(element, componentClass, noThrow);
});
function result(element, noThrow) {
    Assert_1.Assert.exists(element);
    return Component_1.Component.getResult(element, noThrow);
}
exports.result = result;
Initialization_1.Initialization.registerNamedMethod('result', function (element, noThrow) {
    return result(element, noThrow);
});
function getCoveoAnalyticsClient(element) {
    var analytics = getCoveoAnalytics(element);
    if (analytics) {
        return analytics.client;
    }
    else {
        return undefined;
    }
}
function getCoveoAnalytics(element) {
    var analyticsElement = element.classList.contains(Component_1.Component.computeCssClassNameForType('Analytics'))
        ? element
        : Dom_1.$$(element).find(Component_1.Component.computeSelectorForType("Analytics"));
    if (analyticsElement) {
        return Component_1.Component.resolveBinding(analyticsElement, Analytics_1.Analytics);
    }
    else {
        return undefined;
    }
}
/**
 * Finds the [`Analytics`]{@link Analytics} component instance, and uses it to log a `Custom` usage analytics event.
 *
 * You can use `Custom` events to create custom reports, or to track events which are neither queries nor item
 * views.
 *
 * @param element The root of the search interface which contains the [`Analytics`]{@link Analytics} component.
 * @param customEventCause The cause of the event.
 * @param metadata The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
 * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
 * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
 * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
 * ( `{}` ).
 * @param result The query result that relates to the custom event, if applicable.
 */
function logCustomEvent(element, customEventCause, metadata, result) {
    var client = getCoveoAnalyticsClient(element);
    if (client) {
        client.logCustomEvent(customEventCause, metadata, element, result);
    }
}
exports.logCustomEvent = logCustomEvent;
Initialization_1.Initialization.registerNamedMethod('logCustomEvent', function (element, customEventCause, metadata, result) {
    logCustomEvent(element, customEventCause, metadata, result);
});
/**
 * Finds the [`Analytics`]{@link Analytics} component instance, and uses it to log a `Search` usage analytics event.
 *
 * A `Search` event is actually sent to the Coveo Usage Analytics service only after the query successfully returns (not
 * immediately after calling this method). Therefore, it is important to call this method **before** executing the
 * query. Otherwise, the `Search` event will not be logged, and you will get a warning message in the console. See
 * [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events).
 *
 * @param element The root of the search interface which contains the [`Analytics`]{@link Analytics} component.
 * @param searchEventCause The cause of the event.
 * @param metadata The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
 * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
 * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
 * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
 * ( `{}` ).
 */
function logSearchEvent(element, searchEventCause, metadata) {
    var client = getCoveoAnalyticsClient(element);
    if (client) {
        client.logSearchEvent(searchEventCause, metadata);
    }
}
exports.logSearchEvent = logSearchEvent;
Initialization_1.Initialization.registerNamedMethod('logSearchEvent', function (element, searchEventCause, metadata) {
    logSearchEvent(element, searchEventCause, metadata);
});
/**
 * Finds the [`Analytics`]{@link Analytics} component instance, and uses it to log a `SearchAsYouType` usage analytics
 * event.
 *
 * This function is very similar to the `logSearchEvent` function, except that `logSearchAsYouTypeEvent` should, by
 * definition, be called more frequently. Consequently, in order to avoid logging every single partial query, the
 * `PendingSearchAsYouTypeEvent` takes care of logging only the "relevant" last event: an event that occurs after 5
 * seconds have elapsed without any event being logged, or an event that occurs after another part of the interface
 * triggers a search event.
 *
 * It is important to call this method **before** executing the query. Otherwise, no `SearchAsYouType` event will be
 * logged, and you will get a warning message in the console. See
 * [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events).
 *
 * @param element The root of the search interface which contains the [`Analytics`]{@link Analytics} component.
 * @param searchAsYouTypeEventCause The cause of the event.
 * @param metadata The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
 * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
 * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
 * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
 * ( `{}` ).
 */
function logSearchAsYouTypeEvent(element, searchAsYouTypeEventCause, metadata) {
    var client = getCoveoAnalyticsClient(element);
    if (client) {
        client.logSearchAsYouType(searchAsYouTypeEventCause, metadata);
    }
}
exports.logSearchAsYouTypeEvent = logSearchAsYouTypeEvent;
Initialization_1.Initialization.registerNamedMethod('logSearchAsYouTypeEvent', function (element, searchAsYouTypeEventCause, metadata) {
    logSearchAsYouTypeEvent(element, searchAsYouTypeEventCause, metadata);
});
/**
 * Finds the [`Analytics`]{@link Analytics} component instance, and uses it to log a `Click` usage analytics event.
 *
 * A `Click` event corresponds to an item view (e.g., clicking on a {@link ResultLink} or opening a {@link Quickview}).
 *
 * `Click` events are immediately sent to the Coveo Usage Analytics service.
 *
 * @param element The root of the search interface which contains the [`Analytics`]{@link Analytics} component.
 * @param clickEventCause The cause of the event.
 * @param metadata The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
 * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
 * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
 * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
 * ( `{}` ).
 * @param result The result that was clicked.
 */
function logClickEvent(element, clickEventCause, metadata, result) {
    var client = getCoveoAnalyticsClient(element);
    if (client) {
        client.logClickEvent(clickEventCause, metadata, result, element);
    }
}
exports.logClickEvent = logClickEvent;
Initialization_1.Initialization.registerNamedMethod('logClickEvent', function (element, clickEventCause, metadata, result) {
    logClickEvent(element, clickEventCause, metadata, result);
});
/**
 * Pass options to the framework, before it is initialized ({@link init}).<br/>
 * All the options passed with this calls will be merged together on initialization.
 * @param element The root of the interface for which you wish to set options.
 * @param optionsToSet JSON options for the framework (e.g.: <code>{Searchbox : {enableSearchAsYouType: true}}</code>).
 */
function options(element, optionsToSet) {
    if (optionsToSet === void 0) { optionsToSet = {}; }
    Initialization_1.Initialization.registerDefaultOptions(element, optionsToSet);
}
exports.options = options;
Initialization_1.Initialization.registerNamedMethod('options', function (element, optionsToSet) {
    if (optionsToSet === void 0) { optionsToSet = {}; }
    options(element, optionsToSet);
});
/**
 * Patch the given `methodName` on an instance of a component bound to an `HTMLElement` with a new handler.
 * @param element
 * @param methodName
 * @param handler
 */
function patch(element, methodName, handler) {
    Initialization_1.Initialization.monkeyPatchComponentMethod(methodName, element, handler);
}
exports.patch = patch;
Initialization_1.Initialization.registerNamedMethod('patch', function (element, methodName, handler) {
    patch(element, methodName, handler);
});
function initBox(element) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    var type, options = {}, injectMarkup;
    // This means : initBox, no type (no injection) and no options
    if (args.length == 0) {
        type = 'Standard';
        injectMarkup = false;
    }
    else if (args.length == 1) {
        // 1 arg, might be options or type
        // This mean a type (with injection) and no options
        if (typeof args[0] == 'string') {
            type = args[0];
            injectMarkup = true;
        }
        else if (typeof args[0] == 'object') {
            // This means no type(no injection) and with options
            type = 'Standard';
            injectMarkup = false;
            options = args[0];
        }
        else {
            Assert_1.Assert.fail('Invalid parameters to init a box');
        }
    }
    else if (args.length == 2) {
        // 2 args means both options and type (with injection);
        type = args[0];
        options = args[1];
        injectMarkup = true;
    }
    var merged = {};
    merged[type || 'Container'] = _.extend({}, options.SearchInterface, options[type]);
    options = _.extend({}, options, merged);
    Initialization_1.Initialization.initializeFramework(element, options, function () {
        return Initialization_1.Initialization.initBoxInterface(element, options, type, injectMarkup);
    });
}
exports.initBox = initBox;
Initialization_1.Initialization.registerNamedMethod('initBox', function (element) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    initBox(element, args);
});
function nuke(element) {
    Dom_1.$$(element).trigger(InitializationEvents_1.InitializationEvents.nuke);
}
exports.nuke = nuke;
Initialization_1.Initialization.registerNamedMethod('nuke', function (element) {
    nuke(element);
});
/**
 * Sets the path from where the chunks used for lazy loading will be loaded. In some cases, in IE11, we cannot automatically detect it, use this instead.
 * @param path This should be the path of the Coveo script. It should also have a trailing slash.
 */
function configureResourceRoot(path) {
    PublicPathUtils_1.PublicPathUtils.configureResourceRoot(path);
}
exports.configureResourceRoot = configureResourceRoot;
Initialization_1.Initialization.registerNamedMethod('configureResourceRoot', function (path) {
    configureResourceRoot(path);
});
/**
 * Re-enables an [`Analytics`]{@link Analytics} component if it was previously disabled.
 * @param searchRoot
 * The element to scan for an Analytics component.
 * This can be an element onto which a component instance is bound
 * (e.g., document.querySelector(".CoveoAnalytics"),
 * or an ancestor of such an element (e.g., document.getElementById("search").
 *
 * @availablesince [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/)
 */
function enableAnalytics(searchRoot) {
    if (searchRoot === void 0) { searchRoot = document.querySelector(Component_1.Component.computeSelectorForType(SearchInterface_1.SearchInterface.ID)); }
    var analytics = getCoveoAnalytics(searchRoot);
    if (!analytics) {
        return registeredNamedMethodsLogger.warn('Could not enable analytics because no Analytics component could be found in the specified searchRoot.');
    }
    analytics.enable();
}
exports.enableAnalytics = enableAnalytics;
Initialization_1.Initialization.registerNamedMethod('enableAnalytics', function () {
    enableAnalytics();
});
/**
 * Removes all session information stored in the browser (e.g., analytics visitor cookies, action history, etc.)
 * @param searchRoot
 * The element to scan for an Analytics component.
 * This can be an element onto which a component instance is bound
 * (e.g., document.querySelector(".CoveoAnalytics"),
 * or an ancestor of such an element (e.g., document.getElementById("search").
 */
function clearLocalData(searchRoot) {
    if (searchRoot === void 0) { searchRoot = document.querySelector(Component_1.Component.computeSelectorForType(SearchInterface_1.SearchInterface.ID)); }
    var analytics = getCoveoAnalytics(searchRoot);
    if (!analytics) {
        return registeredNamedMethodsLogger.warn('Could not clear local data because no Analytics component could be found in the specified searchRoot.');
    }
    analytics.clearLocalData();
}
exports.clearLocalData = clearLocalData;
Initialization_1.Initialization.registerNamedMethod('clearLocalData', function () {
    clearLocalData();
});
/**
 * Disables an [`Analytics`]{@link Analytics} component and clears local data.
 * @param searchRoot
 * The element to scan for an Analytics component.
 * This can be an element onto which a component instance is bound
 * (e.g., document.querySelector(".CoveoAnalytics"),
 * or an ancestor of such an element (e.g., document.getElementById("search").
 *
 * @availablesince [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/)
 */
function disableAnalytics(searchRoot) {
    if (searchRoot === void 0) { searchRoot = document.querySelector(Component_1.Component.computeSelectorForType(SearchInterface_1.SearchInterface.ID)); }
    var analytics = getCoveoAnalytics(searchRoot);
    if (!analytics) {
        return registeredNamedMethodsLogger.warn('Could not disable analytics because no Analytics component could be found in the specified searchRoot.');
    }
    analytics.disable();
}
exports.disableAnalytics = disableAnalytics;
Initialization_1.Initialization.registerNamedMethod('disableAnalytics', function () {
    disableAnalytics();
});
/**
 * Adds a new analytics action cause to the ActionCauseList.
 * Adding a new actionCause allows to specify a custom user-action when triggering a search event.
 * @param newActionCause
 * (e.g.,
 * {
 *  Name: "newActionCause",
 *  Type: "exampleType"
 * },
 */
function addActionCauseToList(newActionCause) {
    AnalyticsUtils_1.AnalyticsUtils.addActionCauseToList(newActionCause);
}
exports.addActionCauseToList = addActionCauseToList;
Initialization_1.Initialization.registerNamedMethod('addActionCauseToList', function (newActionCause) {
    addActionCauseToList(newActionCause);
});
/**
 * Removes an actionCause from the ActionCauseList.
 * @param actionCauseToRemoveName
 */
function removeActionCauseFromList(actionCauseToRemoveName) {
    AnalyticsUtils_1.AnalyticsUtils.removeActionCauseFromList(actionCauseToRemoveName);
}
exports.removeActionCauseFromList = removeActionCauseFromList;
Initialization_1.Initialization.registerNamedMethod('removeActionCauseFromList', function (actionCauseToRemoveName) {
    removeActionCauseFromList(actionCauseToRemoveName);
});
/**
 * Asynchronously loads a module, or chunk.
 *
 * This is especially useful when you want to extend a base component, and make sure the lazy component loading process
 * recognizes it (see [Lazy Versus Eager Component Loading](https://docs.coveo.com/en/295/)).
 *
 * **Example:**
 *
 * ```typescript
 * export function lazyCustomFacet() {
 *   return Coveo.load<Facet>('Facet').then((Facet) => {
 *     class CustomFacet extends Facet {
 *       [ ... ]
 *     };
 *     Coveo.Initialization.registerAutoCreateComponent(CustomFacet);
 *     return CustomFacet;
 *   });
 * };
 *
 * Coveo.LazyInitialization.registerLazyComponent('CustomFacet', lazyCustomFacet);
 * ```
 *
 * You can also use this function to assert a component is fully loaded in your page before executing any code relating
 * to it.
 *
 * **Example:**
 *
 * > You could do `Coveo.load('Searchbox').then((Searchbox) => {})` to load the [`Searchbox`]{@link Searchbox}
 * > component, if it is not already loaded in your search page.
 *
 * @param id The identifier of the module you wish to load. In the case of components, this identifier is the component
 * name (e.g., `Facet`, `Searchbox`).
 * @returns {Promise} A Promise of the module, or chunk.
 */
function load(id) {
    if (Initialization_1.LazyInitialization.lazyLoadedComponents[id] != null) {
        return Initialization_1.LazyInitialization.getLazyRegisteredComponent(id);
    }
    else if (Initialization_1.LazyInitialization.lazyLoadedModule[id] != null) {
        return Initialization_1.LazyInitialization.getLazyRegisteredModule(id);
    }
    else {
        return Promise.reject("Module " + id + " is not available");
    }
}
exports.load = load;
Initialization_1.Initialization.registerNamedMethod('require', function (modules) {
    return load(modules);
});


/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var Defer = /** @class */ (function () {
    function Defer() {
    }
    Defer.defer = function (code) {
        Defer.functions.push(code);
        Defer.arm();
    };
    Defer.flush = function () {
        while (Defer.popOne()) { }
    };
    Defer.arm = function () {
        _.defer(function () {
            if (Defer.popOne()) {
                Defer.arm();
            }
        });
    };
    Defer.popOne = function () {
        if (Defer.functions.length > 0) {
            var fun = Defer.functions[0];
            Defer.functions = _.rest(Defer.functions);
            fun();
            return Defer.functions.length > 0;
        }
        else {
            return false;
        }
    };
    Defer.functions = [];
    return Defer;
}());
exports.Defer = Defer;


/***/ }),
/* 32 */,
/* 33 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Options_1 = __webpack_require__(78);
var Utils_1 = __webpack_require__(4);
var Strings_1 = __webpack_require__(6);
var _ = __webpack_require__(0);
var moment = __webpack_require__(103);
var Logger_1 = __webpack_require__(9);
var DefaultDateToStringOptions = /** @class */ (function (_super) {
    __extends(DefaultDateToStringOptions, _super);
    function DefaultDateToStringOptions() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.now = moment().toDate();
        _this.useTodayYesterdayAndTomorrow = true;
        _this.useWeekdayIfThisWeek = true;
        _this.omitYearIfCurrentOne = true;
        _this.useLongDateFormat = false;
        _this.includeTimeIfToday = true;
        _this.includeTimeIfThisWeek = true;
        _this.alwaysIncludeTime = false;
        _this.predefinedFormat = undefined;
        return _this;
    }
    return DefaultDateToStringOptions;
}(Options_1.Options));
/**
 * The `DateUtils` class exposes methods to convert strings, numbers and date objects to standard ISO 8601 Date objects,
 * using the correct culture, language and format. It also offers methods to convert date objects to strings.
 */
var DateUtils = /** @class */ (function () {
    function DateUtils() {
    }
    // This function is used to call convertToStandardDate for legacy reasons. convertFromJsonDateIfNeeded was refactored to
    // convertToStandardDate, which would be a breaking change otherwise.
    DateUtils.convertFromJsonDateIfNeeded = function (date) {
        return DateUtils.convertToStandardDate(date);
    };
    /**
     * Tries to parse an argument of any type to a standard Date object.
     * @param date The value to parse. Can be of any type (string, number, Date, etc.).
     * @returns {any} The parsed Date object, or `Invalid Date` if the `date` argument was not recognized as a valid date.
     */
    DateUtils.convertToStandardDate = function (date) {
        if (_.isDate(date)) {
            return moment(date).toDate();
        }
        else if (date !== null && !isNaN(Number(date))) {
            return moment(Number(date)).toDate();
        }
        else if (_.isString(date)) {
            var dateMoment = moment(date, 'YYYY/MM/DD@HH:mm:ssZ');
            return dateMoment.toDate();
        }
    };
    DateUtils.setLocale = function () {
        DateUtils.saveOriginalMomentLocaleData();
        moment.updateLocale(DateUtils.momentjsCompatibleLocale, DateUtils.transformGlobalizeCalendarToMomentCalendar());
        moment.locale(DateUtils.momentjsCompatibleLocale);
    };
    DateUtils.saveOriginalMomentLocaleData = function () {
        var locale = DateUtils.momentjsCompatibleLocale;
        var alreadySaved = DateUtils.momentjsLocaleDataMap[locale] != null;
        if (alreadySaved) {
            return;
        }
        DateUtils.momentjsLocaleDataMap[locale] = moment.localeData();
    };
    /**
     * Creates a string from a Date object. The resulting string is in the date format required for queries.
     * @param date The Date object to create a string from.
     * @returns {string} A string corresponding to the `date` argument value, in the `YYYY/MM/DD` format.
     */
    DateUtils.dateForQuery = function (date) {
        DateUtils.setLocale();
        var dateMoment = moment(date).format('YYYY/MM/DD');
        return dateMoment;
    };
    /**
     * Creates a string from a Date object. The resulting string is in the datetime format required for queries.
     * @param date The Date object to create a string from.
     * @returns {string} A string corresponding to the `date` argument value, in the `YYYY/MM/DD@HH:mm:ss` format.
     */
    DateUtils.dateTimeForQuery = function (date) {
        DateUtils.setLocale();
        var dateMoment = moment(date).format('YYYY/MM/DD@HH:mm:ss');
        return dateMoment;
    };
    /**
     * Creates a cropped version of a Date object. The resulting object contains no time information.
     * @param date The original Date object to create a cropped Date object from.
     * @returns {Date} A cropped Date object corresponding to the `date` argument value, excluding its time information.
     */
    DateUtils.keepOnlyDatePart = function (date) {
        DateUtils.setLocale();
        var dateMoment = moment(date);
        return new Date(dateMoment.year(), dateMoment.month(), dateMoment.date());
    };
    /**
     * Creates an offset version of a Date object. The offset is counted in days.
     * @param date The original Date object to create an offset Date object from.
     * @param offset The number of days to add to (or subtract from) the `date` argument.
     * @returns {Date} An offset Date object corresponding to the `date` argument value plus the `offset` value.
     */
    DateUtils.offsetDateByDays = function (date, offset) {
        return moment(date).add(offset, 'days').toDate();
    };
    DateUtils.isTodayYesterdayOrTomorrow = function (d, options) {
        var dateOnly = moment(DateUtils.keepOnlyDatePart(d));
        var today = moment(DateUtils.keepOnlyDatePart(options.now));
        var daysDifference = dateOnly.diff(today, 'days');
        return daysDifference == 0 || daysDifference == 1 || daysDifference == -1;
    };
    DateUtils.getMomentJsFormat = function (format) {
        var correctedFormat = format;
        var fourLowercaseY = DateUtils.buildRegexMatchingExactCharSequence('y', 4);
        correctedFormat = correctedFormat.replace(fourLowercaseY, '$1YYYY');
        var twoLowercaseY = DateUtils.buildRegexMatchingExactCharSequence('y', 2);
        correctedFormat = correctedFormat.replace(twoLowercaseY, '$1YY');
        var twoLowercaseD = DateUtils.buildRegexMatchingExactCharSequence('d', 2);
        correctedFormat = correctedFormat.replace(twoLowercaseD, '$1DD');
        var oneLowercaseD = DateUtils.buildRegexMatchingExactCharSequence('d', 1);
        correctedFormat = correctedFormat.replace(oneLowercaseD, '$1D');
        var twoLowercaseH = DateUtils.buildRegexMatchingExactCharSequence('h', 2);
        correctedFormat = correctedFormat.replace(twoLowercaseH, '$1H');
        return correctedFormat;
    };
    DateUtils.buildRegexMatchingExactCharSequence = function (char, sequenceLength) {
        var negativeNonCapturingGroup = "(?:([^" + char + "]|^))"; // look-behind is not supported in Firefox
        var charSequence = char + "{" + sequenceLength + "}";
        var negativeLookAhead = "(?!" + char + ")";
        var exactSequence = "" + negativeNonCapturingGroup + charSequence + negativeLookAhead;
        return new RegExp(exactSequence, 'g');
    };
    /**
     * Creates a string from a Date object. The resulting string is formatted according to a set of options.
     * This method calls [ `keepOnlyDatePart` ]{@link DateUtils.keepOnlyDatePart} to remove time information from the date.
     * If you need to create a timestamp, use the [ `dateTimeToString` ]{@link DateUtils.dateTimeToString} method instead.
     * @param date The Date object to create a string from.
     * @param options The set of options to apply when formatting the resulting string. If you do not specify a value for
     * this parameter, the method uses a default set of options.
     * @returns {string} A date string corresponding to the `date` argument value, formatted according to the specified `options`.
     */
    DateUtils.dateToString = function (date, options) {
        DateUtils.setLocale();
        if (Utils_1.Utils.isNullOrUndefined(date)) {
            new Logger_1.Logger(this).warn("Impossible to format an undefined or null date.");
            return '';
        }
        options = new DefaultDateToStringOptions().merge(options);
        var dateOnly = moment(DateUtils.keepOnlyDatePart(date));
        var today = moment(DateUtils.keepOnlyDatePart(options.now));
        if (options.predefinedFormat) {
            return dateOnly.format(this.getMomentJsFormat(options.predefinedFormat));
        }
        if (options.useTodayYesterdayAndTomorrow) {
            if (DateUtils.isTodayYesterdayOrTomorrow(date, options)) {
                return moment(dateOnly).calendar(moment(today));
            }
        }
        var isThisWeek = dateOnly.diff(moment(today), 'weeks') == 0;
        if (options.useWeekdayIfThisWeek && isThisWeek) {
            if (dateOnly.valueOf() > today.valueOf()) {
                return Strings_1.l('NextDay', Strings_1.l(dateOnly.format('dddd')));
            }
            else if (dateOnly.valueOf() < today.valueOf()) {
                return Strings_1.l('LastDay', Strings_1.l(dateOnly.format('dddd')));
            }
            else {
                return dateOnly.format('dddd');
            }
        }
        if (options.omitYearIfCurrentOne && dateOnly.year() === today.year()) {
            return dateOnly.format('LL');
        }
        if (options.useLongDateFormat) {
            return dateOnly.format(this.longDateFormat);
        }
        return dateOnly.format('L');
    };
    Object.defineProperty(DateUtils, "longDateFormat", {
        get: function () {
            var momentLocaleData = DateUtils.momentjsLocaleDataMap[DateUtils.momentjsCompatibleLocale];
            return momentLocaleData
                .longDateFormat('LLLL')
                .replace(/[h:mA]/g, '')
                .trim();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Creates a string from a Date object. The string corresponds to the time information of the Date object.
     * @param date The Date object to create a string from.
     * @param options The set of options to apply when formatting the resulting string. If you do not specify a
     * value for this parameter, the method uses a default set of options.
     * @returns {string} A string containing the time information of the `date` argument, and formatted according to the specified `options`.
     */
    DateUtils.timeToString = function (date, options) {
        if (Utils_1.Utils.isNullOrUndefined(date)) {
            return '';
        }
        return moment(date).format('h:mm A');
    };
    /**
     * Creates a string from a Date object. The resulting string is formatted according to a set of options.
     * This method calls [ `timeToString` ]{@link DateUtils.timeToString} to add time information to the date.
     * If you need to create a date string without a timestamp, use the [ `dateToString` ]{@link DateUtils.dateToString} method instead.
     * @param date The date object to create a string from.
     * @param options The set of options to apply when formatting the resulting string. If you do not specify a value for
     * this parameter, the method uses a default set of options.
     * @returns {string} A date string corresponding to the `date` argument value, formatted according to the specified `options`.
     */
    DateUtils.dateTimeToString = function (date, options) {
        DateUtils.setLocale();
        options = new DefaultDateToStringOptions().merge(options);
        if (Utils_1.Utils.isNullOrUndefined(date)) {
            new Logger_1.Logger(this).warn("Impossible to format an undefined or null date.");
            return '';
        }
        if (!moment(date).isValid()) {
            new Logger_1.Logger(this).warn("Impossible to format an invalid date: " + date);
            return '';
        }
        if (options.predefinedFormat) {
            return moment(date).format(this.getMomentJsFormat(options.predefinedFormat));
        }
        var today = DateUtils.keepOnlyDatePart(options.now);
        var datePart = DateUtils.dateToString(date, options);
        var dateWithoutTime = DateUtils.keepOnlyDatePart(date);
        var isThisWeek = moment(date).diff(moment(today), 'weeks') == 0;
        var isToday = dateWithoutTime.valueOf() == today.valueOf();
        var shouldIncludeTime = function () {
            if (options.alwaysIncludeTime) {
                return true;
            }
            if (options.includeTimeIfThisWeek && isThisWeek) {
                return true;
            }
            if (options.includeTimeIfToday && isToday) {
                return true;
            }
            return false;
        };
        if (shouldIncludeTime()) {
            return datePart + ", " + DateUtils.timeToString(date);
        }
        return datePart;
    };
    /**
     * Creates a string from a number. The resulting string is the localized name of the month that corresponds
     * to this number (e.g., `0` results in the localized version of `January`).
     * @param month The number to create a string from. Minimum value is `0` (which corresponds to `January`). Maximum
     * value is `11` (which corresponds to `December`).
     * @returns {string} A string whose value is the localized name of the corresponding `month`.
     */
    DateUtils.monthToString = function (month) {
        DateUtils.setLocale();
        var date = moment(new Date(1980, month)).toDate();
        return moment(date).format('MMMM');
    };
    /**
     * Validates whether a value is an instance of Date.
     * @param date The value to verify.
     * @returns {boolean} `true` if the `date` argument is an instance of Date; `false` otherwise.
     */
    DateUtils.isValid = function (date) {
        DateUtils.setLocale();
        if (date instanceof Date) {
            return !isNaN(date.getTime());
        }
        return false;
    };
    /**
     * Creates a string from two Date objects. The resulting string corresponds to the amount of time between those two dates.
     * @param from The Date object which contains the "oldest" value.
     * @param to The Date object which contains the "newest" value.
     * @returns {any} A string whose value corresponds to the amount of time between `from` and `to`,
     * or an empty string if either argument was undefined.
     */
    DateUtils.timeBetween = function (from, to) {
        if (Utils_1.Utils.isNullOrUndefined(from) || Utils_1.Utils.isNullOrUndefined(to)) {
            return '';
        }
        return (('0' + ((moment(to).valueOf() - moment(from).valueOf()) / (1000 * 60 * 60)).toFixed()).slice(-2) +
            ':' +
            ('0' + (((moment(to).valueOf() - moment(from).valueOf()) % (1000 * 60 * 60)) / (1000 * 60)).toFixed()).slice(-2) +
            ':' +
            ('0' + (((moment(to).valueOf() - moment(from).valueOf()) % (1000 * 60)) / 1000).toFixed()).slice(-2));
    };
    Object.defineProperty(DateUtils, "currentGlobalizeCalendar", {
        get: function () {
            return Globalize.culture(DateUtils.currentLocale).calendar;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DateUtils, "currentLocale", {
        get: function () {
            return String['locale'];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DateUtils, "momentjsCompatibleLocale", {
        get: function () {
            var currentLocale = DateUtils.currentLocale;
            // Our cultures.js directory contains 'no' which is the equivalent to 'nn' for momentJS
            if (currentLocale.toLowerCase() == 'no') {
                currentLocale = 'nn';
            }
            else if (currentLocale.toLowerCase() == 'es-es') {
                // Our cultures.js directory contains 'es-es' which is the equivalent to 'es' for momentJS
                currentLocale = 'es';
            }
            return currentLocale;
        },
        enumerable: true,
        configurable: true
    });
    DateUtils.transformGlobalizeCalendarToMomentCalendar = function () {
        var cldrToMomentFormat = function (cldrFormat) {
            return cldrFormat.replace(/y/g, 'Y').replace(/d/g, 'D');
        };
        return {
            months: DateUtils.currentGlobalizeCalendar.months.names,
            monthsShort: DateUtils.currentGlobalizeCalendar.months.namesAbbr,
            weekdays: DateUtils.currentGlobalizeCalendar.days.names,
            weekdaysShort: DateUtils.currentGlobalizeCalendar.days.namesAbbr,
            weekdaysMin: DateUtils.currentGlobalizeCalendar.days.namesShort,
            longDateFormat: {
                LT: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.t),
                LTS: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.T),
                L: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.d),
                LL: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.M),
                LLL: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.f),
                LLLL: cldrToMomentFormat(DateUtils.currentGlobalizeCalendar.patterns.F)
            },
            calendar: {
                lastDay: "[" + Strings_1.l('Yesterday') + "]",
                sameDay: "[" + Strings_1.l('Today') + "]",
                nextDay: "[" + Strings_1.l('Tomorrow') + "]"
            }
        };
    };
    DateUtils.momentjsLocaleDataMap = {};
    return DateUtils;
}());
exports.DateUtils = DateUtils;


/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// The reference to magic-box with the triple slash is needed for dts-generator
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `OmniboxEvents` static class contains the string definitions of all events that strongly relate to the
 * [`Omnibox`]{@link Omnibox} component.
 */
var OmniboxEvents = /** @class */ (function () {
    function OmniboxEvents() {
    }
    OmniboxEvents.populateOmnibox = 'populateOmnibox';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component before query completion suggestions are rendered.
     *
     * The out-of-the-box Coveo JavaScript Search Framework query completion suggestion addons (see the
     * [`enableFieldAddon`]{@link Omnibox.options.enableFieldAddon},
     * [`enableQueryExtensionAddon`]{@link Omnibox.options.enableQueryExtensionAddon}, and
     * [`enableQuerySuggestAddon`]{@link Omnibox.options.enableQuerySuggestAddon} options of the `Omnibox`) push their
     * respective suggestions in the argument object which is passed along with this event.
     *
     * All `populateOmniboxSuggestions` event handlers receive a
     * [`PopulateOmniboxSuggestionsEventArgs`]{@link IPopulateOmniboxSuggestionsEventArgs} object as an argument.
     *
     * @type {string} The string value is `populateOmniboxSuggestions`.
     */
    OmniboxEvents.populateOmniboxSuggestions = 'populateOmniboxSuggestions';
    OmniboxEvents.omniboxPreprocessResultForQuery = 'omniboxPreprocessResultForQuery';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component before sending a query suggestion request to the Search API.
     *
     * Allows external functions to refine the payload b3efore sending the request.
     *
     * This event is only triggered by standard ML-powered query suggestions, and not {@link AnalyticsSuggestions} or {@link FieldSuggestions}.
     */
    OmniboxEvents.buildingQuerySuggest = 'buildingQuerySuggest';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when query suggestions are received from the Search API.
     *
     * Allows external functions to look into the received query suggestions, and modify them if needed.
     *
     * This event is only triggered by standard ML-powered query suggestions, and not {@link AnalyticsSuggestions} or {@link FieldSuggestions}.
     */
    OmniboxEvents.querySuggestSuccess = 'querySuggestSuccess';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when a query suggestion has finished rendering.
     */
    OmniboxEvents.querySuggestRendered = 'querySuggestRendered';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when a query suggestion gets focus following a mouse hovering or keyboard navigation event.
     *
     * All `querySuggestGetFocus` event handlers receive an object implementing the [`IQuerySuggestSelection`]{@link IQuerySuggestSelection} interface as an argument.
     */
    OmniboxEvents.querySuggestGetFocus = 'querySuggestGetFocus';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when a query suggestion loses focus following a mouse hovering or keyboard navigation event.
     */
    OmniboxEvents.querySuggestLoseFocus = 'querySuggestLooseFocus';
    /**
     * Triggered by the [`Omnibox`]{@link Omnibox} component when a query suggestion is selected by a mouse click or pressing the enter key.
     *
     * All `querySuggestSelection` event handlers receive an object implementing the [`IQuerySuggestSelection`]{@link IQuerySuggestSelection} interface as an argument.
     */
    OmniboxEvents.querySuggestSelection = 'querySuggestSelection';
    return OmniboxEvents;
}());
exports.OmniboxEvents = OmniboxEvents;


/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * This static class is there to contains the different string definition for all the events related to {@link Breadcrumb}.
 */
var BreadcrumbEvents = /** @class */ (function () {
    function BreadcrumbEvents() {
    }
    /**
     * Triggered when the breadcrumb needs to update its content. External code can use this event to provide bits of HTML that should be included in the breadcrumb.
     *
     * All handlers bound to this event will receive a {@link IPopulateBreadcrumbEventArgs} as an argument.
     */
    BreadcrumbEvents.populateBreadcrumb = 'populateBreadcrumb';
    /**
     * Triggered when the user clicks the Clear All button in the breadcrumb. When this event is raised, every filter that is included in the breadcrumb should be removed.
     *
     * This event does not provide custom event data.
     */
    BreadcrumbEvents.clearBreadcrumb = 'clearBreadcrumb';
    BreadcrumbEvents.redrawBreadcrumb = 'redrawBreadcrumb';
    return BreadcrumbEvents;
}());
exports.BreadcrumbEvents = BreadcrumbEvents;


/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(9);
/**
 * Every component in the framework ultimately inherits from this base component class.
 */
var BaseComponent = /** @class */ (function () {
    function BaseComponent(element, type) {
        this.element = element;
        this.type = type;
        /**
         * A disabled component will not participate in the query, or listen to {@link ComponentEvents}.
         * @type {boolean}
         */
        this.disabled = false;
        Assert_1.Assert.exists(element);
        Assert_1.Assert.isNonEmptyString(type);
        this.logger = new Logger_1.Logger(this);
        BaseComponent.bindComponentToElement(element, this);
    }
    /**
     * Return the debug info about this component.
     * @returns {any}
     */
    BaseComponent.prototype.debugInfo = function () {
        var info = {};
        info[this['constructor']['ID']] = this;
        return info;
    };
    /**
     * Disable the component.
     * Normally this means that the component will not execute handlers for the framework events (query events, for example).
     * Components are enabled by default on creation.
     */
    BaseComponent.prototype.disable = function () {
        this.disabled = true;
    };
    /**
     * Enable the component.
     * Normally this means that the component will execute handlers for the framework events (query events, for example).
     * Components are enabled by default on creation.
     */
    BaseComponent.prototype.enable = function () {
        this.disabled = false;
    };
    BaseComponent.bindComponentToElement = function (element, component) {
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(component);
        Assert_1.Assert.isNonEmptyString(component.type);
        element[BaseComponent.computeCssClassNameForType(component.type)] = component;
        Dom_1.$$(element).addClass(BaseComponent.computeCssClassNameForType(component.type));
        BaseComponent.getBoundComponentsForElement(element).push(component);
    };
    BaseComponent.computeCssClassName = function (componentClass) {
        return BaseComponent.computeCssClassNameForType(componentClass['ID']);
    };
    BaseComponent.computeCssClassNameForType = function (type) {
        Assert_1.Assert.isNonEmptyString(type);
        return 'Coveo' + type;
    };
    BaseComponent.computeSelectorForType = function (type) {
        Assert_1.Assert.isNonEmptyString(type);
        return '.' + BaseComponent.computeCssClassNameForType(type);
    };
    BaseComponent.getBoundComponentsForElement = function (element) {
        Assert_1.Assert.exists(element);
        if (element.CoveoBoundComponents == null) {
            element.CoveoBoundComponents = [];
        }
        return element.CoveoBoundComponents;
    };
    BaseComponent.getComponentRef = function (component) {
        return Coveo[component];
    };
    return BaseComponent;
}());
exports.BaseComponent = BaseComponent;


/***/ }),
/* 37 */
/***/ (function(module, exports) {

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}

module.exports = _interopRequireDefault;

/***/ }),
/* 38 */
/***/ (function(module, exports) {

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
  ? window : typeof self != 'undefined' && self.Math == Math ? self
  // eslint-disable-next-line no-new-func
  : Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef


/***/ }),
/* 39 */
/***/ (function(module, exports) {

var core = module.exports = { version: '2.6.11' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef


/***/ }),
/* 40 */,
/* 41 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var localStorage;
// This check must be made in a try/catch. If cookies are disabled for a
// browser then window.localStorage will throw an undefined exception.
try {
    localStorage = window.localStorage;
}
catch (error) {
    console.warn('Unable to access localStorage. Certain features like analytics will not work. If this is unintended, consider adjusting your browser settings to allow third-party cookies and data.\n\n', error);
    localStorage = null;
}
exports.localStorageExists = !!localStorage;
var LocalStorageUtils = /** @class */ (function () {
    function LocalStorageUtils(id) {
        this.id = id;
    }
    LocalStorageUtils.prototype.save = function (data) {
        try {
            if (localStorage != null) {
                localStorage.setItem(this.getLocalStorageKey(), JSON.stringify(data));
            }
        }
        catch (error) { }
    };
    LocalStorageUtils.prototype.load = function () {
        try {
            if (localStorage == null) {
                return null;
            }
            var value = localStorage.getItem(this.getLocalStorageKey());
            return value && JSON.parse(value);
        }
        catch (error) {
            return null;
        }
    };
    LocalStorageUtils.prototype.remove = function (key) {
        try {
            if (localStorage != null) {
                if (key == undefined) {
                    localStorage.removeItem(this.getLocalStorageKey());
                }
                else {
                    var oldObj = this.load();
                    delete oldObj[key];
                    this.save(oldObj);
                }
            }
        }
        catch (error) { }
    };
    LocalStorageUtils.prototype.getLocalStorageKey = function () {
        return 'coveo-' + this.id;
    };
    return LocalStorageUtils;
}());
exports.LocalStorageUtils = LocalStorageUtils;
var SafeLocalStorage = /** @class */ (function () {
    function SafeLocalStorage() {
    }
    SafeLocalStorage.prototype.getItem = function (key) {
        try {
            return localStorage.getItem(key);
        }
        catch (e) {
            return null;
        }
    };
    SafeLocalStorage.prototype.removeItem = function (key) {
        try {
            localStorage.removeItem(key);
        }
        catch (e) { }
    };
    SafeLocalStorage.prototype.setItem = function (key, value) {
        try {
            localStorage.setItem(key, value);
        }
        catch (e) { }
    };
    SafeLocalStorage.prototype.clear = function () {
        try {
            localStorage.clear();
        }
        catch (e) { }
    };
    SafeLocalStorage.prototype.key = function (index) {
        try {
            return localStorage.key(index);
        }
        catch (e) {
            return null;
        }
    };
    Object.defineProperty(SafeLocalStorage.prototype, "length", {
        get: function () {
            try {
                return localStorage.length;
            }
            catch (e) {
                return 0;
            }
        },
        enumerable: true,
        configurable: true
    });
    return SafeLocalStorage;
}());
exports.SafeLocalStorage = SafeLocalStorage;


/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var Utils_1 = __webpack_require__(4);
var _ = __webpack_require__(0);
var MiscModules_1 = __webpack_require__(67);
var HashUtils = /** @class */ (function () {
    function HashUtils() {
    }
    HashUtils.getHash = function (w) {
        if (w === void 0) { w = window; }
        Assert_1.Assert.exists(w);
        // window.location.hash returns the DECODED hash on Firefox (it's a well known bug),
        // so any & in values will be already unescaped. This breaks our value splitting.
        // The following trick works on all browsers.
        var ret = '#' + (w.location.href.split('#')[1] || '');
        return HashUtils.getAjaxcrawlableHash(ret);
    };
    HashUtils.getValue = function (key, toParse) {
        Assert_1.Assert.isNonEmptyString(key);
        Assert_1.Assert.exists(toParse);
        toParse = HashUtils.getAjaxcrawlableHash(toParse);
        var paramValue = HashUtils.getRawValue(key, toParse);
        if (paramValue != undefined) {
            paramValue = HashUtils.getValueDependingOnType(key, paramValue);
        }
        return paramValue;
    };
    HashUtils.encodeValues = function (values) {
        var hash = [];
        _.each(values, function (valueToEncode, key, obj) {
            var encodedValue = '';
            if (Utils_1.Utils.isNonEmptyArray(valueToEncode)) {
                encodedValue = HashUtils.encodeArray(valueToEncode);
            }
            else if (_.isObject(valueToEncode) && Utils_1.Utils.isNonEmptyArray(_.keys(valueToEncode))) {
                encodedValue = HashUtils.encodeObject(valueToEncode);
            }
            else if (!Utils_1.Utils.isNullOrUndefined(valueToEncode)) {
                encodedValue = Utils_1.Utils.safeEncodeURIComponent(valueToEncode.toString());
            }
            if (encodedValue != '') {
                hash.push(key + '=' + encodedValue);
            }
        });
        return hash.join('&');
    };
    HashUtils.getAjaxcrawlableHash = function (hash) {
        if (hash[1] != undefined && hash[1] == '!') {
            return hash.substring(0, 1) + hash.substring(2);
        }
        else {
            return hash;
        }
    };
    HashUtils.getRawValue = function (key, toParse) {
        Assert_1.Assert.exists(key);
        Assert_1.Assert.exists(toParse);
        Assert_1.Assert.check(toParse.indexOf('#') == 0 || toParse == '');
        var toParseArray = toParse.substr(1).split('&');
        var paramPos = 0;
        var loop = true;
        var paramValue = undefined;
        while (loop) {
            var paramValuePair = toParseArray[paramPos].split('=');
            if (paramValuePair[0] == key) {
                loop = false;
                paramValue = paramValuePair[1];
            }
            else {
                paramPos++;
                if (paramPos >= toParseArray.length) {
                    paramPos = undefined;
                    loop = false;
                }
            }
        }
        return paramValue;
    };
    HashUtils.getValueDependingOnType = function (key, paramValue) {
        var type = HashUtils.getValueType(key, paramValue);
        var returnValue;
        if (type == 'object') {
            returnValue = HashUtils.decodeObject(paramValue);
        }
        else if (type == 'array') {
            returnValue = HashUtils.decodeArray(paramValue);
        }
        else {
            try {
                returnValue = decodeURIComponent(paramValue);
            }
            catch (e) {
                new MiscModules_1.Logger(HashUtils).warn('Error while decoding a value from the URL as a standard value', e, key, paramValue);
            }
        }
        return returnValue;
    };
    HashUtils.getValueType = function (key, paramValue) {
        if (key == 'q') {
            return 'other';
        }
        else if (HashUtils.isObject(paramValue)) {
            return 'object';
        }
        else if (HashUtils.startsOrEndsWithSquareBracket(paramValue)) {
            return 'array';
        }
        else {
            return 'other';
        }
    };
    HashUtils.startsWithLeftSquareBracket = function (value) {
        return HashUtils.DELIMITER.arrayStartRegExp.test(value);
    };
    HashUtils.startsWithEncodedLeftSquareBracket = function (value) {
        return value.indexOf(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.arrayStart)) == 0;
    };
    HashUtils.endsWithRightSquareBracket = function (value) {
        return HashUtils.DELIMITER.arrayEndRegExp.test(value);
    };
    HashUtils.endsWithEncodedRightSquareBracket = function (value) {
        var encodedBracket = Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.arrayEnd);
        var encodedBracketIndex = value.indexOf(encodedBracket);
        var hasEncodedBracket = encodedBracketIndex !== -1;
        return hasEncodedBracket && encodedBracketIndex == value.length - encodedBracket.length;
    };
    HashUtils.isObjectStartNotEncoded = function (value) {
        return value.substr(0, 1) == HashUtils.DELIMITER.objectStart;
    };
    HashUtils.isObjectStartEncoded = function (value) {
        return value.indexOf(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.objectStart)) == 0;
    };
    HashUtils.isObjectEndNotEncoded = function (value) {
        return value.substr(value.length - 1) == HashUtils.DELIMITER.objectEnd;
    };
    HashUtils.isObjectEndEncoded = function (value) {
        return (value.indexOf(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.objectEnd)) ==
            value.length - Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.objectEnd).length);
    };
    HashUtils.isObject = function (value) {
        var isObjectStart = HashUtils.isObjectStartNotEncoded(value) || HashUtils.isObjectStartEncoded(value);
        var isObjectEnd = HashUtils.isObjectEndNotEncoded(value) || HashUtils.isObjectEndEncoded(value);
        return isObjectStart && isObjectEnd;
    };
    HashUtils.startsOrEndsWithSquareBracket = function (value) {
        var isArrayStart = HashUtils.startsWithLeftSquareBracket(value) || HashUtils.startsWithEncodedLeftSquareBracket(value);
        var isArrayEnd = HashUtils.endsWithRightSquareBracket(value) || HashUtils.endsWithEncodedRightSquareBracket(value);
        return isArrayStart || isArrayEnd;
    };
    HashUtils.encodeArray = function (array) {
        var arrayReturn = _.map(array, function (value) {
            return Utils_1.Utils.safeEncodeURIComponent(value);
        });
        return HashUtils.DELIMITER.arrayStart + arrayReturn.join(',') + HashUtils.DELIMITER.arrayEnd;
    };
    HashUtils.encodeObject = function (obj) {
        var _this = this;
        var retArray = _.map(obj, function (val, key, obj) {
            return "\"" + Utils_1.Utils.safeEncodeURIComponent(key) + "\":" + _this.encodeValue(val);
        });
        return HashUtils.DELIMITER.objectStart + retArray.join(' , ') + HashUtils.DELIMITER.objectEnd;
    };
    HashUtils.encodeValue = function (val) {
        var encodedValue = '';
        if (_.isArray(val)) {
            encodedValue = HashUtils.encodeArray(val);
        }
        else if (_.isObject(val)) {
            encodedValue = JSON.stringify(val);
        }
        else if (_.isNumber(val) || _.isBoolean(val)) {
            encodedValue = Utils_1.Utils.safeEncodeURIComponent(val.toString());
        }
        else {
            encodedValue = '"' + Utils_1.Utils.safeEncodeURIComponent(val) + '"';
        }
        return encodedValue;
    };
    HashUtils.decodeObject = function (obj) {
        if (HashUtils.isObjectStartEncoded(obj) && HashUtils.isObjectEndEncoded(obj)) {
            obj = obj.replace(/encodeURIComponent(HashUtils.Delimiter.objectStart)/, HashUtils.DELIMITER.objectStart);
            obj = obj.replace(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.objectEnd), HashUtils.DELIMITER.objectEnd);
        }
        try {
            var containsArray = /(\[.*\])/.exec(obj);
            if (containsArray) {
                obj = obj.replace(/(\[.*\])/, "[" + this.decodeArray(containsArray[1])
                    .map(function (val) { return "\"" + val + "\""; })
                    .join(',') + "]");
            }
            var decoded = decodeURIComponent(obj);
            return JSON.parse(decoded);
        }
        catch (e) {
            new MiscModules_1.Logger(HashUtils).warn('Error while decoding a value from the URL as an object', e, obj);
            return {};
        }
    };
    HashUtils.decodeArray = function (value) {
        var valueWithoutSquareBrackets = HashUtils.removeSquareBrackets(value);
        var array = valueWithoutSquareBrackets.split(',');
        return _.chain(array)
            .map(function (val) {
            try {
                return decodeURIComponent(val);
            }
            catch (e) {
                new MiscModules_1.Logger(HashUtils).warn('Error while decoding a value from the URL as an array', e, val, value);
                return null;
            }
        })
            .compact()
            .value();
    };
    HashUtils.removeSquareBrackets = function (value) {
        if (HashUtils.startsWithEncodedLeftSquareBracket(value)) {
            value = value.replace(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.arrayStart), '');
        }
        if (HashUtils.endsWithEncodedRightSquareBracket(value)) {
            value = value.replace(Utils_1.Utils.safeEncodeURIComponent(HashUtils.DELIMITER.arrayEnd), '');
        }
        if (HashUtils.startsWithLeftSquareBracket(value)) {
            value = value.replace(HashUtils.DELIMITER.arrayStart, '');
        }
        if (HashUtils.endsWithRightSquareBracket(value)) {
            value = value.replace(HashUtils.DELIMITER.arrayEnd, '');
        }
        return value;
    };
    HashUtils.DELIMITER = {
        objectStart: '{',
        objectEnd: '}',
        arrayStart: '[',
        arrayEnd: ']',
        arrayStartRegExp: /^\[/,
        arrayEndRegExp: /\]$/
    };
    return HashUtils;
}());
exports.HashUtils = HashUtils;


/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(4);
var UrlUtils = /** @class */ (function () {
    function UrlUtils() {
    }
    UrlUtils.getUrlParameter = function (name) {
        return (decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, ''])[1].replace(/\+/g, '%20')) || null);
    };
    UrlUtils.merge = function (endpointParameters) {
        var parts = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            parts[_i - 1] = arguments[_i];
        }
        parts.forEach(function (part) {
            var _a = UrlUtils.normalizeAsParts(part), path = _a.path, queryNormalized = _a.queryNormalized;
            if (Utils_1.Utils.isNonEmptyString(path)) {
                endpointParameters = __assign({}, endpointParameters, { url: path });
            }
            if (Utils_1.Utils.isNonEmptyArray(queryNormalized)) {
                var queryStringExists = Utils_1.Utils.isNonEmptyArray(endpointParameters.queryString);
                var queryString = queryStringExists
                    ? Utils_1.Utils.concatWithoutDuplicate(endpointParameters.queryString, queryNormalized)
                    : queryNormalized;
                endpointParameters = __assign({}, endpointParameters, { queryString: queryString });
            }
        });
        return endpointParameters;
    };
    UrlUtils.normalizeAsString = function (toNormalize) {
        var _a = this.normalizeAsParts(toNormalize), queryNormalized = _a.queryNormalized, path = _a.path;
        return "" + path + this.addToUrlIfNotEmpty(queryNormalized, '&', '?');
    };
    UrlUtils.normalizeAsParts = function (toNormalize) {
        var pathsNormalized = this.normalizePaths(toNormalize);
        var queryNormalized = this.normalizeQueryString(toNormalize);
        return {
            pathsNormalized: pathsNormalized,
            queryNormalized: queryNormalized,
            path: this.addToUrlIfNotEmpty(pathsNormalized, '/', UrlUtils.getRelativePathLeadingCharacters(toNormalize))
        };
    };
    UrlUtils.getRelativePathLeadingCharacters = function (toNormalize) {
        var leadingRelativeUrlCharacters = '';
        var relativeUrlLeadingCharactersRegex = /^(([\/])+)/;
        var firstPath = underscore_1.first(this.toArray(toNormalize.paths));
        if (firstPath) {
            var match = relativeUrlLeadingCharactersRegex.exec(firstPath);
            if (match) {
                leadingRelativeUrlCharacters = match[0];
            }
        }
        return leadingRelativeUrlCharacters;
    };
    UrlUtils.normalizePaths = function (toNormalize) {
        var _this = this;
        return this.toArray(toNormalize.paths).map(function (path) {
            if (Utils_1.Utils.isNonEmptyString(path)) {
                return _this.removeProblematicChars(path);
            }
            return '';
        });
    };
    UrlUtils.normalizeQueryString = function (toNormalize) {
        var _this = this;
        var queryNormalized = [];
        if (toNormalize.queryAsString) {
            var cleanedUp = this.toArray(toNormalize.queryAsString).map(function (query) {
                query = _this.removeProblematicChars(query);
                query = _this.encodeKeyValuePair(query);
                return query;
            });
            queryNormalized = queryNormalized.concat(cleanedUp);
        }
        if (toNormalize.query) {
            var paired = underscore_1.pairs(toNormalize.query);
            var mapped = paired.map(function (pair) {
                var key = pair[0], value = pair[1];
                var exceptions = ['pipeline'];
                var isAnException = underscore_1.isString(key) && underscore_1.contains(exceptions, key.toLowerCase());
                if (!isAnException) {
                    if (UrlUtils.isInvalidQueryStringValue(value) || UrlUtils.isInvalidQueryStringValue(key)) {
                        return '';
                    }
                }
                return [_this.removeProblematicChars(key), _this.decodeThenEncode(value)].join('=');
            });
            queryNormalized = queryNormalized.concat(mapped);
        }
        return underscore_1.uniq(queryNormalized);
    };
    UrlUtils.addToUrlIfNotEmpty = function (toAdd, joinWith, leadWith) {
        if (Utils_1.Utils.isNonEmptyArray(toAdd)) {
            return "" + leadWith + underscore_1.compact(toAdd).join(joinWith);
        }
        return '';
    };
    UrlUtils.startsWith = function (searchString, targetString) {
        return Utils_1.Utils.stringStartsWith(targetString, searchString);
    };
    UrlUtils.endsWith = function (searchString, targetString) {
        return Utils_1.Utils.stringEndsWith(targetString, searchString);
    };
    UrlUtils.removeAtEnd = function (searchString, targetString) {
        while (this.endsWith(searchString, targetString)) {
            targetString = targetString.slice(0, targetString.length - searchString.length);
        }
        return targetString;
    };
    UrlUtils.removeAtStart = function (searchString, targetString) {
        while (this.startsWith(searchString, targetString)) {
            targetString = targetString.slice(searchString.length);
        }
        return targetString;
    };
    UrlUtils.toArray = function (parameter) {
        return underscore_1.isArray(parameter) ? parameter : [parameter];
    };
    UrlUtils.encodeKeyValuePair = function (pair) {
        var split = pair.split('=');
        if (split.length == 0) {
            return pair;
        }
        var key = split[0];
        var value = underscore_1.rest(split, 1).join('');
        if (!key) {
            return pair;
        }
        if (!value) {
            return pair;
        }
        key = this.removeProblematicChars(key);
        value = this.decodeThenEncode(value);
        return key + "=" + value;
    };
    UrlUtils.removeProblematicChars = function (value) {
        var _this = this;
        ['?', '/', '#', '='].forEach(function (problematicChar) {
            value = _this.removeAtStart(problematicChar, value);
            value = _this.removeAtEnd(problematicChar, value);
        });
        return value;
    };
    UrlUtils.decodeThenEncode = function (value) {
        var decoded = decodeURIComponent(value);
        return Utils_1.Utils.safeEncodeURIComponent(decoded);
    };
    UrlUtils.isInvalidQueryStringValue = function (value) {
        if (underscore_1.isString(value)) {
            return Utils_1.Utils.isEmptyString(value);
        }
        return Utils_1.Utils.isNullOrUndefined(value);
    };
    return UrlUtils;
}());
exports.UrlUtils = UrlUtils;


/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var HistoryStore_1 = __webpack_require__(89);
var underscore_1 = __webpack_require__(0);
var QueryEvents_1 = __webpack_require__(11);
var ExternalModulesShim_1 = __webpack_require__(26);
var Assert_1 = __webpack_require__(5);
var Defer_1 = __webpack_require__(31);
var SearchEndpointWithDefaultCallOptions_1 = __webpack_require__(332);
var BaseComponent_1 = __webpack_require__(36);
var QueryBuilder_1 = __webpack_require__(49);
var RootComponent_1 = __webpack_require__(45);
var Dom_1 = __webpack_require__(1);
var LocalStorageUtils_1 = __webpack_require__(41);
var QueryUtils_1 = __webpack_require__(21);
var UrlUtils_1 = __webpack_require__(43);
var Utils_1 = __webpack_require__(4);
var AnalyticsInformation_1 = __webpack_require__(50);
var QueryboxQueryParameters_1 = __webpack_require__(140);
var DefaultQueryOptions = /** @class */ (function () {
    function DefaultQueryOptions() {
        this.searchAsYouType = false;
        this.cancel = false;
        this.logInActionsHistory = false;
        this.shouldRedirectStandaloneSearchbox = true;
    }
    return DefaultQueryOptions;
}());
/**
 * This class is automatically instantiated and bound to the root of your search interface when you initialize the framework.<br/>
 * It is essentially a singleton that wraps the access to the {@link SearchEndpoint} endpoint to execute query, and is in charge of triggering the different query events.<br/>
 * This is what every component of the framework uses internally to execute query or access the endpoint.<br/>
 * When calling <code>Coveo.executeQuery</code> this class is used.
 */
var QueryController = /** @class */ (function (_super) {
    __extends(QueryController, _super);
    /**
     * Create a new query controller
     * @param element
     * @param options
     * @param usageAnalytics **Deprecated.** Since the [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/), the class retrieves and uses the {@link AnalyticsClient} from its `searchInterface` constructor parameter.
     * @param searchInterface
     */
    function QueryController(element, options, usageAnalytics, searchInterface) {
        var _this = _super.call(this, element, QueryController.ID) || this;
        _this.options = options;
        _this.searchInterface = searchInterface;
        _this.modalBox = ExternalModulesShim_1.ModalBox;
        _this.closeModalBox = true;
        _this.showingExecutingQueryAnimation = false;
        _this.localStorage = new LocalStorageUtils_1.LocalStorageUtils('lastQueryHash');
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(options);
        _this.firstQuery = true;
        _this.initializeActionsHistory();
        return _this;
    }
    Object.defineProperty(QueryController.prototype, "usageAnalytics", {
        get: function () {
            return this.searchInterface.usageAnalytics;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Set the {@link SearchEndpoint} that the query controller should use to execute query
     * @param endpoint
     */
    QueryController.prototype.setEndpoint = function (endpoint) {
        this.overrideEndpoint = endpoint;
        this.logger.debug('Endpoint set', endpoint);
    };
    /**
     * Get the {@link SearchEndpoint} that is currently used by the query controller to execute query
     * @returns {SearchEndpoint}
     */
    QueryController.prototype.getEndpoint = function () {
        var endpoint = this.overrideEndpoint || this.options.endpoint;
        // We must wrap the endpoint in a decorator that'll add the call options
        // we obtain by firing the proper event. Those are used for authentication
        // providers, and I guess other stuff later on.
        return new SearchEndpointWithDefaultCallOptions_1.SearchEndpointWithDefaultCallOptions(endpoint, this.getCallOptions());
    };
    /**
     * Return the last query that was performed by the query controller
     * @returns {IQuery|Query}
     */
    QueryController.prototype.getLastQuery = function () {
        return this.lastQuery || new QueryBuilder_1.QueryBuilder().build();
    };
    /**
     * Return the last query results set.
     * @returns {IQueryResults}
     */
    QueryController.prototype.getLastResults = function () {
        return this.lastQueryResults;
    };
    /**
     * Returns the plan of execution of a search request, without executing it.
     * @returns {ExecutionPlan}
     */
    QueryController.prototype.fetchQueryExecutionPlan = function () {
        return __awaiter(this, void 0, void 0, function () {
            var query, error_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        query = this.createQueryBuilder(new DefaultQueryOptions()).build();
                        this.logger.debug('Fetching query execution plan');
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 3, , 4]);
                        return [4 /*yield*/, this.getEndpoint().plan(query)];
                    case 2: return [2 /*return*/, _a.sent()];
                    case 3:
                        error_1 = _a.sent();
                        return [2 /*return*/, null];
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    /**
     * Execute a query and return a Promise of IQueryResults.<br/>
     * This will execute the normal query flow, triggering all the necessary query events (newQuery <br/>
     * All components present in the interface will act accordingly (modify the query and render results if needed).
     * @param options
     * @returns {Promise<IQueryResults>}
     */
    QueryController.prototype.executeQuery = function (options) {
        var _this = this;
        options = underscore_1.extend(new DefaultQueryOptions(), options);
        this.closeModalBoxIfNeeded(options ? options.closeModalBox : undefined);
        this.logger.debug('Executing new query');
        this.cancelAnyCurrentPendingQuery();
        if (options.beforeExecuteQuery != null) {
            options.beforeExecuteQuery();
        }
        if (!options.ignoreWarningSearchEvent) {
            this.usageAnalytics.warnAboutSearchEvent();
        }
        this.showExecutingQueryAnimation();
        var dataToSendOnNewQuery = {
            searchAsYouType: options.searchAsYouType,
            cancel: options.cancel,
            origin: options.origin,
            shouldRedirectStandaloneSearchbox: options.shouldRedirectStandaloneSearchbox
        };
        this.newQueryEvent(dataToSendOnNewQuery);
        if (dataToSendOnNewQuery.cancel) {
            this.cancelQuery();
            return;
        }
        var queryBuilder = this.createQueryBuilder(options);
        // The query was canceled
        if (!queryBuilder) {
            return;
        }
        var query = queryBuilder.build();
        if (options.logInActionsHistory) {
            this.logQueryInActionsHistory(query);
        }
        var endpointToUse = this.getEndpoint();
        var promise = (this.currentPendingQuery = endpointToUse.search(query, { analyticsInformation: this.getAnalyticsInformation() }));
        promise
            .then(function (queryResults) {
            Assert_1.Assert.exists(queryResults);
            if (_this.firstQuery) {
                _this.firstQuery = false;
            }
            // If our promise is no longer the current one, then the query
            // has been cancel. We should do nothing here.
            if (promise !== _this.currentPendingQuery) {
                return;
            }
            _this.logger.debug('Query results received', query, queryResults);
            if (_this.keepLastSearchUid(query, queryResults, options)) {
                queryResults.searchUid = _this.getLastSearchUid();
                queryResults._reusedSearchUid = true;
                QueryUtils_1.QueryUtils.setPropertyOnResults(queryResults, 'queryUid', _this.getLastSearchUid());
            }
            else {
                _this.lastQueryHash = _this.queryHash(query, queryResults);
                _this.lastSearchUid = queryResults.searchUid;
            }
            _this.lastQuery = query;
            _this.lastQueryResults = queryResults;
            _this.currentError = null;
            var dataToSendOnPreprocessResult = {
                queryBuilder: queryBuilder,
                query: query,
                results: queryResults,
                searchAsYouType: options.searchAsYouType
            };
            _this.preprocessResultsEvent(dataToSendOnPreprocessResult);
            var dataToSendOnNoResult = {
                queryBuilder: queryBuilder,
                query: query,
                results: queryResults,
                searchAsYouType: options.searchAsYouType,
                retryTheQuery: false
            };
            if (queryResults.results.length == 0) {
                _this.noResultEvent(dataToSendOnNoResult);
            }
            if (dataToSendOnNoResult.retryTheQuery) {
                // When retrying the query, we must forward the results to the deferred we
                // initially returned, in case someone is listening on it.
                return _this.executeQuery();
            }
            else {
                _this.lastQueryBuilder = queryBuilder;
                _this.currentPendingQuery = undefined;
                var dataToSendOnSuccess_1 = {
                    queryBuilder: queryBuilder,
                    query: query,
                    results: queryResults,
                    searchAsYouType: options.searchAsYouType
                };
                _this.querySuccessEvent(dataToSendOnSuccess_1);
                Defer_1.Defer.defer(function () {
                    _this.deferredQuerySuccessEvent(dataToSendOnSuccess_1);
                    _this.hideExecutingQueryAnimation();
                });
                return queryResults;
            }
        })
            .catch(function (error) {
            // If our deferred is no longer the current one, then the query
            // has been cancel. We should do nothing here.
            if (promise !== _this.currentPendingQuery) {
                return;
            }
            _this.logger.error('Query triggered an error', query, error);
            _this.currentPendingQuery = undefined;
            var dataToSendOnError = {
                queryBuilder: queryBuilder,
                endpoint: endpointToUse,
                query: query,
                error: error,
                searchAsYouType: options.searchAsYouType
            };
            _this.lastQuery = query;
            _this.lastQueryResults = null;
            _this.currentError = error;
            _this.queryError(dataToSendOnError);
            _this.hideExecutingQueryAnimation();
        });
        var dataToSendDuringQuery = {
            queryBuilder: queryBuilder,
            query: query,
            searchAsYouType: options.searchAsYouType,
            promise: promise
        };
        this.duringQueryEvent(dataToSendDuringQuery);
        return this.currentPendingQuery;
    };
    /**
     * Using the same parameters as the last successful query, fetch another batch of results. Particularly useful for infinite scrolling, for example.
     * @param count
     * @returns {any}
     */
    QueryController.prototype.fetchMore = function (count) {
        var _this = this;
        if (this.currentPendingQuery != undefined) {
            return undefined;
        }
        // Send all pending events (think : search as you type)
        // This allows us to get the real search id for the results when the query returns
        this.usageAnalytics.sendAllPendingEvents();
        var queryBuilder = new QueryBuilder_1.QueryBuilder();
        this.continueLastQueryBuilder(queryBuilder, count);
        var query = queryBuilder.build();
        var endpointToUse = this.getEndpoint();
        var promise = (this.currentPendingQuery = endpointToUse.search(query));
        var dataToSendDuringQuery = {
            queryBuilder: queryBuilder,
            query: query,
            searchAsYouType: false,
            promise: promise
        };
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.duringFetchMoreQuery, dataToSendDuringQuery);
        this.lastQueryBuilder = queryBuilder;
        this.lastQuery = query;
        promise.then(function (results) {
            // We re-use the search id from the initial search here, even though the
            // server provided us with a new one. 'Fetch mores' are considered to be
            // the same query from an analytics point of view.
            _this.currentPendingQuery = undefined;
            if (_this.lastQueryResults == null) {
                _this.lastQueryResults = results;
            }
            else {
                underscore_1.forEach(results.results, function (result) {
                    _this.lastQueryResults.results.push(result);
                });
            }
            var dataToSendOnPreprocessResult = {
                queryBuilder: queryBuilder,
                query: query,
                results: results,
                searchAsYouType: false
            };
            _this.preprocessResultsEvent(dataToSendOnPreprocessResult);
            QueryUtils_1.QueryUtils.setIndexAndUidOnQueryResults(query, results, _this.getLastSearchUid(), results.pipeline, results.splitTestRun);
            var dataToSendOnFetchMoreSuccess = {
                query: query,
                results: results,
                queryBuilder: queryBuilder,
                searchAsYouType: false
            };
            _this.fetchMoreSuccessEvent(dataToSendOnFetchMoreSuccess);
        });
        return this.currentPendingQuery;
    };
    /**
     * Cancel any pending query
     */
    QueryController.prototype.cancelQuery = function () {
        this.cancelAnyCurrentPendingQuery();
        this.hideExecutingQueryAnimation();
    };
    QueryController.prototype.deferExecuteQuery = function (options) {
        var _this = this;
        this.showExecutingQueryAnimation();
        Defer_1.Defer.defer(function () { return _this.executeQuery(options); });
    };
    QueryController.prototype.ensureCreatedQueryBuilder = function () {
        if (!this.createdOneQueryBuilder) {
            this.createQueryBuilder(new DefaultQueryOptions());
        }
    };
    QueryController.prototype.createQueryBuilder = function (options) {
        Assert_1.Assert.exists(options);
        QueryboxQueryParameters_1.QueryboxQueryParameters.allowDuplicateQuery();
        this.createdOneQueryBuilder = true;
        var queryBuilder = new QueryBuilder_1.QueryBuilder();
        // Default values, components will probably override them if they exists
        queryBuilder.locale = String['locale'];
        queryBuilder.firstResult = queryBuilder.firstResult || 0;
        // Allow outside code to customize the query builder. We provide two events,
        // to allow someone to have a peep at the query builder after the first phase
        // and add some stuff depending on what was put in there. The facets are using
        // this mechanism to generate query overrides.
        var dataToSendDuringBuildingQuery = {
            queryBuilder: queryBuilder,
            searchAsYouType: options.searchAsYouType,
            cancel: options.cancel
        };
        this.buildingQueryEvent(dataToSendDuringBuildingQuery);
        var dataToSendDuringDoneBuildingQuery = {
            queryBuilder: queryBuilder,
            searchAsYouType: options.searchAsYouType,
            cancel: options.cancel
        };
        this.doneBuildingQueryEvent(dataToSendDuringDoneBuildingQuery);
        if (dataToSendDuringBuildingQuery.cancel || dataToSendDuringDoneBuildingQuery.cancel) {
            this.cancelQuery();
            return;
        }
        var pipeline = this.getPipelineInUrl();
        if (pipeline) {
            queryBuilder.pipeline = pipeline;
        }
        return queryBuilder;
    };
    QueryController.prototype.isStandaloneSearchbox = function () {
        return Utils_1.Utils.isNonEmptyString(this.options.searchPageUri);
    };
    QueryController.prototype.saveLastQuery = function () {
        this.localStorage.save({
            expire: new Date().getTime() + 1000 * 60 * 30,
            hash: this.lastQueryHash,
            uid: this.lastSearchUid
        });
    };
    // This field is exposed for components rendered in the results or on-demand which
    // need access to the entire query. For example, the QuickviewDocument need to pass
    // the entire query to the Search API. For other components, QueryStateModel or
    // listening to events like 'doneBuildingQuery' is the way to go.
    QueryController.prototype.getLastQueryHash = function () {
        if (this.lastQueryHash) {
            return this.lastQueryHash;
        }
        this.loadLastQueryHash();
        return this.lastQueryHash || this.queryHash(new QueryBuilder_1.QueryBuilder().build());
    };
    QueryController.prototype.resetHistory = function () {
        this.historyStore.clear();
    };
    QueryController.prototype.enableHistory = function () {
        this.historyStore = HistoryStore_1.buildHistoryStore();
    };
    QueryController.prototype.disableHistory = function () {
        this.historyStore = HistoryStore_1.buildNullHistoryStore();
    };
    QueryController.prototype.initializeActionsHistory = function () {
        this.enableHistory();
        if (this.usageAnalytics.isActivated()) {
            return;
        }
        this.historyStore.clear();
        this.disableHistory();
    };
    QueryController.prototype.closeModalBoxIfNeeded = function (needed) {
        if (needed != undefined ? needed : this.closeModalBox) {
            this.modalBox.close(true);
        }
    };
    QueryController.prototype.getLastSearchUid = function () {
        if (this.lastSearchUid != null) {
            return this.lastSearchUid;
        }
        this.loadLastQueryHash();
        return this.lastSearchUid;
    };
    QueryController.prototype.loadLastQueryHash = function () {
        var lastQuery = this.localStorage.load();
        if (lastQuery != null && new Date().getTime() <= lastQuery.expire) {
            this.lastQueryHash = lastQuery.hash;
            this.lastSearchUid = lastQuery.uid;
            this.localStorage.remove();
        }
    };
    QueryController.prototype.continueLastQueryBuilder = function (queryBuilder, count) {
        underscore_1.extend(queryBuilder, this.lastQueryBuilder);
        queryBuilder.firstResult = queryBuilder.firstResult + queryBuilder.numberOfResults;
        queryBuilder.numberOfResults = count;
    };
    QueryController.prototype.getPipelineInUrl = function () {
        return UrlUtils_1.UrlUtils.getUrlParameter('pipeline');
    };
    QueryController.prototype.cancelAnyCurrentPendingQuery = function () {
        if (Utils_1.Utils.exists(this.currentPendingQuery)) {
            this.logger.debug('Cancelling current pending query');
            Promise.reject('Cancelling current pending query');
            this.currentPendingQuery = undefined;
            return true;
        }
        return false;
    };
    QueryController.prototype.showExecutingQueryAnimation = function () {
        if (!this.showingExecutingQueryAnimation) {
            Dom_1.$$(this.element).addClass('coveo-executing-query');
            this.showingExecutingQueryAnimation = true;
        }
    };
    QueryController.prototype.hideExecutingQueryAnimation = function () {
        if (this.showingExecutingQueryAnimation) {
            Dom_1.$$(this.element).removeClass('coveo-executing-query');
            this.showingExecutingQueryAnimation = false;
        }
    };
    QueryController.prototype.keepLastSearchUid = function (query, queryResults, options) {
        if (options.keepLastSearchUid === true) {
            return true;
        }
        var enableHistory = !!(this.searchInterface && this.searchInterface.options && this.searchInterface.options.enableHistory);
        return enableHistory && this.compareWithLastQueryHash(this.queryHash(query, queryResults));
    };
    QueryController.prototype.compareWithLastQueryHash = function (queryHash) {
        var lastParams = JSON.parse(this.getLastQueryHash());
        var newParams = JSON.parse(queryHash);
        return Utils_1.Utils.objectEqual(lastParams, newParams);
    };
    QueryController.prototype.queryHash = function (query, queryResults) {
        var queryKeys = [
            'q',
            'aq',
            'cq',
            'dq',
            'lq',
            'searchHub',
            'tab',
            'pipeline',
            'sortCriteria',
            'recommendation',
            'commerce',
            'facets'
        ];
        var queryParams = underscore_1.pick.apply(void 0, [query].concat(queryKeys));
        if (queryResults) {
            queryParams.pipeline = queryResults.pipeline;
        }
        return JSON.stringify(queryParams);
    };
    QueryController.prototype.getCallOptions = function () {
        var args = {
            options: {
                authentication: []
            }
        };
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.buildingCallOptions, args);
        return args.options;
    };
    QueryController.prototype.newQueryEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.newQuery, args);
    };
    QueryController.prototype.buildingQueryEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.buildingQuery, args);
    };
    QueryController.prototype.doneBuildingQueryEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.doneBuildingQuery, args);
    };
    QueryController.prototype.duringQueryEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.duringQuery, args);
    };
    QueryController.prototype.querySuccessEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.querySuccess, args);
    };
    QueryController.prototype.fetchMoreSuccessEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.fetchMoreSuccess, args);
    };
    QueryController.prototype.deferredQuerySuccessEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.deferredQuerySuccess, args);
    };
    QueryController.prototype.queryError = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.queryError, args);
    };
    QueryController.prototype.preprocessResultsEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.preprocessResults, args);
    };
    QueryController.prototype.noResultEvent = function (args) {
        Dom_1.$$(this.element).trigger(QueryEvents_1.QueryEvents.noResults, args);
    };
    QueryController.prototype.debugInfo = function () {
        var _this = this;
        var info = {
            query: this.lastQuery
        };
        if (this.lastQueryResults != null) {
            info.queryDuration = function () { return _this.buildQueryDurationSection(_this.lastQueryResults); };
            info.results = function () { return underscore_1.omit(_this.lastQueryResults, 'results'); };
        }
        if (this.currentError != null) {
            info.error = function () { return _this.currentError; };
        }
        return info;
    };
    QueryController.prototype.buildQueryDurationSection = function (queryResults) {
        var dom = Dom_1.Dom.createElement('div', { className: 'coveo-debug-queryDuration' });
        var graph = Dom_1.Dom.createElement('div', { className: 'coveo-debug-durations' });
        var debugRef = BaseComponent_1.BaseComponent.getComponentRef('Debug');
        dom.appendChild(graph);
        underscore_1.forEach(debugRef.durationKeys, function (key) {
            var duration = queryResults[key];
            if (duration != null) {
                graph.appendChild(Dom_1.Dom.createElement('div', {
                    className: 'coveo-debug-duration',
                    style: "width:" + duration + "px",
                    'data-id': key
                }));
                var legend = Dom_1.Dom.createElement('div', { className: 'coveo-debug-duration-legend', 'data-id': key });
                dom.appendChild(legend);
                var keyDom = Dom_1.Dom.createElement('span', { className: 'coveo-debug-duration-label' });
                keyDom.appendChild(document.createTextNode(key));
                legend.appendChild(keyDom);
                var durationDom = Dom_1.Dom.createElement('span', { className: 'coveo-debug-duration-value' });
                durationDom.appendChild(document.createTextNode(duration));
                legend.appendChild(durationDom);
            }
        });
        return dom;
    };
    QueryController.prototype.logQueryInActionsHistory = function (query) {
        var queryElement = {
            name: 'Query',
            value: query.q,
            time: JSON.stringify(new Date())
        };
        this.historyStore.addElement(queryElement);
    };
    QueryController.prototype.getAnalyticsInformation = function () {
        var analyticsInfo = new AnalyticsInformation_1.AnalyticsInformation();
        analyticsInfo.pendingSearchEvent = this.usageAnalytics.getPendingSearchEvent();
        // add fallback for custom code that incorrectly implement the interface.
        if (this.usageAnalytics.getOriginContext) {
            analyticsInfo.originContext = this.usageAnalytics.getOriginContext();
        }
        else {
            analyticsInfo.originContext = 'Search';
        }
        if (this.usageAnalytics.getUserDisplayName) {
            analyticsInfo.userDisplayName = this.usageAnalytics.getUserDisplayName();
        }
        else {
            analyticsInfo.userDisplayName = undefined;
        }
        return analyticsInfo;
    };
    QueryController.ID = 'QueryController';
    return QueryController;
}(RootComponent_1.RootComponent));
exports.QueryController = QueryController;


/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var BaseComponent_1 = __webpack_require__(36);
var RootComponent = /** @class */ (function (_super) {
    __extends(RootComponent, _super);
    function RootComponent(element, type) {
        var _this = _super.call(this, element, type) || this;
        _this.element = element;
        _this.type = type;
        return _this;
    }
    return RootComponent;
}(BaseComponent_1.BaseComponent));
exports.RootComponent = RootComponent;


/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {

var store = __webpack_require__(164)('wks');
var uid = __webpack_require__(166);
var Symbol = __webpack_require__(38).Symbol;
var USE_SYMBOL = typeof Symbol == 'function';

var $exports = module.exports = function (name) {
  return store[name] || (store[name] =
    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};

$exports.store = store;


/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(7);
var Dom_1 = __webpack_require__(1);
var ComponentsTypes = /** @class */ (function () {
    function ComponentsTypes() {
    }
    Object.defineProperty(ComponentsTypes, "allFacetsType", {
        get: function () {
            return [
                'Facet',
                'FacetSlider',
                'FacetRange',
                'TimespanFacet',
                'HierarchicalFacet',
                'CategoryFacet',
                'DynamicFacet',
                'DynamicFacetRange',
                'DynamicHierarchicalFacet'
            ];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ComponentsTypes, "allFacetsClassname", {
        get: function () {
            return ComponentsTypes.allFacetsType.map(function (type) { return "Coveo" + type; });
        },
        enumerable: true,
        configurable: true
    });
    ComponentsTypes.getAllFacetElementsFromElement = function (root) {
        var selectors = ComponentsTypes.allFacetsClassname.map(function (className) { return "." + className; }).join(', ');
        var hasNoFacetChild = function (element) { return !Dom_1.$$(element).findAll(selectors).length; };
        return Dom_1.$$(root)
            .findAll(selectors)
            .filter(hasNoFacetChild);
    };
    ComponentsTypes.getAllFacetInstancesFromElement = function (root) {
        return ComponentsTypes.getAllFacetElementsFromElement(root).map(function (element) { return Component_1.Component.get(element); });
    };
    ComponentsTypes.getAllFacetsFromSearchInterface = function (searchInterface) {
        return ComponentsTypes.allFacetsType.reduce(function (facets, facetType) { return facets.concat(searchInterface.getComponents(facetType)); }, []);
    };
    return ComponentsTypes;
}());
exports.ComponentsTypes = ComponentsTypes;


/***/ }),
/* 48 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
function getHeadingTag(level, fallbackTag) {
    if (fallbackTag === void 0) { fallbackTag = 'div'; }
    if (level === undefined || level < 1 || level > 6) {
        return fallbackTag;
    }
    return "h" + level;
}
exports.getHeadingTag = getHeadingTag;


/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var Utils_1 = __webpack_require__(4);
var ExpressionBuilder_1 = __webpack_require__(75);
var QueryBuilderExpression_1 = __webpack_require__(185);
/**
 * The QueryBuilder is used to build a {@link IQuery} that will be able to be executed using the Search API.
 *
 * The class exposes several members and methods that help components and external code to build up the final query that is sent to the Search API.
 *
 */
var QueryBuilder = /** @class */ (function () {
    function QueryBuilder() {
        /**
         * Used to build the basic part of the query expression.
         *
         * This part typically consists of user-entered content such as query keywords, etc.
         * @type {Coveo.ExpressionBuilder}
         */
        this.expression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * Used to build the advanced part of the query expression.
         *
         * This part is typically formed of filter expressions generated by components such as facets, external code, etc.
         * @type {Coveo.ExpressionBuilder}
         */
        this.advancedExpression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * Used to build the advanced part of the query expression.
         *
         * This part is similar to `advancedExpression`, but its content is interpreted as a constant expression by the index and it takes advantage of special caching features.
         * @type {Coveo.ExpressionBuilder}
         */
        this.constantExpression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * The contextual text.
         *
         * This is the contextual text part of the query. It uses the Coveo Machine Learning service to pick key keywords from the text and add them to the basic expression.
         * This field is mainly used to pass context such a case description, long textual query or any other form of text that might help in
         * refining the query.
         */
        this.longQueryExpression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * Used to build the disjunctive part of the query expression.
         *
         * When present, this part is evaluated separately from the other expressions and the matching results are merged to those matching expressions, `advancedExpression` and `constantExpression`.
         *
         * The final boolean expression for the query is thus (basic advanced constant) OR (disjunction).
         * @type {Coveo.ExpressionBuilder}
         */
        this.disjunctionExpression = new ExpressionBuilder_1.ExpressionBuilder();
        /**
         * Whether to interpret special query syntax (e.g., `@objecttype=message`) in the basic
         * [`expression`]{@link QueryBuilder.expression} (see
         * [Coveo Query Syntax Reference](https://docs.coveo.com/en/1552/searching-with-coveo/coveo-cloud-query-syntax)).
         *
         * See also [`enableLowercaseOperators`]{@link QueryBuilder.enableLowercaseOperators}.
         *
         * **Note:**
         * > Normally, the [`enableQuerySyntax`]{@link Querybox.options.enableQuerySyntax} option of the
         * > [`Querybox`]{@link Querybox} component determines the value of this attribute during the initialization of the
         * search page. End user preferences can also modify the value of this attribute.
         *
         * Default value is `false`
         */
        this.enableQuerySyntax = false;
        /**
         * This is the 0-based index of the first result to return.
         *
         * If not specified, this parameter defaults to 0.
         */
        this.firstResult = 0;
        /**
         * This is the number of results to return, starting from {@link IQuery.firstResult}.
         *
         * If not specified, this parameter defaults to 10.
         */
        this.numberOfResults = 10;
        this.requiredFields = [];
        this.includeRequiredFields = false;
        /**
         * Whether to enable query corrections on this query (see {@link DidYouMean}).
         */
        this.enableDidYouMean = false;
        /**
         * Whether to enable debug info on the query.
         *
         * This will return additional information on the resulting JSON response from the Search API.
         *
         * Mostly: execution report (a detailed breakdown of the parsed and executed query).
         */
        this.enableDebug = false;
        /**
         * Specifies the sort criterion(s) to use to sort results. If not specified, this parameter defaults to relevancy.
         *
         * Possible values are : <br/>
         * -- relevancy :  This uses all the configured ranking weights as well as any specified ranking expressions to rank results.<br/>
         * -- dateascending / datedescending Sort using the value of the `@date` field, which is typically the last modification date of an item in the index.<br/>
         * -- qre : Sort using only the weights applied through ranking expressions. This is much like using `relevancy` except that automatic weights based on keyword proximity etc, are not computed.<br/>
         * -- nosort : Do not sort the results. The order in which items are returned is essentially random.<br/>
         * -- @field ascending / @field descending Sort using the value of a custom field.
         */
        this.sortCriteria = 'relevancy';
        this.retrieveFirstSentences = true;
        /**
         * Specifies an array of Query Function operation that will be executed on the results.
         */
        this.queryFunctions = [];
        /**
         * Specifies an array of Ranking Function operations that will be executed on the results.
         */
        this.rankingFunctions = [];
        /**
         * Specifies an array of Group By operations that can be performed on the query results to extract facets.
         * Cannot be used alongside [`facetRequests`]{@link QueryBuilder.facetRequests}
         */
        this.groupByRequests = [];
        /**
         * Specifies an array of request for the DynamicFacet component.
         * Cannot be used alongside [`groupByRequests`]{@link QueryBuilder.groupByRequests}
         */
        this.facetRequests = [];
        /**
         * The global configuration options to apply to the requests in the [facets]{@link QueryBuilder.facets} array.
         */
        this.facetOptions = {};
        /**
         * Specifies an array of request for the CategoryFacet component.
         */
        this.categoryFacets = [];
        this.enableDuplicateFiltering = false;
    }
    /**
     * Build the current content or state of the query builder and return a {@link IQuery}.
     *
     * build can be called multiple times on the same QueryBuilder.
     * @returns {IQuery}
     */
    QueryBuilder.prototype.build = function () {
        var query = {
            q: this.expression.build(),
            aq: this.advancedExpression.build(),
            cq: this.constantExpression.build(),
            lq: this.longQueryExpression.build(),
            dq: this.disjunctionExpression.build(),
            searchHub: this.searchHub,
            tab: this.tab,
            locale: this.locale,
            pipeline: this.pipeline,
            maximumAge: this.maximumAge,
            wildcards: this.enableWildcards,
            questionMark: this.enableQuestionMarks,
            lowercaseOperators: this.enableLowercaseOperators,
            partialMatch: this.enablePartialMatch,
            partialMatchKeywords: this.partialMatchKeywords,
            partialMatchThreshold: this.partialMatchThreshold,
            firstResult: this.firstResult,
            numberOfResults: this.numberOfResults,
            excerptLength: this.excerptLength,
            filterField: this.filterField,
            filterFieldRange: this.filterFieldRange,
            parentField: this.parentField,
            childField: this.childField,
            fieldsToInclude: this.computeFieldsToInclude(),
            fieldsToExclude: this.fieldsToExclude,
            enableDidYouMean: this.enableDidYouMean,
            sortCriteria: this.sortCriteria,
            sortField: this.sortField,
            queryFunctions: this.queryFunctions,
            rankingFunctions: this.rankingFunctions,
            groupBy: this.groupBy,
            facets: this.facets,
            facetOptions: this.facetOptions,
            categoryFacets: this.categoryFacets,
            retrieveFirstSentences: this.retrieveFirstSentences,
            timezone: this.timezone,
            enableQuerySyntax: this.enableQuerySyntax,
            enableDuplicateFiltering: this.enableDuplicateFiltering,
            enableCollaborativeRating: this.enableCollaborativeRating,
            debug: this.enableDebug,
            context: this.context,
            actionsHistory: this.actionsHistory,
            recommendation: this.recommendation,
            allowQueriesWithoutKeywords: this.allowQueriesWithoutKeywords,
            userActions: this.userActions,
            commerce: this.commerce
        };
        return query;
    };
    /**
     * Return only the expression(s) part(s) of the query, as a string.
     *
     * This means the basic, advanced and constant part in a complete expression {@link IQuery.q}, {@link IQuery.aq}, {@link IQuery.cq}.
     * @returns {string}
     */
    QueryBuilder.prototype.computeCompleteExpression = function () {
        return this.computeCompleteExpressionParts().full;
    };
    /**
     * Return only the expression(s) part(s) of the query, as an object.
     * @returns {{full: string, withoutConstant: string, constant: string}}
     */
    QueryBuilder.prototype.computeCompleteExpressionParts = function () {
        return new QueryBuilderExpression_1.QueryBuilderExpression(this.expression.build(), this.advancedExpression.build(), this.constantExpression.build(), this.disjunctionExpression.build());
    };
    /**
     * Return only the expression(s) part(s) of the query, as a string, except the given expression.
     *
     * This is used by {@link Facet}, to build their group by request with query override.
     * @param except
     * @returns {string}
     */
    QueryBuilder.prototype.computeCompleteExpressionExcept = function (except) {
        return this.computeCompleteExpressionPartsExcept(except).full;
    };
    /**
     * Return only the expression(s) part(s) of the query, as an object, except the given expression.
     *
     * This is used by {@link Facet}, to build their group by request with query override.
     * @param except
     * @returns {{full: string, withoutConstant: string, constant: string}}
     */
    QueryBuilder.prototype.computeCompleteExpressionPartsExcept = function (except) {
        var withoutConstantAndExcept = ExpressionBuilder_1.ExpressionBuilder.merge(this.expression, this.advancedExpression);
        withoutConstantAndExcept.remove(except);
        var basicWithoutException = new ExpressionBuilder_1.ExpressionBuilder();
        basicWithoutException.fromExpressionBuilder(this.expression);
        basicWithoutException.remove(except);
        var advancedWithoutException = new ExpressionBuilder_1.ExpressionBuilder();
        advancedWithoutException.fromExpressionBuilder(this.advancedExpression);
        advancedWithoutException.remove(except);
        var constantWithoutException = new ExpressionBuilder_1.ExpressionBuilder();
        constantWithoutException.fromExpressionBuilder(this.constantExpression);
        constantWithoutException.remove(except);
        var disjunctionWithoutException = new ExpressionBuilder_1.ExpressionBuilder();
        disjunctionWithoutException.fromExpressionBuilder(this.disjunctionExpression);
        disjunctionWithoutException.remove(except);
        return new QueryBuilderExpression_1.QueryBuilderExpression(basicWithoutException.build(), advancedWithoutException.build(), constantWithoutException.build(), disjunctionWithoutException.build());
    };
    /**
     * Add fields to specifically include when the results return.
     *
     * This can be used to accelerate the execution time of every query, as there is much less data to process if you whitelist specific fields.
     * @param fields
     */
    QueryBuilder.prototype.addFieldsToInclude = function (fields) {
        this.fieldsToInclude = _.uniq((this.fieldsToInclude || []).concat(fields));
    };
    QueryBuilder.prototype.addRequiredFields = function (fields) {
        this.requiredFields = _.uniq(this.requiredFields.concat(fields));
    };
    /**
     * Add fields to specifically exclude when the results return.
     *
     * This can be used to accelerate the execution time of every query, as there is much less data to process if you blacklist specific fields.
     * @param fields
     */
    QueryBuilder.prototype.addFieldsToExclude = function (fields) {
        this.fieldsToExclude = _.uniq((this.fieldsToInclude || []).concat(fields));
    };
    QueryBuilder.prototype.computeFieldsToInclude = function () {
        if (this.includeRequiredFields || this.fieldsToInclude != null) {
            return _.uniq(this.requiredFields.concat(this.fieldsToInclude || []));
        }
        else {
            return null;
        }
    };
    /**
     * Adds or updates a single context key-value pair in the `context` object.
     *
     * @param key The context key. If this key is already present in the `context` object, its value is updated.
     * @param value The context value. This should be a string or an array of strings.
     */
    QueryBuilder.prototype.addContextValue = function (key, value) {
        if (this.context == null) {
            this.context = {};
        }
        this.context[key] = value;
    };
    /**
     * Merges the specified `values` into the `context` object.
     *
     * @param values The object to merge into the `context` object. Can contain multiple key-value pairs, where each value should be a string or an array of strings. If some keys are already present in the `context` object, their values are updated.
     */
    QueryBuilder.prototype.addContext = function (values) {
        if (this.context == null) {
            this.context = {};
        }
        _.extend(this.context, values);
    };
    /**
     * Returns true if the current query contains any expression that are considered "end user input".
     *
     * This usually means anything entered in the basic (see [q]{@link IQuery.options.q}) or long (see [lq]{@link IQuery.options.lq}) part of the query.
     */
    QueryBuilder.prototype.containsEndUserKeywords = function () {
        var query = this.build();
        return Utils_1.Utils.isNonEmptyString(query.q) || Utils_1.Utils.isNonEmptyString(query.lq);
    };
    Object.defineProperty(QueryBuilder.prototype, "groupBy", {
        get: function () {
            if (Utils_1.Utils.isEmptyArray(this.groupByRequests)) {
                return undefined;
            }
            return this.groupByRequests;
        },
        set: function (groupBy) {
            this.groupByRequests = groupBy;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilder.prototype, "facets", {
        get: function () {
            if (Utils_1.Utils.isEmptyArray(this.facetRequests)) {
                return undefined;
            }
            return this.facetRequests;
        },
        set: function (facets) {
            this.facetRequests = facets;
        },
        enumerable: true,
        configurable: true
    });
    return QueryBuilder;
}());
exports.QueryBuilder = QueryBuilder;


/***/ }),
/* 50 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var Core_1 = __webpack_require__(20);
var CookieAndLocalStorageUtils_1 = __webpack_require__(326);
var CookieUtils_1 = __webpack_require__(92);
var HistoryStore_1 = __webpack_require__(89);
var AnalyticsInformation = /** @class */ (function () {
    function AnalyticsInformation() {
        this.visitorIdKey = 'visitorId';
        this.clientIdKey = 'clientId';
        this.storage = new CookieAndLocalStorageUtils_1.CookieAndLocalStorage();
    }
    Object.defineProperty(AnalyticsInformation.prototype, "clientId", {
        get: function () {
            // Yes, its backwards: We are using a key named "visitorId" to fetched something for "clientId"
            // This is done to synchronize with https://github.com/coveo/coveo.analytics.js
            // This is intentional.
            return this.storage.getItem(this.visitorIdKey) || null;
        },
        set: function (id) {
            this.storage.setItem(this.visitorIdKey, id);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AnalyticsInformation.prototype, "lastPageId", {
        get: function () {
            var store = HistoryStore_1.buildHistoryStore();
            var actions = store.getHistory();
            var pageViewActionId = underscore_1.findLastIndex(actions, function (action) { return action.name === 'PageView'; });
            if (pageViewActionId === -1) {
                return null;
            }
            return actions[pageViewActionId].value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AnalyticsInformation.prototype, "location", {
        get: function () {
            return document.location.href;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AnalyticsInformation.prototype, "referrer", {
        get: function () {
            return document.referrer;
        },
        enumerable: true,
        configurable: true
    });
    AnalyticsInformation.prototype.clear = function () {
        this.clearVisitorId();
        this.clearClientId();
    };
    AnalyticsInformation.prototype.clearVisitorId = function () {
        this.storage.removeItem(this.visitorIdKey);
    };
    AnalyticsInformation.prototype.clearClientId = function () {
        new Core_1.LocalStorageUtils(this.clientIdKey).remove();
        CookieUtils_1.ScopedCookie.erase(this.clientIdKey);
    };
    return AnalyticsInformation;
}());
exports.AnalyticsInformation = AnalyticsInformation;


/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptionsType;
(function (ComponentOptionsType) {
    ComponentOptionsType[ComponentOptionsType["BOOLEAN"] = 0] = "BOOLEAN";
    ComponentOptionsType[ComponentOptionsType["NUMBER"] = 1] = "NUMBER";
    ComponentOptionsType[ComponentOptionsType["STRING"] = 2] = "STRING";
    ComponentOptionsType[ComponentOptionsType["LOCALIZED_STRING"] = 3] = "LOCALIZED_STRING";
    ComponentOptionsType[ComponentOptionsType["LIST"] = 4] = "LIST";
    ComponentOptionsType[ComponentOptionsType["SELECTOR"] = 5] = "SELECTOR";
    ComponentOptionsType[ComponentOptionsType["CHILD_HTML_ELEMENT"] = 6] = "CHILD_HTML_ELEMENT";
    ComponentOptionsType[ComponentOptionsType["TEMPLATE"] = 7] = "TEMPLATE";
    ComponentOptionsType[ComponentOptionsType["FIELD"] = 8] = "FIELD";
    ComponentOptionsType[ComponentOptionsType["FIELDS"] = 9] = "FIELDS";
    ComponentOptionsType[ComponentOptionsType["ICON"] = 10] = "ICON";
    ComponentOptionsType[ComponentOptionsType["COLOR"] = 11] = "COLOR";
    ComponentOptionsType[ComponentOptionsType["OBJECT"] = 12] = "OBJECT";
    ComponentOptionsType[ComponentOptionsType["QUERY"] = 13] = "QUERY";
    ComponentOptionsType[ComponentOptionsType["HELPER"] = 14] = "HELPER";
    ComponentOptionsType[ComponentOptionsType["LONG_STRING"] = 15] = "LONG_STRING";
    ComponentOptionsType[ComponentOptionsType["JSON"] = 16] = "JSON";
    ComponentOptionsType[ComponentOptionsType["JAVASCRIPT"] = 17] = "JAVASCRIPT";
    ComponentOptionsType[ComponentOptionsType["NONE"] = 18] = "NONE";
    ComponentOptionsType[ComponentOptionsType["QUERY_EXPRESSION"] = 19] = "QUERY_EXPRESSION";
})(ComponentOptionsType = exports.ComponentOptionsType || (exports.ComponentOptionsType = {}));


/***/ }),
/* 52 */,
/* 53 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var EndpointCaller_1 = __webpack_require__(91);
var Logger_1 = __webpack_require__(9);
var Assert_1 = __webpack_require__(5);
var Version_1 = __webpack_require__(104);
var AjaxError_1 = __webpack_require__(308);
var MissingAuthenticationError_1 = __webpack_require__(309);
var QueryUtils_1 = __webpack_require__(21);
var QueryError_1 = __webpack_require__(145);
var Utils_1 = __webpack_require__(4);
var _ = __webpack_require__(0);
var HistoryStore_1 = __webpack_require__(89);
var TimeSpanUtils_1 = __webpack_require__(73);
var UrlUtils_1 = __webpack_require__(43);
var AccessToken_1 = __webpack_require__(149);
var BackOffRequest_1 = __webpack_require__(317);
var Plan_1 = __webpack_require__(325);
var underscore_1 = __webpack_require__(0);
var AnalyticsInformation_1 = __webpack_require__(50);
var DefaultSearchEndpointOptions = /** @class */ (function () {
    function DefaultSearchEndpointOptions() {
        this.version = 'v2';
        this.queryStringArguments = {};
        this.anonymous = false;
        this.isGuestUser = false;
    }
    return DefaultSearchEndpointOptions;
}());
exports.DefaultSearchEndpointOptions = DefaultSearchEndpointOptions;
/**
 * The `SearchEndpoint` class allows the framework to perform HTTP requests against the Search API (e.g., searching, getting query suggestions, getting the HTML preview of an item, etc.).
 *
 * **Note:**
 *
 * When writing custom code that interacts with the Search API, be aware that executing queries directly through an instance of this class will *not* trigger any [query events](https://docs.coveo.com/en/417/#query-events).
 *
 * In some cases, this may be what you want. However, if you *do* want query events to be triggered (e.g., to ensure that standard components update themselves as expected), use the [`queryController`]{@link QueryController} instance instead.
 *
 * @externaldocs [JavaScript Search Framework Endpoint](https://docs.coveo.com/en/331/)
 */
var SearchEndpoint = /** @class */ (function () {
    /**
     * Creates a new `SearchEndpoint` instance.
     * Uses a set of adequate default options, and merges these with the `options` parameter.
     * Also creates an [`EndpointCaller`]{@link EndpointCaller} instance and uses it to communicate with the endpoint
     * internally.
     * @param options The custom options to apply to the new `SearchEndpoint`.
     */
    function SearchEndpoint(options) {
        var _this = this;
        this.options = options;
        Assert_1.Assert.exists(options);
        Assert_1.Assert.exists(options.restUri);
        // For backward compatibility, we set anonymous to true when an access token
        // is specified on a page loaded through the filesystem. This causes withCredentials
        // to NOT be set, allowing those pages to work with non Windows/Basic/Cookie
        // authentication. If anonymous is explicitly set to false, we'll use withCredentials.
        var defaultOptions = new DefaultSearchEndpointOptions();
        defaultOptions.anonymous = window.location.href.indexOf('file://') == 0 && Utils_1.Utils.isNonEmptyString(options.accessToken);
        this.options = _.extend({}, defaultOptions, options);
        this.accessToken = new AccessToken_1.AccessToken(this.options.accessToken, this.options.renewAccessToken);
        this.accessToken.subscribeToRenewal(function () { return _this.createEndpointCaller(); });
        // Forward any debug=1 query argument to the REST API to ease debugging
        if (SearchEndpoint.isDebugArgumentPresent()) {
            this.options.queryStringArguments['debug'] = 1;
        }
        this.onUnload = function () {
            _this.handleUnload();
        };
        window.addEventListener('beforeunload', this.onUnload);
        this.logger = new Logger_1.Logger(this);
        this.createEndpointCaller();
    }
    /**
     * Configures a demo search endpoint on a Coveo Cloud V1 organization whose index contains various types of non-secured items.
     *
     * **Note:** This method mainly exists for demo and testing purposes.
     *
     * @param otherOptions Additional options to apply for this endpoint.
     */
    SearchEndpoint.configureSampleEndpoint = function (otherOptions) {
        if (SearchEndpoint.isUseLocalArgumentPresent()) {
            // This is a handy flag to quickly test a local search API and alerts
            SearchEndpoint.endpoints['default'] = new SearchEndpoint(_.extend({
                restUri: 'http://localhost:8100/rest/search',
                searchAlertsUri: 'http://localhost:8088/rest/search/alerts/'
            }, otherOptions));
        }
        else {
            // This OAuth token points to the organization used for samples.
            // It contains a set of harmless content sources.
            SearchEndpoint.endpoints['default'] = new SearchEndpoint(_.extend({
                restUri: 'https://cloudplatform.coveo.com/rest/search',
                accessToken: '52d806a2-0f64-4390-a3f2-e0f41a4a73ec'
            }, otherOptions));
        }
    };
    /**
     * Configures a demo search endpoint on a Coveo Cloud V2 organization whose index contains various types of non-secured items.
     *
     * **Note:** This method mainly exists for demo and testing purposes.
     *
     * @param otherOptions Additional options to apply for this endpoint.
     */
    SearchEndpoint.configureSampleEndpointV2 = function (otherOptions) {
        SearchEndpoint.endpoints['default'] = new SearchEndpoint(_.extend({
            restUri: 'https://platform.cloud.coveo.com/rest/search',
            accessToken: 'xx564559b1-0045-48e1-953c-3addd1ee4457',
            queryStringArguments: {
                organizationId: 'searchuisamples',
                viewAllContent: 1
            }
        }, otherOptions));
    };
    /**
     * Configures a search endpoint on a Coveo Cloud V1 index.
     * @param organization The organization ID of your Coveo Cloud index.
     * @param token The token to use to execute query. If not specified, you will likely need to login when querying.
     * @param uri The URI of the Coveo Cloud REST Search API. By default, this points to the production environment.
     * @param otherOptions A set of additional options to use when configuring this endpoint.
     */
    SearchEndpoint.configureCloudEndpoint = function (organization, token, uri, otherOptions) {
        if (uri === void 0) { uri = 'https://cloudplatform.coveo.com/rest/search'; }
        var options = {
            restUri: uri,
            accessToken: token,
            queryStringArguments: { organizationId: organization }
        };
        var merged = SearchEndpoint.mergeConfigOptions(options, otherOptions);
        SearchEndpoint.endpoints['default'] = new SearchEndpoint(SearchEndpoint.removeUndefinedConfigOption(merged));
    };
    /**
     * [Configures a new search endpoint](https://docs.coveo.com/331/#configuring-a-new-search-endpoint) on a Coveo Cloud V2 organization.
     * @param organization The unique identifier of the target Coveo Cloud V2 organization (e.g., `mycoveocloudv2organizationg8tp8wu3`).
     * @param token The access token to authenticate Search API requests with (i.e., an [API key](https://docs.coveo.com/105/) or a [search token](https://docs.coveo.com/56/)).
     *
     * **Note:** This token will also authenticate Usage Analytics Write API requests if the search interface initializes an [`Analytics`]{@link Analytics} component whose [`token`]{@link Analytics.options.token} option is unspecified.
     * @param uri The base URI of the Search API.
     *
     * **Allowed values:**
     *
     * - `https://platform.cloud.coveo.com/rest/search` (for organizations in the standard Coveo Cloud V2 environment)
     * - `https://platform-eu.cloud.coveo.com/rest/search` (for organizations with European [data residency](https://docs.coveo.com/en/2976/#data-residency-configuration))
     * - `https://platform-au.cloud.coveo.com/rest/search` (for organizations with Australian data residency)
     * - `https://platformhipaa.cloud.coveo.com/rest/search` (for [HIPAA](https://docs.coveo.com/1853/) organizations)
     *
     * **Default:** `https://platform.cloud.coveo.com/rest/search`
     * @param otherOptions Additional options to apply for this endpoint (e.g., a [`renewAccessToken`]{@link ISearchEndpointOptions.renewAccessToken} function).
     */
    SearchEndpoint.configureCloudV2Endpoint = function (organization, token, uri, otherOptions) {
        if (uri === void 0) { uri = 'https://platform.cloud.coveo.com/rest/search'; }
        return SearchEndpoint.configureCloudEndpoint(organization, token, uri, otherOptions);
    };
    /**
     * Configures a search endpoint on a Coveo on-premise index.
     * @param uri The URI of your Coveo Search API endpoint (e.g., `http://myserver:8080/rest/search`)
     * @param token The token to use to execute query. If not specified, you will likely need to login when querying
     * (unless your Coveo Search API endpoint is configured using advanced auth options, such as Windows auth or claims).
     * @param otherOptions A set of additional options to use when configuring this endpoint.
     */
    SearchEndpoint.configureOnPremiseEndpoint = function (uri, token, otherOptions) {
        var merged = SearchEndpoint.mergeConfigOptions({
            restUri: uri,
            accessToken: token
        }, otherOptions);
        SearchEndpoint.endpoints['default'] = new SearchEndpoint(SearchEndpoint.removeUndefinedConfigOption(merged));
    };
    Object.defineProperty(SearchEndpoint, "defaultEndpoint", {
        get: function () {
            return this.endpoints['default'] || _.find(SearchEndpoint.endpoints, function (endpoint) { return endpoint != null; });
        },
        enumerable: true,
        configurable: true
    });
    SearchEndpoint.removeUndefinedConfigOption = function (config) {
        _.each(_.keys(config), function (key) {
            if (config[key] == undefined) {
                delete config[key];
            }
        });
        return config;
    };
    SearchEndpoint.mergeConfigOptions = function (first, second) {
        first = SearchEndpoint.removeUndefinedConfigOption(first);
        second = SearchEndpoint.removeUndefinedConfigOption(second);
        return _.extend({}, first, second);
    };
    SearchEndpoint.prototype.reset = function () {
        this.createEndpointCaller();
    };
    /**
     * Sets a function which allows external code to modify all endpoint call parameters before the browser sends them.
     *
     * **Note:**
     * > This is useful in very specific scenarios where the network infrastructure requires special request headers to be
     * > added or removed, for example.
     * @param requestModifier The function.
     */
    SearchEndpoint.prototype.setRequestModifier = function (requestModifier) {
        this.caller.options.requestModifier = requestModifier;
    };
    /**
     * Gets the base URI of the Search API endpoint.
     * @returns {string} The base URI of the Search API endpoint.
     */
    SearchEndpoint.prototype.getBaseUri = function () {
        return this.buildBaseUri('');
    };
    /**
     * Gets the base URI of the search alerts endpoint.
     * @returns {string} The base URI of the search alerts endpoint.
     */
    SearchEndpoint.prototype.getBaseAlertsUri = function () {
        return this.buildSearchAlertsUri('');
    };
    /**
     * Gets the URI that can be used to authenticate against the given provider.
     * @param provider The provider name.
     * @param returnUri The URI to return to after the authentication is completed.
     * @param message The authentication message.
     * @param callOptions Additional set of options to use for this call.
     * @param callParams Options injected by the applied decorators.
     * @returns {string} The authentication provider URI.
     */
    SearchEndpoint.prototype.getAuthenticationProviderUri = function (provider, returnUri, message, callOptions, callParams) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [callParams.url, provider],
            queryAsString: callParams.queryString,
            query: __assign({ redirectUri: returnUri, message: message }, this.buildBaseQueryString(callOptions))
        });
    };
    /**
     * Exchanges a temporary handshake token to either get an initial access token
     * or extend the privileges of an existing access token.
     *
     * @param token - the temporary token.
     * @returns {string} The access token.
     */
    SearchEndpoint.prototype.exchangeHandshakeToken = function (options, callOptions, callParams) {
        return __awaiter(this, void 0, void 0, function () {
            var call, data;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        call = this.buildCompleteCall(options, callOptions, callParams);
                        return [4 /*yield*/, this.performOneCall(call.params, call.options)];
                    case 1:
                        data = _a.sent();
                        if (!data.token) {
                            throw new Error('Failed to exchange handshake token.');
                        }
                        return [2 /*return*/, data.token];
                }
            });
        });
    };
    /**
     * Indicates whether the search endpoint is using JSONP internally to communicate with the Search API.
     * @returns {boolean} `true` in the search enpoint is using JSONP; `false` otherwise.
     */
    SearchEndpoint.prototype.isJsonp = function () {
        return this.caller.useJsonp;
    };
    SearchEndpoint.prototype.buildCompleteCall = function (request, callOptions, callParams) {
        Assert_1.Assert.exists(request);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, _.omit(request, function (queryParam) { return Utils_1.Utils.isNullOrUndefined(queryParam); })) });
        return { options: callOptions, params: callParams };
    };
    /**
     * Performs a search on the index and returns a Promise of [`IQueryResults`]{@link IQueryResults}.
     *
     * This method slightly modifies the query results by adding additional information to each result (id, state object,
     * etc.).
     * @param query The query to execute. Typically, the query object is built using a
     * [`QueryBuilder`]{@link QueryBuilder}.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IQueryResults>} A Promise of query results.
     */
    SearchEndpoint.prototype.search = function (query, callOptions, callParams) {
        var _this = this;
        var call = this.buildCompleteCall(query, callOptions, callParams);
        this.logger.info('Performing REST query', query);
        var start = new Date();
        return this.performOneCall(call.params, call.options).then(function (results) {
            _this.logger.info('REST query successful', results, query);
            // Version check
            // If the SearchAPI doesn't give us any apiVersion info, we assume version 1 (before apiVersion was implemented)
            if (results.apiVersion == null) {
                results.apiVersion = 1;
            }
            if (results.apiVersion < Version_1.version.supportedApiVersion) {
                _this.logger.error('Please update your REST Search API');
            }
            // Transform the duration compared to what the search API returns
            // We want to have the "duration" to be the time as seen by the browser
            results.searchAPIDuration = results.duration;
            results.duration = TimeSpanUtils_1.TimeSpan.fromDates(start, new Date()).getMilliseconds();
            // If the server specified no search ID generated one using the client-side
            // GUID generator. We prefer server generated guids to allow tracking a query
            // all the way from the analytics to the logs.
            if (Utils_1.Utils.isNullOrEmptyString(results.searchUid)) {
                results.searchUid = QueryUtils_1.QueryUtils.createGuid();
            }
            QueryUtils_1.QueryUtils.setIndexAndUidOnQueryResults(query, results, results.searchUid, results.pipeline, results.splitTestRun);
            QueryUtils_1.QueryUtils.setTermsToHighlightOnQueryResults(query, results);
            return results;
        });
    };
    /**
     * Performs a search on the index and returns a Promise of `ArrayBuffer`.
     *
     * @param query The query to execute. Typically, the query object is built using a
     * [`QueryBuilder`]{@link QueryBuilder}.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ArrayBuffer>} A Promise of query results.
     */
    SearchEndpoint.prototype.fetchBinary = function (query, callOptions, callParams) {
        return __awaiter(this, void 0, void 0, function () {
            var call;
            return __generator(this, function (_a) {
                call = this.buildCompleteCall(query, callOptions, callParams);
                this.logger.info('Performing REST query', query);
                return [2 /*return*/, this.performOneCall(call.params, call.options)];
            });
        });
    };
    /**
     * Gets the plan of execution of a search request, without performing it.
     *
     * @param query The query to execute. Typically, the query object is built using a
     * [`QueryBuilder`]{@link QueryBuilder}.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ExecutionPlan>} A Promise of plan results.
     */
    SearchEndpoint.prototype.plan = function (query, callOptions, callParams) {
        return __awaiter(this, void 0, void 0, function () {
            var call, planResponse;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        call = this.buildCompleteCall(query, callOptions, callParams);
                        this.logger.info('Performing REST query PLAN', query);
                        return [4 /*yield*/, this.performOneCall(call.params, call.options)];
                    case 1:
                        planResponse = _a.sent();
                        this.logger.info('REST query successful', planResponse, query);
                        return [2 /*return*/, new Plan_1.ExecutionPlan(planResponse)];
                }
            });
        });
    };
    /**
     * @deprecated getExportToExcelLink does not factor in all query parameters (e.g. dynamic facets) due to GET request url length limitations.
     * Please use `fetchBinary` instead to ensure all query parameters are used.
     *
     * Gets a link / URI to download a query result set to the XLSX format.
     *
     * **Note:**
     * > This method does not automatically download the query result set, but rather provides an URI from which to
     * > download it.
     * @param query The query for which to get the XLSX result set.
     * @param numberOfResults The number of results to download.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {string} The download URI.
     */
    SearchEndpoint.prototype.getExportToExcelLink = function (query, numberOfResults, callOptions, callParams) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({ numberOfResults: numberOfResults ? numberOfResults.toString() : null, format: 'xlsx' }, this.buildQueryAsQueryString(null, query), this.buildBaseQueryString(callOptions))
        });
    };
    /**
     * Gets the raw datastream for an item. This is typically used to get a thumbnail for an item.
     *
     * Returns an array buffer.
     *
     * **Example:**
     * ```
     * let rawBinary = String.fromCharCode.apply(null, new Uint8Array(response));
     * img.setAttribute('src', 'data:image/png;base64,' + btoa(rawBinary));
     * ```
     * @param documentUniqueId Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param dataStreamType Normally, `$Thumbnail`.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<TResult>|Promise<U>}
     */
    SearchEndpoint.prototype.getRawDataStream = function (documentUniqueId, dataStreamType, callOptions, callParams) {
        var _this = this;
        Assert_1.Assert.exists(documentUniqueId);
        callParams = UrlUtils_1.UrlUtils.merge(callParams, {
            paths: callParams.url,
            query: __assign({ dataStream: dataStreamType }, this.buildViewAsHtmlQueryString(documentUniqueId, callOptions))
        });
        this.logger.info('Performing REST query for datastream ' + dataStreamType + ' on item uniqueID ' + documentUniqueId);
        return this.performOneCall(callParams, callOptions).then(function (results) {
            _this.logger.info('REST query successful', results, documentUniqueId);
            return results;
        });
    };
    /**
     * Gets an URL from which it is possible to see the datastream for an item. This is typically used to get a
     * thumbnail for an item.
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param dataStreamType Normally, `$Thumbnail`.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {string} The datastream URL.
     */
    SearchEndpoint.prototype.getViewAsDatastreamUri = function (documentUniqueID, dataStreamType, callOptions, callParams) {
        if (callOptions === void 0) { callOptions = {}; }
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({ dataStream: dataStreamType }, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions), this.buildQueryAsQueryString(callOptions.query, callOptions.queryObject), this.buildBaseQueryString(callOptions))
        });
    };
    /**
     * Gets a single item, using its `uniqueId`.
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IQueryResult>} A Promise of the item.
     */
    SearchEndpoint.prototype.getDocument = function (documentUniqueID, callOptions, callParams) {
        var _this = this;
        callParams = UrlUtils_1.UrlUtils.merge(callParams, {
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({}, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions))
        });
        this.logger.info('Performing REST query to retrieve document', documentUniqueID);
        return this.performOneCall(callParams, callOptions).then(function (result) {
            _this.logger.info('REST query successful', result, documentUniqueID);
            return result;
        });
    };
    /**
     * Gets the content of a single item, as text (think: quickview).
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<string>} A Promise of the item content.
     */
    SearchEndpoint.prototype.getDocumentText = function (documentUniqueID, callOptions, callParams) {
        var _this = this;
        callParams = UrlUtils_1.UrlUtils.merge(callParams, {
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({}, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions))
        });
        this.logger.info('Performing REST query to retrieve "TEXT" version of document', documentUniqueID);
        return this.performOneCall(callParams, callOptions).then(function (data) {
            _this.logger.info('REST query successful', data, documentUniqueID);
            return data.content;
        });
    };
    /**
     * Gets the content for a single item, as an HTMLDocument (think: quickview).
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<HTMLDocument>} A Promise of the item content.
     */
    SearchEndpoint.prototype.getDocumentHtml = function (documentUniqueID, callOptions, callParams) {
        var _this = this;
        callOptions = __assign({}, callOptions);
        callParams = UrlUtils_1.UrlUtils.merge(__assign({}, callParams, { requestData: callOptions.queryObject || { q: callOptions.query } }), {
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({}, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions))
        });
        this.logger.info('Performing REST query to retrieve "HTML" version of document', documentUniqueID);
        return this.performOneCall(callParams, callOptions).then(function (result) {
            _this.logger.info('REST query successful', result, documentUniqueID);
            return result;
        });
    };
    /**
     * Gets an URL from which it is possible to see a single item content, as HTML (think: quickview).
     * @param documentUniqueID Typically, the {@link IQueryResult.uniqueId} on each result.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {string} The URL.
     */
    SearchEndpoint.prototype.getViewAsHtmlUri = function (documentUniqueID, callOptions, callParams) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: callParams.url,
            queryAsString: callParams.queryString,
            query: __assign({}, this.buildViewAsHtmlQueryString(documentUniqueID, callOptions), this.buildBaseQueryString(callOptions))
        });
    };
    /**
     * Lists the possible field values for a request.
     * @param request The request for which to list the possible field values.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<TResult>|Promise<U>} A Promise of the field values.
     */
    SearchEndpoint.prototype.listFieldValues = function (request, callOptions, callParams) {
        var _this = this;
        Assert_1.Assert.exists(request);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, request) });
        this.logger.info('Listing field values', request);
        return this.performOneCall(callParams, callOptions).then(function (data) {
            _this.logger.info('REST list field values successful', data.values, request);
            return data.values;
        });
    };
    /**
     * Lists the possible field values for a request.
     * @param request The request for which to list the possible field values.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<TResult>|Promise<U>} A Promise of the field values.
     */
    SearchEndpoint.prototype.listFieldValuesBatch = function (request, callOptions, callParams) {
        var _this = this;
        Assert_1.Assert.exists(request);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, request) });
        this.logger.info('Listing field batch values', request);
        return this.performOneCall(callParams, callOptions).then(function (data) {
            _this.logger.info('REST list field batch values successful', data.batch, request);
            return data.batch;
        });
    };
    /**
     * Lists all fields for the index, and returns an array of their descriptions.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<TResult>|Promise<U>} A Promise of the index fields and descriptions.
     */
    SearchEndpoint.prototype.listFields = function (callOptions, callParams) {
        var _this = this;
        this.logger.info('Listing fields');
        return this.performOneCall(callParams, callOptions).then(function (data) {
            _this.logger.info('REST list fields successful', data.fields);
            return data.fields;
        });
    };
    /**
     * Lists all available query extensions for the search endpoint.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IExtension[]>} A Promise of the extensions.
     */
    SearchEndpoint.prototype.extensions = function (callOptions, callParams) {
        var _this = this;
        this.logger.info('Performing REST query to list extensions');
        return this.performOneCall(callParams, callOptions).then(function (extensions) {
            _this.logger.info('REST query successful', extensions);
            return extensions;
        });
    };
    /**
     * **Note:**
     *
     * > The Coveo Cloud V2 platform does not support collaborative rating. Therefore, this method is obsolete in Coveo Cloud V2.
     *
     * Rates a single item in the index (granted that collaborative rating is enabled on your index)
     * @param ratingRequest The item id, and the rating to add.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<boolean>|Promise<T>}
     */
    SearchEndpoint.prototype.rateDocument = function (ratingRequest, callOptions, callParams) {
        var _this = this;
        this.logger.info('Performing REST query to rate a document', ratingRequest);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, ratingRequest) });
        return this.performOneCall(callParams, callOptions).then(function () {
            _this.logger.info('REST query successful', ratingRequest);
            return true;
        });
    };
    /**
     * Tags a single item.
     * @param taggingRequest The item id, and the tag action to perform.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<boolean>|Promise<T>}
     */
    SearchEndpoint.prototype.tagDocument = function (taggingRequest, callOptions, callParams) {
        var _this = this;
        this.logger.info('Performing REST query to tag an item', taggingRequest);
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, taggingRequest) });
        return this.performOneCall(callParams, callOptions).then(function () {
            _this.logger.info('REST query successful', taggingRequest);
            return true;
        });
    };
    /**
     * Gets a list of query suggestions for a request.
     * @param request The query, and the number of suggestions to return.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IQuerySuggestResponse>} A Promise of query suggestions.
     */
    SearchEndpoint.prototype.getQuerySuggest = function (request, callOptions, callParams) {
        var _this = this;
        var call = this.buildCompleteCall(request, callOptions, callParams);
        this.logger.info('Performing REST query to get query suggest', request);
        return this.performOneCall(call.params, call.options).then(function (response) {
            _this.logger.info('REST query successful', response);
            return response;
        });
    };
    // This is a non documented method to ensure backward compatibility for the old query suggest call.
    // It simply calls the "real" official and documented method.
    SearchEndpoint.prototype.getRevealQuerySuggest = function (request, callOptions, callParams) {
        return this.getQuerySuggest(request, callOptions, callParams);
    };
    /**
     * Searches through the values of a facet.
     * @param request The request for which to search through the values of a facet.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<IFacetSearchResponse>} A Promise of facet search results.
     */
    SearchEndpoint.prototype.facetSearch = function (request, callOptions, callParams) {
        return __awaiter(this, void 0, void 0, function () {
            var call, response;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        call = this.buildCompleteCall(request, callOptions, callParams);
                        this.logger.info('Performing REST query to get facet search results', request);
                        return [4 /*yield*/, this.performOneCall(call.params, call.options)];
                    case 1:
                        response = _a.sent();
                        this.logger.info('REST query successful', response);
                        return [2 /*return*/, response];
                }
            });
        });
    };
    /**
     * Follows an item, or a query result, using the search alerts service.
     * @param request The subscription details.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ISubscription>}
     */
    SearchEndpoint.prototype.follow = function (request, callOptions, callParams) {
        var _this = this;
        callParams.requestData = request;
        this.logger.info('Performing REST query to follow an item or a query', request);
        return this.performOneCall(callParams, callOptions).then(function (subscription) {
            _this.logger.info('REST query successful', subscription);
            return subscription;
        });
    };
    /**
     * Gets a Promise of an array of the current subscriptions.
     * @param page The page of the subscriptions.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {any}
     */
    SearchEndpoint.prototype.listSubscriptions = function (page, callOptions, callParams) {
        var _this = this;
        if (this.options.isGuestUser) {
            return new Promise(function (resolve, reject) {
                reject();
            });
        }
        if (this.currentListSubscriptions == null) {
            callParams = UrlUtils_1.UrlUtils.merge(callParams, {
                paths: callParams.url,
                query: {
                    page: page || 0
                }
            });
            this.logger.info('Performing REST query to list subscriptions');
            this.currentListSubscriptions = this.performOneCall(callParams, callOptions);
            this.currentListSubscriptions
                .then(function (data) {
                _this.currentListSubscriptions = null;
                _this.logger.info('REST query successful', data);
                return data;
            })
                .catch(function (e) {
                // Trap 403 error, as the listSubscription call is called on every page initialization
                // to check for current subscriptions. By default, the search alert service is not enabled for most organization
                // Don't want to pollute the console with un-needed noise and confusion
                if (e.status != 403) {
                    throw e;
                }
            });
        }
        return this.currentListSubscriptions;
    };
    /**
     * Updates a subscription with new parameters.
     * @param subscription The subscription to update with new parameters.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ISubscription>}
     */
    SearchEndpoint.prototype.updateSubscription = function (subscription, callOptions, callParams) {
        var _this = this;
        callParams = UrlUtils_1.UrlUtils.merge(__assign({}, callParams, { requestData: __assign({}, callParams.requestData, subscription) }), {
            paths: [callParams.url, subscription.id]
        });
        this.logger.info('Performing REST query to update a subscription', subscription);
        return this.performOneCall(callParams, callOptions).then(function (subscription) {
            _this.logger.info('REST query successful', subscription);
            return subscription;
        });
    };
    /**
     * Deletes a subscription.
     * @param subscription The subscription to delete.
     * @param callOptions An additional set of options to use for this call.
     * @param callParams The options injected by the applied decorators.
     * @returns {Promise<ISubscription>}
     */
    SearchEndpoint.prototype.deleteSubscription = function (subscription, callOptions, callParams) {
        var _this = this;
        callParams = UrlUtils_1.UrlUtils.merge(callParams, {
            paths: [callParams.url, subscription.id]
        });
        this.logger.info('Performing REST query to delete a subscription', subscription);
        return this.performOneCall(callParams, callOptions).then(function (subscription) {
            _this.logger.info('REST query successful', subscription);
            return subscription;
        });
    };
    SearchEndpoint.prototype.logError = function (sentryLog, callOptions, callParams) {
        callParams = __assign({}, callParams, { requestData: __assign({}, callParams.requestData, sentryLog) });
        return this.performOneCall(callParams, callOptions)
            .then(function () {
            return true;
        })
            .catch(function () {
            return false;
        });
    };
    SearchEndpoint.prototype.nuke = function () {
        window.removeEventListener('beforeunload', this.onUnload);
    };
    SearchEndpoint.prototype.createEndpointCaller = function () {
        this.caller = new EndpointCaller_1.EndpointCaller(__assign({}, this.options, { accessToken: this.accessToken.token }));
    };
    SearchEndpoint.isDebugArgumentPresent = function () {
        return /[?&]debug=1([&]|$)/.test(window.location.search);
    };
    SearchEndpoint.isUseLocalArgumentPresent = function () {
        return /[?&]useLocal=1([&]|$)/.test(window.location.search);
    };
    SearchEndpoint.prototype.handleUnload = function () {
        this.isRedirecting = true;
    };
    SearchEndpoint.prototype.buildBaseUri = function (path) {
        Assert_1.Assert.isString(path);
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [this.options.restUri, this.options.version, path]
        });
    };
    SearchEndpoint.prototype.buildSearchAlertsUri = function (path) {
        Assert_1.Assert.isString(path);
        var baseUrl = this.options.searchAlertsUri ||
            UrlUtils_1.UrlUtils.normalizeAsString({
                paths: [this.options.restUri, '/alerts']
            });
        var url = UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [baseUrl, path]
        });
        return url;
    };
    SearchEndpoint.prototype.buildBaseQueryString = function (callOptions) {
        callOptions = __assign({}, callOptions);
        if (_.isArray(callOptions.authentication) && Utils_1.Utils.isNonEmptyArray(callOptions.authentication)) {
            return __assign({}, this.options.queryStringArguments, { authentication: callOptions.authentication.join(',') });
        }
        else {
            return __assign({}, this.options.queryStringArguments);
        }
    };
    SearchEndpoint.prototype.buildQueryAsQueryString = function (query, queryObject) {
        queryObject = __assign({}, queryObject);
        // In an ideal parallel reality, the entire query used in the 'search' call is used here.
        // In this reality however, we must support GET calls (ex: GET /html) for CORS/JSONP/IE reasons.
        // Therefore, we cherry-pick parts of the query to include in a 'query string' instead of a body payload.
        var queryParameters = {};
        ['q', 'aq', 'cq', 'dq', 'searchHub', 'tab', 'locale', 'pipeline', 'lowercaseOperators', 'timezone'].forEach(function (key) {
            queryParameters[key] = queryObject[key];
        });
        var context = {};
        _.pairs(queryObject.context).forEach(function (pair) {
            var key = pair[0], value = pair[1];
            context["context[" + Utils_1.Utils.safeEncodeURIComponent(key) + "]"] = value;
        });
        if (queryObject.fieldsToInclude) {
            var fieldsToInclude = queryObject.fieldsToInclude.map(function (field) {
                var uri = Utils_1.Utils.safeEncodeURIComponent(field.replace('@', ''));
                return "\"" + uri + "\"";
            });
            queryParameters.fieldsToInclude = "[" + fieldsToInclude.join(',') + "]";
        }
        return __assign({ q: query }, context, queryParameters);
    };
    SearchEndpoint.prototype.buildViewAsHtmlQueryString = function (uniqueId, callOptions) {
        callOptions = _.extend({}, callOptions);
        return {
            uniqueId: Utils_1.Utils.safeEncodeURIComponent(uniqueId),
            enableNavigation: 'true',
            requestedOutputSize: callOptions.requestedOutputSize ? callOptions.requestedOutputSize.toString() : null,
            contentType: callOptions.contentType
        };
    };
    SearchEndpoint.prototype.performOneCall = function (params, callOptions) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var request, response, error_1, errorCode, _a, tokenWasRenewed, response;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        params = UrlUtils_1.UrlUtils.merge(params, {
                            paths: params.url,
                            queryAsString: params.queryString,
                            query: __assign({}, this.buildBaseQueryString(callOptions))
                        });
                        request = function () { return _this.caller.call(params); };
                        _b.label = 1;
                    case 1:
                        _b.trys.push([1, 3, , 10]);
                        return [4 /*yield*/, request()];
                    case 2:
                        response = _b.sent();
                        return [2 /*return*/, response.data];
                    case 3:
                        error_1 = _b.sent();
                        if (!error_1) {
                            throw new Error('Request failed but it did not return an error.');
                        }
                        errorCode = error_1.statusCode;
                        _a = errorCode;
                        switch (_a) {
                            case 419: return [3 /*break*/, 4];
                            case 429: return [3 /*break*/, 6];
                        }
                        return [3 /*break*/, 8];
                    case 4: return [4 /*yield*/, this.accessToken.doRenew()];
                    case 5:
                        tokenWasRenewed = _b.sent();
                        if (!tokenWasRenewed) {
                            throw this.handleErrorResponse(error_1);
                        }
                        return [2 /*return*/, this.performOneCall(params, callOptions)];
                    case 6: return [4 /*yield*/, this.backOffThrottledRequest(request)];
                    case 7:
                        response = _b.sent();
                        return [2 /*return*/, response.data];
                    case 8: throw this.handleErrorResponse(error_1);
                    case 9: return [3 /*break*/, 10];
                    case 10: return [2 /*return*/];
                }
            });
        });
    };
    SearchEndpoint.prototype.backOffThrottledRequest = function (request) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var options, backoffRequest, e_1;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, , 3]);
                        options = { retry: function (e, attempt) { return _this.retryIf429Error(e, attempt); } };
                        backoffRequest = { fn: request, options: options };
                        return [4 /*yield*/, BackOffRequest_1.BackOffRequest.enqueue(backoffRequest)];
                    case 1: return [2 /*return*/, _a.sent()];
                    case 2:
                        e_1 = _a.sent();
                        throw this.handleErrorResponse(e_1);
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    SearchEndpoint.prototype.retryIf429Error = function (e, attempt) {
        if (this.isThrottled(e)) {
            this.logger.info("Resending the request because it was throttled. Retry attempt " + attempt);
            return true;
        }
        return false;
    };
    SearchEndpoint.prototype.isThrottled = function (error) {
        return error && error.statusCode === 429;
    };
    SearchEndpoint.prototype.handleErrorResponse = function (errorResponse) {
        if (this.isMissingAuthenticationProviderStatus(errorResponse.statusCode)) {
            return new MissingAuthenticationError_1.MissingAuthenticationError(errorResponse.data['provider']);
        }
        else if (errorResponse.data && errorResponse.data.message && errorResponse.data.type) {
            return new QueryError_1.QueryError(errorResponse);
        }
        else if (errorResponse.data && errorResponse.data.message) {
            return new AjaxError_1.AjaxError("Request Error : " + errorResponse.data.message, errorResponse.statusCode);
        }
        else {
            return new AjaxError_1.AjaxError('Request Error', errorResponse.statusCode);
        }
    };
    SearchEndpoint.prototype.isMissingAuthenticationProviderStatus = function (status) {
        return status == 402;
    };
    /**
     * A map of all initialized `SearchEndpoint` instances.
     *
     * **Example:** `Coveo.SearchEndpoint.endpoints["default"]` returns the default endpoint that was created at initialization.
     * @type {{}}
     */
    SearchEndpoint.endpoints = {};
    __decorate([
        path('/login/'),
        accessTokenInUrl()
    ], SearchEndpoint.prototype, "getAuthenticationProviderUri", null);
    __decorate([
        path('/login/handshake/token'),
        method('POST'),
        requestDataType('application/json'),
        responseType('json')
    ], SearchEndpoint.prototype, "exchangeHandshakeToken", null);
    __decorate([
        includeActionsHistory(),
        includeReferrer(),
        includeAnalytics(),
        includeVisitorId(),
        includeIsGuestUser()
    ], SearchEndpoint.prototype, "buildCompleteCall", null);
    __decorate([
        path('/'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "search", null);
    __decorate([
        path('/'),
        method('POST'),
        responseType('arraybuffer')
    ], SearchEndpoint.prototype, "fetchBinary", null);
    __decorate([
        path('/plan'),
        method('POST'),
        requestDataType('application/json'),
        responseType('json')
    ], SearchEndpoint.prototype, "plan", null);
    __decorate([
        path('/'),
        accessTokenInUrl()
    ], SearchEndpoint.prototype, "getExportToExcelLink", null);
    __decorate([
        path('/datastream'),
        accessTokenInUrl(),
        method('GET'),
        responseType('arraybuffer')
    ], SearchEndpoint.prototype, "getRawDataStream", null);
    __decorate([
        path('/datastream'),
        accessTokenInUrl()
    ], SearchEndpoint.prototype, "getViewAsDatastreamUri", null);
    __decorate([
        path('/document'),
        method('GET'),
        responseType('text')
    ], SearchEndpoint.prototype, "getDocument", null);
    __decorate([
        path('/text'),
        method('GET'),
        responseType('text')
    ], SearchEndpoint.prototype, "getDocumentText", null);
    __decorate([
        path('/html'),
        method('POST'),
        responseType('document')
    ], SearchEndpoint.prototype, "getDocumentHtml", null);
    __decorate([
        path('/html'),
        accessTokenInUrl()
    ], SearchEndpoint.prototype, "getViewAsHtmlUri", null);
    __decorate([
        path('/values'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "listFieldValues", null);
    __decorate([
        path('/values/batch'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "listFieldValuesBatch", null);
    __decorate([
        path('/fields'),
        method('GET'),
        responseType('text')
    ], SearchEndpoint.prototype, "listFields", null);
    __decorate([
        path('/extensions'),
        method('GET'),
        responseType('text')
    ], SearchEndpoint.prototype, "extensions", null);
    __decorate([
        path('/rating'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "rateDocument", null);
    __decorate([
        path('/tag'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "tagDocument", null);
    __decorate([
        path('/querySuggest'),
        method('POST'),
        responseType('text')
    ], SearchEndpoint.prototype, "getQuerySuggest", null);
    __decorate([
        path('/facet'),
        method('POST'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "facetSearch", null);
    __decorate([
        alertsPath('/subscriptions'),
        accessTokenInUrl('accessToken'),
        method('POST'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "follow", null);
    __decorate([
        alertsPath('/subscriptions'),
        accessTokenInUrl('accessToken'),
        method('GET'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "listSubscriptions", null);
    __decorate([
        alertsPath('/subscriptions/'),
        accessTokenInUrl('accessToken'),
        method('PUT'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "updateSubscription", null);
    __decorate([
        alertsPath('/subscriptions/'),
        accessTokenInUrl('accessToken'),
        method('DELETE'),
        requestDataType('application/json'),
        responseType('text')
    ], SearchEndpoint.prototype, "deleteSubscription", null);
    __decorate([
        path('/log'),
        method('POST')
    ], SearchEndpoint.prototype, "logError", null);
    return SearchEndpoint;
}());
exports.SearchEndpoint = SearchEndpoint;
// It's taken for granted that methods using decorators have :
// IEndpointCallOptions as their second to last parameter
// IEndpointCallParameters as their last parameter
// The default parameters for each member of the injected {@link IEndpointCallParameters} are the following:
// url: '',
// queryString: [],
// requestData: {},
// requestDataType: undefined,
// method: '',
// responseType: '',
// errorsAsSuccess: false
function decoratorSetup(target, key, descriptor) {
    return {
        originalMethod: descriptor.value,
        nbParams: target[key].prototype.constructor.length
    };
}
function defaultDecoratorEndpointCallParameters() {
    var params = {
        url: '',
        queryString: [],
        requestData: {},
        method: '',
        responseType: '',
        errorsAsSuccess: false
    };
    return params;
}
function getEndpointCallParameters(nbParams, args) {
    if (!args[nbParams - 1]) {
        args[nbParams - 1] = defaultDecoratorEndpointCallParameters();
    }
    return args[nbParams - 1];
}
function path(path) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).url = this.buildBaseUri(path);
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function alertsPath(path) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).url = this.buildSearchAlertsUri(path);
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function requestDataType(type) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).requestDataType = type;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function method(met) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).method = met;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function responseType(resp) {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).responseType = resp;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function accessTokenInUrl(tokenKey) {
    if (tokenKey === void 0) { tokenKey = 'access_token'; }
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        var buildAccessToken = function (tokenKey, endpointInstance) {
            var queryString = [];
            if (Utils_1.Utils.isNonEmptyString(endpointInstance.accessToken.token)) {
                queryString.push(tokenKey + '=' + Utils_1.Utils.safeEncodeURIComponent(endpointInstance.accessToken.token));
            }
            return queryString;
        };
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var queryString = buildAccessToken(tokenKey, this);
            var params = getEndpointCallParameters(nbParams, args);
            params.queryString = (params.queryString || []).concat(queryString);
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeActionsHistory(historyStore) {
    if (historyStore === void 0) { historyStore = HistoryStore_1.buildHistoryStore(); }
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var historyFromStore = historyStore.getHistory();
            if (historyFromStore == null) {
                historyFromStore = [];
            }
            getEndpointCallParameters(nbParams, args).requestData.actionsHistory = historyFromStore;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeReferrer() {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var referrer = document.referrer;
            if (referrer == null) {
                referrer = '';
            }
            getEndpointCallParameters(nbParams, args).requestData.referrer = referrer;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeAnalytics() {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var analyticsInstance = (args && args[1] && args[1].analyticsInformation) || new AnalyticsInformation_1.AnalyticsInformation();
            var actionCause = analyticsInstance.pendingSearchEvent ? analyticsInstance.pendingSearchEvent.getEventCause() : null;
            var customData = analyticsInstance.pendingSearchEvent ? analyticsInstance.pendingSearchEvent.getEventMeta() : null;
            var userDisplayName = analyticsInstance.userDisplayName;
            var originContext = analyticsInstance.originContext;
            var analytics = __assign({ clientId: analyticsInstance.clientId, documentLocation: analyticsInstance.location, documentReferrer: analyticsInstance.referrer, pageId: analyticsInstance.lastPageId }, (actionCause && {
                actionCause: actionCause
            }), (customData && {
                customData: customData
            }), (userDisplayName && {
                userDisplayName: userDisplayName
            }), (originContext && {
                originContext: originContext
            }));
            getEndpointCallParameters(nbParams, args).requestData.analytics = underscore_1.mapObject(analytics, function (value) { return value || ''; });
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeVisitorId() {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            getEndpointCallParameters(nbParams, args).requestData.visitorId = new AnalyticsInformation_1.AnalyticsInformation().clientId;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}
function includeIsGuestUser() {
    return function (target, key, descriptor) {
        var _a = decoratorSetup(target, key, descriptor), originalMethod = _a.originalMethod, nbParams = _a.nbParams;
        descriptor.value = function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            var isGuestUser = this.options.isGuestUser;
            getEndpointCallParameters(nbParams, args).requestData.isGuestUser = isGuestUser;
            return originalMethod.apply(this, args);
        };
        return descriptor;
    };
}


/***/ }),
/* 54 */,
/* 55 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
__webpack_require__(306);
exports.MEDIUM_SCREEN_WIDTH = 800;
exports.SMALL_SCREEN_WIDTH = 480;
/**
 * This class serves as a way to get and set the different screen size breakpoints for the interface.
 *
 * By setting those, you can impact, amongst others, the {@link Facet}'s, {@link Tab}'s or the {@link ResultList}'s behaviour.
 *
 * For example, the {@link Facet} components of your interface will switch to a dropdown menu when the screen size reaches 800px or less.
 *
 * You could modify this value using `this` calls
 *
 * Normally, you would interact with this class using the instance bound to {@link SearchInterface.responsiveComponents}
 */
var ResponsiveComponents = /** @class */ (function () {
    function ResponsiveComponents(windoh) {
        if (windoh === void 0) { windoh = window; }
        this.windoh = windoh;
        this.responsiveMode = 'auto';
    }
    /**
     * Set the breakpoint for small screen size.
     * @param width
     */
    ResponsiveComponents.prototype.setSmallScreenWidth = function (width) {
        Assert_1.Assert.check(this.responsiveMode === 'auto', "Cannot modify medium screen width if responsiveMode is locked on " + this.responsiveMode + ".");
        Assert_1.Assert.check(width < this.getMediumScreenWidth(), "Cannot set small screen width (" + width + ") larger or equal to the current medium screen width (" + this.getMediumScreenWidth() + ")");
        this.smallScreenWidth = width;
    };
    /**
     * Set the breakpoint for medium screen size
     * @param width
     */
    ResponsiveComponents.prototype.setMediumScreenWidth = function (width) {
        Assert_1.Assert.check(this.responsiveMode === 'auto', "Cannot modify medium screen width if responsiveMode is locked on " + this.responsiveMode + ".");
        Assert_1.Assert.check(width > this.getSmallScreenWidth(), "Cannot set medium screen width (" + width + ") smaller or equal to the current small screen width (" + this.getSmallScreenWidth() + ")");
        this.mediumScreenWidth = width;
    };
    ResponsiveComponents.prototype.setResponsiveMode = function (responsiveMode) {
        this.responsiveMode = responsiveMode;
    };
    /**
     * Get the current breakpoint for small screen size.
     *
     * If it was not explicitly set by {@link ResponsiveComponents.setSmallScreenWidth}, the default value is `480`.
     * @returns {number}
     */
    ResponsiveComponents.prototype.getSmallScreenWidth = function () {
        if (this.responsiveMode === 'small') {
            return Number.POSITIVE_INFINITY;
        }
        if (this.responsiveMode !== 'auto') {
            return 0;
        }
        if (this.smallScreenWidth == null) {
            return exports.SMALL_SCREEN_WIDTH;
        }
        return this.smallScreenWidth;
    };
    /**
     * Get the current breakpoint for medium screen size.
     *
     * If it was not explicitly set by {@link ResponsiveComponents.setMediumScreenWidth}, the default value is `800`.
     * @returns {number}
     */
    ResponsiveComponents.prototype.getMediumScreenWidth = function () {
        if (this.responsiveMode === 'medium') {
            return Number.POSITIVE_INFINITY;
        }
        if (this.responsiveMode !== 'auto') {
            return 0;
        }
        if (this.mediumScreenWidth == null) {
            return exports.MEDIUM_SCREEN_WIDTH;
        }
        return this.mediumScreenWidth;
    };
    /** Return the current responsive mode.
     * @returns {ValidResponsiveMode}
     */
    ResponsiveComponents.prototype.getResponsiveMode = function () {
        return this.responsiveMode;
    };
    /**
     * Return true if the current screen size is smaller than the current breakpoint set for small screen width.
     * @returns {boolean}
     */
    ResponsiveComponents.prototype.isSmallScreenWidth = function () {
        if (this.windoh['clientWidth'] != null) {
            return this.windoh['clientWidth'] <= this.getSmallScreenWidth();
        }
        else {
            return document.body.clientWidth <= this.getSmallScreenWidth();
        }
    };
    /**
     * Return true if the current screen size is smaller than the current breakpoint set for medium screen width.
     * @returns {boolean}
     */
    ResponsiveComponents.prototype.isMediumScreenWidth = function () {
        if (this.isSmallScreenWidth()) {
            return false;
        }
        if (this.windoh['clientWidth'] != null) {
            return this.windoh['clientWidth'] <= this.getMediumScreenWidth();
        }
        return document.body.clientWidth <= this.getMediumScreenWidth();
    };
    /**
     * Return true if the current screen size is larger than the current breakpoint set for medium and small.
     * @returns {boolean}
     */
    ResponsiveComponents.prototype.isLargeScreenWidth = function () {
        return !this.isSmallScreenWidth() && !this.isMediumScreenWidth();
    };
    return ResponsiveComponents;
}());
exports.ResponsiveComponents = ResponsiveComponents;


/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var SettingsEvents = /** @class */ (function () {
    function SettingsEvents() {
    }
    SettingsEvents.settingsPopulateMenu = 'settingsPopulateMenu';
    return SettingsEvents;
}());
exports.SettingsEvents = SettingsEvents;


/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(3);
var SVGIcons_1 = __webpack_require__(12);
var Dom_1 = __webpack_require__(1);
var KeyboardUtils_1 = __webpack_require__(25);
var SVGDom_1 = __webpack_require__(16);
var defaultOptions = {
    usePlaceholder: false,
    className: 'coveo-input',
    triggerOnChangeAsYouType: false,
    isRequired: true
};
/**
 * A text input widget with standard styling.
 */
var TextInput = /** @class */ (function () {
    /**
     * Creates a new `TextInput`.
     * @param onChange The function to call when the value entered in the text input changes. This function takes the
     * current `TextInput` instance as an argument.
     * @param name The text to display in the text input label or placeholder.
     */
    function TextInput(onChange, name, options) {
        if (onChange === void 0) { onChange = function (textInput) { }; }
        this.onChange = onChange;
        this.name = name;
        this.options = options;
        this.lastQueryText = '';
        this.options = __assign({}, defaultOptions, this.options);
        this.buildContent();
        this.buildIcon();
    }
    TextInput.doExport = function () {
        GlobalExports_1.exportGlobally({
            TextInput: TextInput
        });
    };
    /**
     * Gets the element on which the text input is bound.
     * @returns {HTMLElement} The text input element.
     */
    TextInput.prototype.getElement = function () {
        return this.element;
    };
    /**
     * Gets the value currently entered in the text input.
     * @returns {string} The text input current value.
     */
    TextInput.prototype.getValue = function () {
        return Dom_1.$$(this.element).find('input').value;
    };
    /**
     * Sets the value in the text input.
     * @param value The value to set the text input to.
     */
    TextInput.prototype.setValue = function (value) {
        var currentValue = this.getValue();
        Dom_1.$$(this.element).find('input').value = value;
        if (currentValue != value) {
            this.onChange(this);
        }
        this.lastQueryText = this.getInput().value;
    };
    /**
     * Resets the text input.
     */
    TextInput.prototype.reset = function () {
        var currentValue = this.getValue();
        Dom_1.$$(this.element).find('input').value = '';
        if (currentValue != '') {
            this.onChange(this);
        }
        this.lastQueryText = this.getInput().value;
    };
    /**
     * Gets the element on which the text input is bound.
     * @returns {HTMLElement} The text input element.
     */
    TextInput.prototype.build = function () {
        return this.element;
    };
    /**
     * Gets the `input` element (the text input itself).
     * @returns {HTMLElement} The `input` element.
     */
    TextInput.prototype.getInput = function () {
        return Dom_1.$$(this.element).find('input');
    };
    TextInput.prototype.buildContent = function () {
        this.element = Dom_1.$$('div', { className: this.options.className }).el;
        this.input = Dom_1.$$('input', { type: 'text', autocomplete: 'off' });
        this.options.isRequired && this.input.setAttribute('required', 'true');
        this.options.ariaLabel && this.input.setAttribute('aria-label', this.options.ariaLabel);
        this.addEventListeners();
        this.element.appendChild(this.input.el);
        this.name && this.createLabelOrPlaceholder();
    };
    TextInput.prototype.buildIcon = function () {
        if (!this.options.icon) {
            return;
        }
        var iconClassName = this.options.className + "-icon";
        this.icon = Dom_1.$$('span', { className: iconClassName });
        this.icon.setHtml(SVGIcons_1.SVGIcons.icons[this.options.icon]);
        SVGDom_1.SVGDom.addClassToSVGInContainer(this.icon.el, iconClassName + "-svg");
        Dom_1.$$(this.element).prepend(this.icon.el);
    };
    TextInput.prototype.addEventListeners = function () {
        this.options.triggerOnChangeAsYouType ? this.addOnTypeEventListener() : this.addOnChangeEventListener();
    };
    TextInput.prototype.addOnChangeEventListener = function () {
        var _this = this;
        this.input.on(['keydown', 'blur'], function (e) {
            if (e.type == 'blur' || e.keyCode == KeyboardUtils_1.KEYBOARD.ENTER) {
                _this.triggerChange();
            }
        });
    };
    TextInput.prototype.addOnTypeEventListener = function () {
        var _this = this;
        this.input.on(['keyup'], function () {
            _this.triggerChange();
        });
    };
    TextInput.prototype.createLabelOrPlaceholder = function () {
        if (this.options.usePlaceholder) {
            return this.input.setAttribute('placeholder', this.name);
        }
        var label = Dom_1.$$('label');
        label.text(this.name);
        this.element.appendChild(label.el);
    };
    TextInput.prototype.triggerChange = function () {
        if (this.lastQueryText != this.getInput().value) {
            this.onChange(this);
            this.lastQueryText = this.getInput().value;
        }
    };
    return TextInput;
}());
exports.TextInput = TextInput;


/***/ }),
/* 58 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `AnalyticsEvents` static class contains the string definitions of all events that strongly relate to usage
 * analytics.
 *
 * See [Events](https://docs.coveo.com/en/417/).
 */
var AnalyticsEvents = /** @class */ (function () {
    function AnalyticsEvents() {
    }
    AnalyticsEvents.searchEvent = 'analyticsSearchEvent';
    /**
     * Triggered when a `click` analytics event is logged (e.g., when the end user clicks a
     * [`ResultLink`]{@link ResultLink} or [`Quickview`]{@link Quickview} to open a query result item).
     *
     * All `documentViewEvent` event handlers receive an
     * [`AnalyticsDocumentViewEventArgs`]{@link IAnalyticsDocumentViewEventArgs} object as an argument.
     *
     * @type {string} The string value is `documentViewEvent`.
     */
    AnalyticsEvents.documentViewEvent = 'analyticsDocumentViewEvent';
    AnalyticsEvents.customEvent = 'analyticsCustomEvent';
    /**
     * Triggered when any event (i.e., `search`, `click`, or `custom`) is about to be logged.
     *
     * All `analyticsEventReady` event handlers receive an [`AnalyticsEventArgs`]{@link IAnalyticsEventArgs} object as an argument.
     */
    AnalyticsEvents.analyticsEventReady = 'analyticsEventReady';
    /**
     * Triggered whenever an analytics event is about to be logged.
     *
     * This event allows external code to modify the analytics data before it is sent to the Coveo Usage Analytics REST
     * service.
     *
     * All `changeAnalyticsCustomData` event handlers receive a
     * [`ChangeAnalyticsCustomDataEventArgs`]{@link IChangeAnalyticsCustomDataEventArgs} object as an argument.
     *
     * @type {string} The string value is `changeAnalyticsCustomData`.
     */
    AnalyticsEvents.changeAnalyticsCustomData = 'changeAnalyticsCustomData';
    return AnalyticsEvents;
}());
exports.AnalyticsEvents = AnalyticsEvents;


/***/ }),
/* 59 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(27);
var Assert_1 = __webpack_require__(5);
var Utils_1 = __webpack_require__(4);
var Logger_1 = __webpack_require__(9);
var TemplateFromAScriptTag_1 = __webpack_require__(159);
var DefaultResultTemplate_1 = __webpack_require__(123);
var _ = __webpack_require__(0);
var Dom_1 = __webpack_require__(1);
var UnderscoreTemplate = /** @class */ (function (_super) {
    __extends(UnderscoreTemplate, _super);
    function UnderscoreTemplate(element) {
        var _this = _super.call(this) || this;
        _this.element = element;
        Assert_1.Assert.exists(element);
        var templateString = element.innerHTML;
        try {
            _this.template = _.template(templateString);
        }
        catch (e) {
            new Logger_1.Logger(_this).error('Cannot instantiate underscore template. Might be caused by strict Content-Security-Policy. Will fallback on a default template...', e);
        }
        _this.templateFromAScriptTag = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(_this, _this.element);
        _this.dataToString = function (object) {
            var extended = _.extend({}, object, UnderscoreTemplate.templateHelpers);
            if (_this.template) {
                try {
                    return _this.template(extended);
                }
                catch (e) {
                    new Logger_1.Logger(_this).error('Cannot instantiate template', e.message, _this.getTemplateInfo());
                    new Logger_1.Logger(_this).warn('A default template was used');
                    return new DefaultResultTemplate_1.DefaultResultTemplate().getFallbackTemplate();
                }
            }
            else {
                return new DefaultResultTemplate_1.DefaultResultTemplate().getFallbackTemplate();
            }
        };
        return _this;
    }
    UnderscoreTemplate.prototype.toHtmlElement = function () {
        var script = this.templateFromAScriptTag.toHtmlElement(Dom_1.$$('script'));
        script.setAttribute('type', _.first(UnderscoreTemplate.mimeTypes));
        return script;
    };
    UnderscoreTemplate.prototype.getType = function () {
        return 'UnderscoreTemplate';
    };
    UnderscoreTemplate.prototype.getTemplateInfo = function () {
        return this.element;
    };
    UnderscoreTemplate.registerTemplateHelper = function (helperName, helper) {
        UnderscoreTemplate.templateHelpers[helperName] = helper;
    };
    UnderscoreTemplate.isLibraryAvailable = function () {
        return Utils_1.Utils.exists(window['_']);
    };
    UnderscoreTemplate.fromString = function (template, properties) {
        var script = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(template, properties, document.createElement('script'));
        script.setAttribute('type', UnderscoreTemplate.mimeTypes[0]);
        return new UnderscoreTemplate(script);
    };
    UnderscoreTemplate.create = function (element) {
        Assert_1.Assert.exists(element);
        return new UnderscoreTemplate(element);
    };
    UnderscoreTemplate.templateHelpers = {};
    UnderscoreTemplate.mimeTypes = ['text/underscore', 'text/underscore-template', 'text/x-underscore', 'text/x-underscore-template'];
    return UnderscoreTemplate;
}(Template_1.Template));
exports.UnderscoreTemplate = UnderscoreTemplate;


/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {

var global = __webpack_require__(38);
var core = __webpack_require__(39);
var ctx = __webpack_require__(399);
var hide = __webpack_require__(61);
var has = __webpack_require__(82);
var PROTOTYPE = 'prototype';

var $export = function (type, name, source) {
  var IS_FORCED = type & $export.F;
  var IS_GLOBAL = type & $export.G;
  var IS_STATIC = type & $export.S;
  var IS_PROTO = type & $export.P;
  var IS_BIND = type & $export.B;
  var IS_WRAP = type & $export.W;
  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  var expProto = exports[PROTOTYPE];
  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
  var key, own, out;
  if (IS_GLOBAL) source = name;
  for (key in source) {
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    if (own && has(exports, key)) continue;
    // export native or passed
    out = own ? target[key] : source[key];
    // prevent global pollution for namespaces
    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
    // bind timers to global for call from export context
    : IS_BIND && own ? ctx(out, global)
    // wrap global constructors for prevent change them in library
    : IS_WRAP && target[key] == out ? (function (C) {
      var F = function (a, b, c) {
        if (this instanceof C) {
          switch (arguments.length) {
            case 0: return new C();
            case 1: return new C(a);
            case 2: return new C(a, b);
          } return new C(a, b, c);
        } return C.apply(this, arguments);
      };
      F[PROTOTYPE] = C[PROTOTYPE];
      return F;
    // make static versions for prototype methods
    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
    if (IS_PROTO) {
      (exports.virtual || (exports.virtual = {}))[key] = out;
      // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
      if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
    }
  }
};
// type bitmap
$export.F = 1;   // forced
$export.G = 2;   // global
$export.S = 4;   // static
$export.P = 8;   // proto
$export.B = 16;  // bind
$export.W = 32;  // wrap
$export.U = 64;  // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;


/***/ }),
/* 61 */
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__(109);
var createDesc = __webpack_require__(162);
module.exports = __webpack_require__(81) ? function (object, key, value) {
  return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var InitializationEvents_1 = __webpack_require__(17);
var Component_1 = __webpack_require__(7);
var SearchInterface_1 = __webpack_require__(19);
var Utils_1 = __webpack_require__(4);
var _ = __webpack_require__(0);
var QueryEvents_1 = __webpack_require__(11);
var Logger_1 = __webpack_require__(9);
var DeviceUtils_1 = __webpack_require__(24);
var underscore_1 = __webpack_require__(0);
var ResponsiveComponentsManager = /** @class */ (function () {
    function ResponsiveComponentsManager(root) {
        var _this = this;
        this.disabledComponents = [];
        this.responsiveComponents = [];
        this.coveoRoot = root;
        this.searchInterface = Component_1.Component.get(this.coveoRoot.el, SearchInterface_1.SearchInterface, false);
        this.dropdownHeadersWrapper = Dom_1.$$('div', {
            className: ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS
        });
        this.searchBoxElement = this.getSearchBoxElement();
        this.logger = new Logger_1.Logger(this);
        this.resizeListener = underscore_1.debounce(function () {
            if (_this.isAbleToDetermineMode()) {
                _this.addDropdownHeaderWrapperIfNeeded();
                if (_this.shouldSwitchToSmallMode()) {
                    _this.coveoRoot.addClass('coveo-small-interface');
                }
                else if (!_this.shouldSwitchToSmallMode()) {
                    _this.coveoRoot.removeClass('coveo-small-interface');
                }
                _.each(_this.responsiveComponents, function (responsiveComponent) {
                    responsiveComponent.handleResizeEvent();
                });
            }
            else {
                _this.logger
                    .warn("The width of the search interface is 0, cannot dispatch resize events to responsive components. This means that the tabs will not\n        automatically fit in the tab section. Also, the facet and recommendation component will not hide in a menu. Could the search\n        interface display property be none? Could its visibility property be set to hidden? Also, if either of these scenarios happen during\n        loading, it could be the cause of this issue.");
            }
        }, 250);
        // On many android devices, focusing on an input (eg: facet search input) causes the device to "zoom in"
        // and this triggers the window resize event. Since this class modify HTML nodes, Android has the quirks of removing the focus on the input.
        // As a net result, users focus on the text input, the keyboard appears for a few milliseconds, then dissapears instantly when the DOM is modified.
        // Since on a mobile device resizing the page is not something that should really happen, we disable it here.
        if (!DeviceUtils_1.DeviceUtils.isMobileDevice()) {
            window.addEventListener('resize', this.resizeListener);
        }
        else {
            window.addEventListener('orientationchange', this.resizeListener);
        }
        this.bindNukeEvents();
        ResponsiveComponentsManager.componentManagers.push(this);
    }
    // Register takes a class and will instantiate it after framework initialization has completed.
    ResponsiveComponentsManager.register = function (responsiveComponentConstructor, root, ID, component, options) {
        var _this = this;
        // options.initializationEventRoot can be set in some instance (like recommendation) where the root of the interface triggering the init event
        // is different from the one that will be used for calculation size.
        var initEventRoot = options.initializationEventRoot || root;
        initEventRoot.on(InitializationEvents_1.InitializationEvents.afterInitialization, function () {
            if (_this.shouldEnableResponsiveMode(root)) {
                _this.registerComponentIfResponsiveModeEnabled(responsiveComponentConstructor, root, ID, component, options);
            }
            _this.remainingComponentInitializations--;
            if (_this.remainingComponentInitializations == 0) {
                _this.instantiateResponsiveComponents(); // necessary to verify if all components are disabled before they are initialized.
                if (root.width() == 0) {
                    var logger = new Logger_1.Logger('ResponsiveComponentsManager');
                    logger.info("Search interface width is 0, cannot dispatch resize events to responsive components. Will try again after first\n          query success.");
                    root.one(QueryEvents_1.QueryEvents.querySuccess, function () {
                        _this.resizeAllComponentsManager();
                    });
                }
                else {
                    _this.resizeAllComponentsManager();
                }
            }
        });
        initEventRoot.one(QueryEvents_1.QueryEvents.querySuccess, function () {
            _this.resizeAllComponentsManager();
        });
        this.remainingComponentInitializations++;
    };
    ResponsiveComponentsManager.registerComponentIfResponsiveModeEnabled = function (responsiveComponentConstructor, root, ID, component, options) {
        var responsiveComponentsManager = _.find(this.componentManagers, function (componentManager) { return root.el == componentManager.coveoRoot.el; });
        if (!responsiveComponentsManager) {
            responsiveComponentsManager = new ResponsiveComponentsManager(root);
        }
        if (!Utils_1.Utils.isNullOrUndefined(options.enableResponsiveMode) && !options.enableResponsiveMode) {
            responsiveComponentsManager.disableComponent(ID);
            return;
        }
        this.componentInitializations.push({
            responsiveComponentsManager: responsiveComponentsManager,
            arguments: [responsiveComponentConstructor, root, ID, component, options]
        });
    };
    ResponsiveComponentsManager.shouldEnableResponsiveMode = function (root) {
        var searchInterface = Component_1.Component.get(root.el, SearchInterface_1.SearchInterface, true);
        return searchInterface instanceof SearchInterface_1.SearchInterface && searchInterface.options.enableAutomaticResponsiveMode;
    };
    ResponsiveComponentsManager.instantiateResponsiveComponents = function () {
        _.each(this.componentInitializations, function (componentInitialization) {
            var responsiveComponentsManager = componentInitialization.responsiveComponentsManager;
            responsiveComponentsManager.register.apply(responsiveComponentsManager, componentInitialization.arguments);
        });
    };
    ResponsiveComponentsManager.resizeAllComponentsManager = function () {
        _.each(this.componentManagers, function (componentManager) {
            componentManager.resizeListener();
        });
    };
    ResponsiveComponentsManager.prototype.register = function (responsiveComponentConstructor, root, ID, component, options) {
        if (this.isDisabled(ID)) {
            return;
        }
        if (!this.isActivated(ID)) {
            var responsiveComponent = new responsiveComponentConstructor(root, ID, options);
            if (this.isTabs(ID)) {
                this.responsiveComponents.push(responsiveComponent);
            }
            else {
                // Tabs need to be rendered last, so any dropdown header(eg: facet) is already there when the responsive tabs check for overflow.
                this.responsiveComponents.unshift(responsiveComponent);
            }
        }
        _.each(this.responsiveComponents, function (responsiveComponent) {
            if (responsiveComponent.registerComponent != null) {
                responsiveComponent.registerComponent(component);
            }
        });
    };
    ResponsiveComponentsManager.prototype.disableComponent = function (ID) {
        this.disabledComponents.push(ID);
    };
    ResponsiveComponentsManager.prototype.isDisabled = function (ID) {
        return _.indexOf(this.disabledComponents, ID) != -1;
    };
    ResponsiveComponentsManager.prototype.shouldSwitchToSmallMode = function () {
        var aComponentNeedsTabSection = this.needDropdownWrapper();
        var reachedBreakpoint = this.coveoRoot.width() <= this.searchInterface.responsiveComponents.getMediumScreenWidth();
        return aComponentNeedsTabSection || reachedBreakpoint;
    };
    ResponsiveComponentsManager.prototype.needDropdownWrapper = function () {
        for (var i = 0; i < this.responsiveComponents.length; i++) {
            var responsiveComponent = this.responsiveComponents[i];
            if (responsiveComponent.needDropdownWrapper && responsiveComponent.needDropdownWrapper()) {
                return true;
            }
        }
        return false;
    };
    ResponsiveComponentsManager.prototype.addDropdownHeaderWrapperIfNeeded = function () {
        if (this.needDropdownWrapper()) {
            var tabSection = Dom_1.$$(this.coveoRoot).find('.coveo-tab-section');
            if (this.searchBoxElement) {
                this.dropdownHeadersWrapper.insertAfter(this.searchBoxElement);
            }
            else if (tabSection) {
                this.dropdownHeadersWrapper.insertAfter(tabSection);
            }
            else {
                this.coveoRoot.prepend(this.dropdownHeadersWrapper.el);
            }
        }
    };
    ResponsiveComponentsManager.prototype.isTabs = function (ID) {
        return ID == 'Tab';
    };
    ResponsiveComponentsManager.prototype.isActivated = function (ID) {
        return _.find(this.responsiveComponents, function (current) { return current.ID == ID; }) != undefined;
    };
    ResponsiveComponentsManager.prototype.getSearchBoxElement = function () {
        var searchBoxElement = this.coveoRoot.find('.coveo-search-section');
        if (searchBoxElement) {
            return searchBoxElement;
        }
        else {
            return this.coveoRoot.find('.CoveoSearchbox');
        }
    };
    ResponsiveComponentsManager.prototype.bindNukeEvents = function () {
        var _this = this;
        Dom_1.$$(this.coveoRoot).on(InitializationEvents_1.InitializationEvents.nuke, function () {
            window.removeEventListener('resize', _this.resizeListener);
            // If the interface gets nuked, we need to remove all reference to componentManagers stored which match the current search interface
            ResponsiveComponentsManager.componentManagers = _.filter(ResponsiveComponentsManager.componentManagers, function (manager) { return manager.coveoRoot.el != _this.coveoRoot.el; });
        });
    };
    ResponsiveComponentsManager.prototype.isAbleToDetermineMode = function () {
        return this.coveoRoot.width() != 0 || this.searchInterface.options.responsiveMode !== 'auto';
    };
    ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS = 'coveo-dropdown-header-wrapper';
    ResponsiveComponentsManager.componentManagers = [];
    ResponsiveComponentsManager.remainingComponentInitializations = 0;
    ResponsiveComponentsManager.componentInitializations = [];
    return ResponsiveComponentsManager;
}());
exports.ResponsiveComponentsManager = ResponsiveComponentsManager;


/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var Assert_1 = __webpack_require__(5);
var Utils_1 = __webpack_require__(4);
var HtmlTemplate_1 = __webpack_require__(108);
var TemplateCache_1 = __webpack_require__(68);
var TemplateList_1 = __webpack_require__(96);
var UnderscoreTemplate_1 = __webpack_require__(59);
var ComponentOptions_1 = __webpack_require__(8);
var IComponentOptions_1 = __webpack_require__(51);
var TemplateComponentOptions = /** @class */ (function () {
    function TemplateComponentOptions() {
    }
    /**
     * Builds a template option.
     *
     * The option accepts a CSS selector matching a valid template. This selector can either be a class, or an ID
     * selector.
     *
     * When building a template option using an ID selector, the matching template must be registered in the
     * [`TemplateCache`]{@link TemplateCache}, however.
     *
     * **Markup Examples:**
     *
     * > `data-foo-id="#bar"`
     *
     * > `data-foo-selector=".bar"`
     *
     * @param optionArgs The arguments to apply when building the option.
     * @returns {Template} The resulting option value.
     */
    TemplateComponentOptions.buildTemplateOption = function (optionArgs) {
        return ComponentOptions_1.ComponentOptions.buildOption(IComponentOptions_1.ComponentOptionsType.TEMPLATE, TemplateComponentOptions.loadTemplateOption, optionArgs);
    };
    TemplateComponentOptions.loadTemplateOption = function (element, name, option, doc) {
        if (doc === void 0) { doc = document; }
        var template;
        // Attribute: template selector
        var selectorAttr = option.selectorAttr || ComponentOptions_1.ComponentOptions.attrNameFromName(name, option) + '-selector';
        var selector = element.getAttribute(selectorAttr) || ComponentOptions_1.ComponentOptions.getAttributeFromAlias(element, option);
        if (selector != null) {
            var templateElement = doc.querySelector(selector);
            if (templateElement != null) {
                template = TemplateComponentOptions.createResultTemplateFromElement(templateElement);
            }
        }
        // Attribute: template id
        if (template == null) {
            var idAttr = option.idAttr || ComponentOptions_1.ComponentOptions.attrNameFromName(name, option) + '-id';
            var id = element.getAttribute(idAttr) || ComponentOptions_1.ComponentOptions.getAttributeFromAlias(element, option);
            if (id != null) {
                template = TemplateComponentOptions.loadResultTemplateFromId(id);
            }
        }
        // Child
        if (template == null) {
            var childSelector = option.childSelector;
            if (childSelector == null) {
                childSelector = '.' + name.replace(/([A-Z])/g, '-$1').toLowerCase();
            }
            template = TemplateComponentOptions.loadChildrenResultTemplateFromSelector(element, childSelector);
        }
        return template;
    };
    TemplateComponentOptions.createResultTemplateFromElement = function (element) {
        Assert_1.Assert.exists(element);
        var type = element.getAttribute('type');
        var mimeTypes = 'You must specify the type of template. Valid values are:' +
            ' ' +
            UnderscoreTemplate_1.UnderscoreTemplate.mimeTypes.toString() +
            ' ' +
            HtmlTemplate_1.HtmlTemplate.mimeTypes.toString();
        Assert_1.Assert.check(Utils_1.Utils.isNonEmptyString(type), mimeTypes);
        if (underscore_1.indexOf(UnderscoreTemplate_1.UnderscoreTemplate.mimeTypes, type.toLowerCase()) != -1) {
            return UnderscoreTemplate_1.UnderscoreTemplate.create(element);
        }
        else if (underscore_1.indexOf(HtmlTemplate_1.HtmlTemplate.mimeTypes, type.toLowerCase()) != -1) {
            return new HtmlTemplate_1.HtmlTemplate(element);
        }
        else {
            Assert_1.Assert.fail('Cannot guess template type from attribute: ' + type + '. Valid values are ' + mimeTypes);
            return undefined;
        }
    };
    TemplateComponentOptions.loadResultTemplateFromId = function (templateId) {
        return Utils_1.Utils.isNonEmptyString(templateId) ? TemplateCache_1.TemplateCache.getTemplate(templateId) : null;
    };
    TemplateComponentOptions.loadChildrenResultTemplateFromSelector = function (element, selector) {
        var foundElements = ComponentOptions_1.ComponentOptions.loadChildrenHtmlElementFromSelector(element, selector);
        if (foundElements.length > 0) {
            return new TemplateList_1.TemplateList(underscore_1.compact(foundElements.map(function (element) { return TemplateComponentOptions.createResultTemplateFromElement(element); })));
        }
        return null;
    };
    return TemplateComponentOptions;
}());
exports.TemplateComponentOptions = TemplateComponentOptions;


/***/ }),
/* 64 */,
/* 65 */,
/* 66 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(392);
var GlobalExports_1 = __webpack_require__(3);
var Dom_1 = __webpack_require__(1);
/**
 * A checkbox widget with standard styling.
 */
var Checkbox = /** @class */ (function () {
    /**
     * Creates a new `Checkbox`.
     * @param onChange The function to call when the checkbox state changes. This function takes the current `Checkbox`
     * instance as an argument.
     * @param label The label to display next to the checkbox.
     */
    function Checkbox(onChange, label, ariaLabel, labelSuffix) {
        if (onChange === void 0) { onChange = function (checkbox) { }; }
        this.onChange = onChange;
        this.label = label;
        this.ariaLabel = ariaLabel;
        this.labelSuffix = labelSuffix;
        this.ignoreNextChange = false;
        this.buildContent();
    }
    /**
     * Toggles the checkbox state.
     */
    Checkbox.prototype.toggle = function () {
        this.checkbox.checked = !this.isSelected();
        Dom_1.$$(this.checkbox).trigger('change');
    };
    /**
     * Gets the element on which the checkbox is bound.
     * @returns {HTMLElement} The checkbox element.
     */
    Checkbox.prototype.getElement = function () {
        return this.element;
    };
    /**
     * Gets the element on which the checkbox is bound.
     * @returns {HTMLElement} The checkbox element.
     */
    Checkbox.prototype.build = function () {
        return this.element;
    };
    /**
     * Gets the checkbox [`label`]{@link Checkbox.label} value.
     * @returns {string} The checkbox label value.
     */
    Checkbox.prototype.getValue = function () {
        return this.label;
    };
    /**
     * Resets the checkbox.
     */
    Checkbox.prototype.reset = function () {
        var currentlyChecked = this.isSelected();
        this.checkbox.checked = false;
        if (currentlyChecked) {
            Dom_1.$$(this.checkbox).trigger('change');
        }
    };
    /**
     * Select the checkbox
     * @param triggerChange will trigger change even if specified and not already selected
     */
    Checkbox.prototype.select = function (triggerChange) {
        if (triggerChange === void 0) { triggerChange = true; }
        var currentlyChecked = this.isSelected();
        this.checkbox.checked = true;
        if (!currentlyChecked) {
            this.ignoreNextChange = !triggerChange;
            Dom_1.$$(this.checkbox).trigger('change');
        }
    };
    /**
     * Indicates whether the checkbox is checked.
     * @returns {boolean} `true` if the checkbox is checked, `false` otherwise.
     */
    Checkbox.prototype.isSelected = function () {
        return this.checkbox.checked;
    };
    /**
     * Gets the element on which the checkbox [`label`]{@link Checkbox.label} is bound.
     * @returns {HTMLElement} The `label` element.
     */
    Checkbox.prototype.getLabel = function () {
        return this.element;
    };
    Checkbox.prototype.buildContent = function () {
        var _this = this;
        var label = Dom_1.$$('label', {
            className: 'coveo-checkbox-label'
        });
        this.checkbox = Dom_1.$$('input', {
            type: 'checkbox',
            className: 'coveo-checkbox',
            value: this.label,
            ariaLabel: this.ariaLabel || this.label,
            ariaHidden: true
        }).el;
        this.button = Dom_1.$$('button', {
            type: 'button',
            role: 'checkbox',
            className: 'coveo-checkbox-button',
            ariaLabel: this.ariaLabel || this.label,
            ariaChecked: this.isSelected().toString()
        }).el;
        var labelSpan = Dom_1.$$('span', { className: 'coveo-checkbox-span-label' });
        labelSpan.text(this.label);
        var labelSuffixSpan = Dom_1.$$('span', { className: 'coveo-checkbox-span-label-suffix' });
        labelSuffixSpan.text(this.labelSuffix);
        label.append(this.checkbox);
        label.append(this.button);
        label.append(labelSpan.el);
        this.labelSuffix && label.append(labelSuffixSpan.el);
        Dom_1.$$(this.button).on('click', function (e) {
            e.preventDefault();
            _this.toggle();
        });
        Dom_1.$$(this.checkbox).on('change', function () {
            _this.updateAccessibilityAttributes();
            if (!_this.ignoreNextChange) {
                _this.onChange(_this);
            }
            else {
                _this.ignoreNextChange = false;
            }
        });
        this.element = label.el;
    };
    Checkbox.prototype.updateAccessibilityAttributes = function () {
        this.button.setAttribute('aria-checked', this.isSelected().toString());
    };
    Checkbox.doExport = function () {
        GlobalExports_1.exportGlobally({
            Checkbox: Checkbox
        });
    };
    return Checkbox;
}());
exports.Checkbox = Checkbox;


/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
exports.Assert = Assert_1.Assert;
var Defer_1 = __webpack_require__(31);
exports.Defer = Defer_1.Defer;
var L10N_1 = __webpack_require__(153);
exports.L10N = L10N_1.L10N;
var Logger_1 = __webpack_require__(9);
exports.Logger = Logger_1.Logger;
var Options_1 = __webpack_require__(78);
exports.Options = Options_1.Options;
var Strings_1 = __webpack_require__(6);
exports.l = Strings_1.l;
var Logger_2 = __webpack_require__(9);
if (false) {
    Logger_2.Logger.disable();
}


/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(27);
var Assert_1 = __webpack_require__(5);
var UnderscoreTemplate_1 = __webpack_require__(59);
var HtmlTemplate_1 = __webpack_require__(108);
var _ = __webpack_require__(0);
/**
 * Holds a reference to all template available in the framework
 */
var TemplateCache = /** @class */ (function () {
    function TemplateCache() {
    }
    /**
     * Register a new template in the framework, which will be available to render any results.
     * @param name
     * @param template
     * @param publicTemplate
     * @param defaultTemplate
     * @param pageTemplate
     */
    TemplateCache.registerTemplate = function (name, template, publicTemplate, defaultTemplate, resultListTemplate) {
        if (publicTemplate === void 0) { publicTemplate = true; }
        if (defaultTemplate === void 0) { defaultTemplate = false; }
        if (resultListTemplate === void 0) { resultListTemplate = false; }
        Assert_1.Assert.isNonEmptyString(name);
        Assert_1.Assert.exists(template);
        if (!(template instanceof Template_1.Template)) {
            template = new Template_1.Template(template);
        }
        if (template.name == null) {
            template.name = name;
        }
        TemplateCache.templates[name] = template;
        if (publicTemplate && !_.contains(TemplateCache.templateNames, name)) {
            TemplateCache.templateNames.push(name);
        }
        if (resultListTemplate && !_.contains(TemplateCache.resultListTemplateNames, name)) {
            TemplateCache.resultListTemplateNames.push(name);
        }
        if (defaultTemplate) {
            TemplateCache.defaultTemplates[name] = template;
        }
    };
    /**
     * Remove the given template from the cache.
     * @param name
     * @param string
     */
    TemplateCache.unregisterTemplate = function (name) {
        Assert_1.Assert.isNonEmptyString(name);
        if (TemplateCache.templates[name] != undefined) {
            delete TemplateCache.templates[name];
        }
        if (TemplateCache.defaultTemplates[name] != undefined) {
            delete TemplateCache.defaultTemplates[name];
        }
    };
    /**
     * Return a template by its name/FacID.
     * @param name
     * @returns {Template}
     */
    TemplateCache.getTemplate = function (name) {
        // In some scenarios, the template we're trying to load might be somewhere in the page
        // but we could not load it "normally" on page load (eg : UI was loaded with require js)
        // Try a last ditch effort to scan the needed templates.
        if (!TemplateCache.templates[name]) {
            TemplateCache.scanAndRegisterTemplates();
        }
        Assert_1.Assert.exists(TemplateCache.templates[name]);
        return TemplateCache.templates[name];
    };
    /**
     * Get all templates currently registered in the framework.
     * @returns {{}}
     */
    TemplateCache.getTemplates = function () {
        return TemplateCache.templates;
    };
    /**
     * Get all templates name currently registered in the framework.
     * @returns {string[]}
     */
    TemplateCache.getTemplateNames = function () {
        return TemplateCache.templateNames;
    };
    /**
     * Get all page templates name currently registered in the framework.
     * @returns {string[]}
     */
    TemplateCache.getResultListTemplateNames = function () {
        return TemplateCache.resultListTemplateNames;
    };
    /**
     * Get all the "default" templates in the framework.
     * @returns {string[]}
     */
    TemplateCache.getDefaultTemplates = function () {
        return _.keys(TemplateCache.defaultTemplates);
    };
    /**
     * Get a default template by name.
     * @param name The name of the queried template
     */
    TemplateCache.getDefaultTemplate = function (name) {
        Assert_1.Assert.exists(TemplateCache.defaultTemplates[name]);
        return TemplateCache.defaultTemplates[name];
    };
    TemplateCache.scanAndRegisterTemplates = function () {
        // Here we take care not to scan for templates for which the base library
        // is not available. Case in point: someone was using the JS UI on a page
        // that was also using Handlebars, but our code was initialized before
        // the Handlebars library (loaded through AMD).
        if (UnderscoreTemplate_1.UnderscoreTemplate.isLibraryAvailable()) {
            TemplateCache.scanAndRegisterUnderscoreTemplates();
        }
        TemplateCache.scanAndRegisterHtmlTemplates();
    };
    TemplateCache.scanAndRegisterUnderscoreTemplates = function () {
        _.each(UnderscoreTemplate_1.UnderscoreTemplate.mimeTypes, function (type) {
            var scriptList = document.querySelectorAll("script[id][type='" + type + "']");
            var i = scriptList.length;
            var arr = new Array(i);
            while (i--) {
                arr[i] = scriptList.item(i);
            }
            _.each(arr, function (elem) {
                var template = new UnderscoreTemplate_1.UnderscoreTemplate(elem);
                TemplateCache.registerTemplate(elem.getAttribute('id'), template);
            });
        });
    };
    TemplateCache.scanAndRegisterHtmlTemplates = function () {
        _.each(HtmlTemplate_1.HtmlTemplate.mimeTypes, function (type) {
            var scriptList = document.querySelectorAll("script[id][type='" + type + "']");
            var i = scriptList.length;
            var arr = new Array(i);
            while (i--) {
                arr[i] = scriptList.item(i);
            }
            _.each(arr, function (elem) {
                var template = new HtmlTemplate_1.HtmlTemplate(elem);
                TemplateCache.registerTemplate(elem.getAttribute('id'), template);
            });
        });
    };
    TemplateCache.templates = {};
    TemplateCache.templateNames = [];
    TemplateCache.resultListTemplateNames = [];
    TemplateCache.defaultTemplates = {};
    return TemplateCache;
}());
exports.TemplateCache = TemplateCache;
document.addEventListener('DOMContentLoaded', function () {
    TemplateCache.scanAndRegisterTemplates();
});


/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(4);
var Assert_1 = __webpack_require__(5);
var _ = __webpack_require__(0);
var Dom_1 = __webpack_require__(1);
var StringAndHoles = /** @class */ (function () {
    function StringAndHoles() {
    }
    StringAndHoles.replace = function (str, find, replace) {
        var strAndHoles = new StringAndHoles();
        if (Utils_1.Utils.isNullOrEmptyString(str)) {
            return strAndHoles;
        }
        var index = str.lastIndexOf(find);
        if (index == -1) {
            strAndHoles.value = str;
            return strAndHoles;
        }
        var holes = [];
        while (index >= 0) {
            var hole = {
                begin: index,
                size: find.length,
                replacementSize: replace.length
            };
            holes.push(hole);
            str = str.slice(0, index) + replace + str.slice(index + find.length);
            index = str.lastIndexOf(find);
        }
        strAndHoles.holes = holes;
        strAndHoles.value = str;
        return strAndHoles;
    };
    /**
     * Shorten the passed path intelligently (path-aware).
     * Works with *local paths* and *network paths*
     * @param uriOrig The path to shorten
     * @param length The length to which the path will be shortened.
     */
    StringAndHoles.shortenPath = function (uriOrig, length) {
        var strAndHoles = new StringAndHoles();
        var uri = uriOrig;
        if (Utils_1.Utils.isNullOrEmptyString(uri) || uri.length <= length) {
            strAndHoles.value = uri;
            return strAndHoles;
        }
        var holes = [];
        var first = -1;
        if (Utils_1.Utils.stringStartsWith(uri, '\\\\')) {
            first = uri.indexOf('\\', first + 2);
        }
        else {
            first = uri.indexOf('\\');
        }
        if (first !== -1) {
            var removed = 0;
            var next = uri.indexOf('\\', first + 1);
            while (next !== -1 && uri.length - removed + StringAndHoles.SHORTEN_END.length > length) {
                removed = next - first - 1;
                next = uri.indexOf('\\', next + 1);
            }
            if (removed > 0) {
                uri = uri.slice(0, first + 1) + StringAndHoles.SHORTEN_END + uri.slice(removed);
                var hole = {
                    begin: first + 1,
                    size: removed - StringAndHoles.SHORTEN_END.length,
                    replacementSize: StringAndHoles.SHORTEN_END.length
                };
                holes.push(hole);
            }
        }
        if (uri.length > length) {
            var over = uri.length - length + StringAndHoles.SHORTEN_END.length;
            var start = uri.length - over;
            uri = uri.slice(0, start) + StringAndHoles.SHORTEN_END;
            var hole = {
                begin: start,
                size: over,
                replacementSize: StringAndHoles.SHORTEN_END.length
            };
            holes.push(hole);
        }
        strAndHoles.holes = holes;
        strAndHoles.value = uri;
        return strAndHoles;
    };
    /**
     * Shorten the passed string.
     * @param toShortenOrig The string to shorten
     * @param length The length to which the string will be shortened.
     * @param toAppend The string to append at the end (usually, it is set to '...')
     */
    StringAndHoles.shortenString = function (toShortenOrig, length, toAppend) {
        if (length === void 0) { length = 200; }
        var toShorten = toShortenOrig;
        toAppend = Utils_1.Utils.toNotNullString(toAppend);
        var strAndHoles = new StringAndHoles();
        if (Utils_1.Utils.isNullOrEmptyString(toShorten) || length <= toAppend.length) {
            strAndHoles.value = toShorten;
            return strAndHoles;
        }
        if (toShorten.length <= length) {
            strAndHoles.value = toShorten;
            return strAndHoles;
        }
        var str = toShorten;
        length = length - toAppend.length;
        str = str.slice(0, length);
        if (toShorten.charAt(str.length) !== ' ') {
            var pos = str.lastIndexOf(' ');
            if (pos !== -1 && str.length - pos < StringAndHoles.WORD_SHORTER) {
                str = str.slice(0, pos);
            }
        }
        var holes = [];
        holes[0] = {
            begin: str.length,
            size: toShorten.length - str.length,
            replacementSize: toAppend.length
        };
        str += toAppend;
        strAndHoles.value = str;
        strAndHoles.holes = holes;
        return strAndHoles;
    };
    /**
     * Shorten the passed URI intelligently (path-aware).
     * @param toShortenOrig The URI to shorten
     * @param length The length to which the URI will be shortened.
     */
    StringAndHoles.shortenUri = function (uri, length) {
        var strAndHoles = new StringAndHoles();
        if (Utils_1.Utils.isNullOrEmptyString(uri) || uri.length <= length) {
            strAndHoles.value = uri;
            return strAndHoles;
        }
        var holes = [];
        var first = uri.indexOf('//');
        if (first !== -1) {
            first = uri.indexOf('/', first + 2);
        }
        if (first !== -1) {
            var removed = 0;
            var next = uri.indexOf('/', first + 1);
            while (next !== -1 && uri.length - removed + StringAndHoles.SHORTEN_END.length > length) {
                removed = next - first - 1;
                next = uri.indexOf('/', next + 1);
            }
            if (removed > 0) {
                uri = uri.slice(0, first + 1) + StringAndHoles.SHORTEN_END + uri.slice(first + 1 + removed);
                var hole = {
                    begin: first + 1,
                    size: removed,
                    replacementSize: StringAndHoles.SHORTEN_END.length
                };
                holes.push(hole);
            }
        }
        if (uri.length > length) {
            var over = uri.length - length + StringAndHoles.SHORTEN_END.length;
            var start = uri.length - over;
            uri = uri.slice(0, start) + StringAndHoles.SHORTEN_END;
            var hole = {
                begin: start,
                size: over,
                replacementSize: StringAndHoles.SHORTEN_END.length
            };
            holes.push(hole);
        }
        strAndHoles.holes = holes;
        strAndHoles.value = uri;
        return strAndHoles;
    };
    StringAndHoles.SHORTEN_END = '...';
    StringAndHoles.WORD_SHORTER = 10;
    return StringAndHoles;
}());
exports.StringAndHoles = StringAndHoles;
var HighlightUtils = /** @class */ (function () {
    function HighlightUtils() {
    }
    /**
     * Highlight the passed string using specified highlights and holes.
     * @param content The string to highlight items in.
     * @param highlights The highlighted positions to highlight in the string.
     * @param holes Possible holes which are used to skip highlighting.
     * @param cssClass The css class to use on the highlighting `span`.
     */
    HighlightUtils.highlightString = function (content, highlights, holes, cssClass) {
        Assert_1.Assert.isNotUndefined(highlights);
        Assert_1.Assert.isNotNull(highlights);
        Assert_1.Assert.isNonEmptyString(cssClass);
        if (Utils_1.Utils.isNullOrEmptyString(content)) {
            return content;
        }
        var maxIndex = content.length;
        var highlighted = '';
        var last = 0;
        for (var i = 0; i < highlights.length; i++) {
            var highlight = highlights[i];
            var start = highlight.offset;
            var end = start + highlight.length;
            if (holes !== null) {
                var skip = false;
                for (var j = 0; j < holes.length; j++) {
                    var hole = holes[j];
                    var holeBegin = hole.begin;
                    var holeEnd = holeBegin + hole.size;
                    if (start < holeBegin && end >= holeBegin && end < holeEnd) {
                        end = holeBegin;
                    }
                    else if (start >= holeBegin && end < holeEnd) {
                        skip = true;
                        break;
                    }
                    else if (start >= holeBegin && start < holeEnd && end >= holeEnd) {
                        start = holeBegin + hole.replacementSize;
                        end -= hole.size - hole.replacementSize;
                    }
                    else if (start < holeBegin && end >= holeEnd) {
                        end -= hole.size - hole.replacementSize;
                    }
                    else if (start >= holeEnd) {
                        var offset = hole.size - hole.replacementSize;
                        start -= offset;
                        end -= offset;
                    }
                }
                if (skip || start === end) {
                    continue;
                }
            }
            if (end > maxIndex) {
                break;
            }
            if (last <= start) {
                highlighted += _.escape(content.slice(last, start));
                highlighted += "<span class=\"" + cssClass + "\"";
                if (highlight.dataHighlightGroup) {
                    highlighted += " data-highlight-group=\"" + highlight.dataHighlightGroup.toString() + "\"";
                }
                if (highlight.dataHighlightGroupTerm) {
                    highlighted += " data-highlight-group-term=\"" + highlight.dataHighlightGroupTerm + "\"";
                }
                highlighted += '>';
                highlighted += _.escape(content.slice(start, end));
                highlighted += '</span>';
            }
            last = end;
        }
        if (last != maxIndex) {
            highlighted += _.escape(content.slice(last));
        }
        return highlighted;
    };
    HighlightUtils.highlight = function (text, match, className) {
        var elements = [];
        var regex = RegExp(match, 'i');
        var parts = text.split(regex);
        var lastPart = parts.pop();
        var index = 0;
        parts.forEach(function (part) {
            if (part) {
                var unhighlighted = createSpanWithText(part);
                elements.push(unhighlighted.el);
                index += part.length;
            }
            var matchedSubstring = text.substring(index, index + match.length);
            var highlighted = createSpanWithText(matchedSubstring);
            highlighted.addClass(className);
            elements.push(highlighted.el);
            index += match.length;
        });
        if (lastPart) {
            var last = createSpanWithText(lastPart);
            elements.push(last.el);
        }
        return elements;
    };
    return HighlightUtils;
}());
exports.HighlightUtils = HighlightUtils;
function createSpanWithText(text) {
    var span = Dom_1.$$('span');
    span.text(text);
    return span;
}


/***/ }),
/* 70 */,
/* 71 */,
/* 72 */,
/* 73 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var TimeSpan = /** @class */ (function () {
    function TimeSpan(time, isMilliseconds) {
        if (isMilliseconds === void 0) { isMilliseconds = true; }
        if (isMilliseconds) {
            this.milliseconds = time;
        }
        else {
            this.milliseconds = time * 1000;
        }
    }
    TimeSpan.prototype.getMilliseconds = function () {
        return this.milliseconds;
    };
    TimeSpan.prototype.getSeconds = function () {
        return this.getMilliseconds() / 1000;
    };
    TimeSpan.prototype.getMinutes = function () {
        return this.getSeconds() / 60;
    };
    TimeSpan.prototype.getHours = function () {
        return this.getMinutes() / 60;
    };
    TimeSpan.prototype.getDays = function () {
        return this.getHours() / 24;
    };
    TimeSpan.prototype.getWeeks = function () {
        return this.getDays() / 7;
    };
    TimeSpan.prototype.getHHMMSS = function () {
        var hours = Math.floor(this.getHours());
        var minutes = Math.floor(this.getMinutes()) % 60;
        var seconds = Math.floor(this.getSeconds()) % 60;
        var hoursString, minutesString, secondsString;
        if (hours == 0) {
            hoursString = '';
        }
        else {
            hoursString = hours < 10 ? '0' + hours.toString() : hours.toString();
        }
        minutesString = minutes < 10 ? '0' + minutes.toString() : minutes.toString();
        secondsString = seconds < 10 ? '0' + seconds.toString() : seconds.toString();
        var hhmmss = (hoursString != '' ? hoursString + ':' : '') + minutesString + ':' + secondsString;
        return hhmmss;
    };
    TimeSpan.fromDates = function (from, to) {
        Assert_1.Assert.exists(from);
        Assert_1.Assert.exists(to);
        return new TimeSpan(to.valueOf() - from.valueOf());
    };
    return TimeSpan;
}());
exports.TimeSpan = TimeSpan;


/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var ColorUtils_1 = __webpack_require__(144);
exports.ColorUtils = ColorUtils_1.ColorUtils;
var CookieUtils_1 = __webpack_require__(92);
exports.Cookie = CookieUtils_1.ScopedCookie;
var CurrencyUtils_1 = __webpack_require__(135);
exports.CurrencyUtils = CurrencyUtils_1.CurrencyUtils;
var DateUtils_1 = __webpack_require__(33);
exports.DateUtils = DateUtils_1.DateUtils;
var DeviceUtils_1 = __webpack_require__(24);
exports.DeviceUtils = DeviceUtils_1.DeviceUtils;
var Dom_1 = __webpack_require__(1);
exports.Dom = Dom_1.Dom;
exports.$$ = Dom_1.$$;
var DomUtils_1 = __webpack_require__(97);
exports.DomUtils = DomUtils_1.DomUtils;
var EmailUtils_1 = __webpack_require__(178);
exports.EmailUtils = EmailUtils_1.EmailUtils;
var HashUtils_1 = __webpack_require__(42);
exports.HashUtils = HashUtils_1.HashUtils;
var HighlightUtils_1 = __webpack_require__(69);
exports.HighlightUtils = HighlightUtils_1.HighlightUtils;
exports.StringAndHoles = HighlightUtils_1.StringAndHoles;
var HtmlUtils_1 = __webpack_require__(179);
exports.HTMLUtils = HtmlUtils_1.HTMLUtils;
var KeyboardUtils_1 = __webpack_require__(25);
exports.KEYBOARD = KeyboardUtils_1.KEYBOARD;
exports.KeyboardUtils = KeyboardUtils_1.KeyboardUtils;
var LocalStorageUtils_1 = __webpack_require__(41);
exports.LocalStorageUtils = LocalStorageUtils_1.LocalStorageUtils;
var OSUtils_1 = __webpack_require__(181);
exports.OSUtils = OSUtils_1.OSUtils;
exports.OS_NAME = OSUtils_1.OS_NAME;
var PopupUtils_1 = __webpack_require__(198);
exports.PopupUtils = PopupUtils_1.PopupUtils;
var QueryUtils_1 = __webpack_require__(21);
exports.QueryUtils = QueryUtils_1.QueryUtils;
var StreamHighlightUtils_1 = __webpack_require__(120);
exports.StreamHighlightUtils = StreamHighlightUtils_1.StreamHighlightUtils;
var StringUtils_1 = __webpack_require__(22);
exports.StringUtils = StringUtils_1.StringUtils;
var TimeSpanUtils_1 = __webpack_require__(73);
exports.TimeSpan = TimeSpanUtils_1.TimeSpan;
var Utils_1 = __webpack_require__(4);
exports.Utils = Utils_1.Utils;
var UrlUtils_1 = __webpack_require__(43);
exports.UrlUtils = UrlUtils_1.UrlUtils;


/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var QueryUtils_1 = __webpack_require__(21);
var _ = __webpack_require__(0);
/**
 * An `ExpressionBuilder` that is mostly used by the {@link QueryBuilder}.<br/>
 * It is used to build a single query expression.<br/>
 * It allows combining multiple expression parts into a single string and provides utilities to generate common expression parts.
 */
var ExpressionBuilder = /** @class */ (function () {
    function ExpressionBuilder() {
        this.parts = []; // he he he
        this.wrapParts = true;
    }
    /**
     * Add a new part to the expression.
     * @param expression
     */
    ExpressionBuilder.prototype.add = function (expression) {
        Assert_1.Assert.isNonEmptyString(expression);
        this.parts.push(expression);
    };
    /**
     * Take another `ExpressionBuilder`, and copy it.
     * @param expression
     */
    ExpressionBuilder.prototype.fromExpressionBuilder = function (expression) {
        this.parts = this.parts.concat(expression.parts);
    };
    /**
     * Add a new part to the expression, but specific for field values<br/>
     * eg @field=(value1,value2,value3).
     * @param field The field for which to create an expression (e.g.: @foo).
     * @param operator The operator to use e.g.: = (equal) == (strict equal) <> (not equal).
     * @param values The values to put in the expression.
     * @param forceValueEscape Force the escaping of the values
     */
    ExpressionBuilder.prototype.addFieldExpression = function (field, operator, values, forceEscape) {
        if (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isNonEmptyString(field);
        Assert_1.Assert.stringStartsWith(field, '@');
        Assert_1.Assert.isNonEmptyString(operator);
        Assert_1.Assert.isLargerOrEqualsThan(1, values.length);
        this.add(QueryUtils_1.QueryUtils.buildFieldExpression(field, operator, values, forceEscape));
    };
    /**
     * Add a new part to the expression, but specific for field values<br/>
     * eg : NOT @field==(value1, value2, value3).
     * @param field The field for which to create an expression (e.g.: @foo)
     * @param values The values to put in the expression.
     * @param forceValueEscape Force the escaping of the values
     */
    ExpressionBuilder.prototype.addFieldNotEqualExpression = function (field, values, forceEscape) {
        if (forceEscape === void 0) { forceEscape = false; }
        Assert_1.Assert.isNonEmptyString(field);
        Assert_1.Assert.stringStartsWith(field, '@');
        Assert_1.Assert.isLargerOrEqualsThan(1, values.length);
        this.add(QueryUtils_1.QueryUtils.buildFieldNotEqualExpression(field, values, (forceEscape = false)));
    };
    /**
     * Removes an expression from the builder.
     * @param expression
     */
    ExpressionBuilder.prototype.remove = function (expression) {
        Assert_1.Assert.isNonEmptyString(expression);
        var index = _.indexOf(this.parts, expression);
        if (index != -1) {
            this.parts.splice(_.indexOf(this.parts, expression), 1);
        }
    };
    /**
     * Checks if the builder is currently empty.
     * @returns {boolean}
     */
    ExpressionBuilder.prototype.isEmpty = function () {
        return this.parts.length == 0;
    };
    /**
     * Builds the expression string by combining all the parts together.<br/>
     * @param exp expression to join the different parts, default to a space.
     * @returns {any}
     */
    ExpressionBuilder.prototype.build = function (exp) {
        if (exp === void 0) { exp = ' '; }
        if (this.parts.length == 0) {
            return undefined;
        }
        else if (this.parts.length == 1) {
            return this.parts[0];
        }
        else if (this.wrapParts) {
            return '(' + this.parts.join(')' + exp + '(') + ')';
        }
        else {
            return this.parts.join(exp);
        }
    };
    /**
     * @returns array containing the differents parts of the expression
     */
    ExpressionBuilder.prototype.getParts = function () {
        return this.parts;
    };
    /**
     * Merges several `ExpressionBuilder` together.
     * @param builders Builders that should be merged.
     * @returns {Coveo.ExpressionBuilder}
     */
    ExpressionBuilder.merge = function () {
        var builders = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            builders[_i] = arguments[_i];
        }
        var merged = new ExpressionBuilder();
        _.each(builders, function (builder) {
            merged.parts = merged.parts.concat(builder.parts);
        });
        return merged;
    };
    /**
     * Merges several `ExpressionBuilder` together, using the OR operator.
     * @param builders Builders that should be merged.
     * @returns {Coveo.ExpressionBuilder}
     */
    ExpressionBuilder.mergeUsingOr = function () {
        var builders = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            builders[_i] = arguments[_i];
        }
        var nonEmpty = _.filter(builders, function (b) { return !b.isEmpty(); });
        var merged = new ExpressionBuilder();
        if (nonEmpty.length == 1) {
            merged.parts = [].concat(nonEmpty[0].parts);
        }
        else if (nonEmpty.length > 1) {
            var parts = _.map(nonEmpty, function (b) { return b.build(); });
            merged.add('(' + parts.join(') OR (') + ')');
        }
        return merged;
    };
    return ExpressionBuilder;
}());
exports.ExpressionBuilder = ExpressionBuilder;


/***/ }),
/* 76 */
/***/ (function(module, exports) {

var g;

// This works in non-strict mode
g = (function() {
	return this;
})();

try {
	// This works if eval is allowed (see CSP)
	g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
	// This works if the window reference is available
	if(typeof window === "object")
		g = window;
}

// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}

module.exports = g;


/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var JQueryUtils = /** @class */ (function () {
    function JQueryUtils() {
    }
    JQueryUtils.getJQuery = function () {
        if (window && window['Coveo'] && window['Coveo']['$']) {
            return window['Coveo']['$'];
        }
        return false;
    };
    JQueryUtils.isInstanceOfJQuery = function (obj) {
        var jq = this.getJQuery();
        if (jq) {
            return obj instanceof jq;
        }
        return false;
    };
    JQueryUtils.isInstanceOfJqueryEvent = function (obj) {
        var jq = this.getJQuery();
        if (jq) {
            return obj instanceof jq.Event;
        }
        return false;
    };
    return JQueryUtils;
}());
exports.JQueryUtils = JQueryUtils;


/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(4);
var _ = __webpack_require__(0);
var Options = /** @class */ (function () {
    function Options() {
    }
    Options.prototype.merge = function (provided) {
        return _.extend({}, this, provided);
    };
    Options.prototype.mergeDeep = function (provided) {
        return _.extend({}, Utils_1.Utils.extendDeep(this, provided));
    };
    return Options;
}());
exports.Options = Options;


/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Model_1 = __webpack_require__(18);
var ComponentStateModel = /** @class */ (function (_super) {
    __extends(ComponentStateModel, _super);
    function ComponentStateModel(element) {
        return _super.call(this, element, ComponentStateModel.ID, {}) || this;
    }
    ComponentStateModel.prototype.registerComponent = function (componentId, component) {
        var currentAttribute = this.attributes[componentId];
        if (currentAttribute == undefined) {
            this.attributes[componentId] = [component];
        }
        else {
            this.attributes[componentId].push(component);
        }
    };
    ComponentStateModel.ID = 'ComponentState';
    return ComponentStateModel;
}(Model_1.Model));
exports.ComponentStateModel = ComponentStateModel;


/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(110);
module.exports = function (it) {
  if (!isObject(it)) throw TypeError(it + ' is not an object!');
  return it;
};


/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {

// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(111)(function () {
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),
/* 82 */
/***/ (function(module, exports) {

var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};


/***/ }),
/* 83 */
/***/ (function(module, exports) {

// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on  " + it);
  return it;
};


/***/ }),
/* 84 */
/***/ (function(module, exports) {

module.exports = {};


/***/ }),
/* 85 */,
/* 86 */,
/* 87 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var SearchAlertsEvents = /** @class */ (function () {
    function SearchAlertsEvents() {
    }
    SearchAlertsEvents.searchAlertsCreated = 'searchAlertsCreated';
    SearchAlertsEvents.searchAlertsDeleted = 'searchAlertsDeleted';
    SearchAlertsEvents.searchAlertsFail = 'searchAlertsFail';
    SearchAlertsEvents.searchAlertsPopulateMessage = 'searchAlertsPopulateMessage';
    return SearchAlertsEvents;
}());
exports.SearchAlertsEvents = SearchAlertsEvents;


/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * This static class is there to contains the different string definition for all the events related to the {@link AdvancedSearch} component.
 */
var AdvancedSearchEvents = /** @class */ (function () {
    function AdvancedSearchEvents() {
    }
    /**
     * Triggered when the {@link AdvancedSearch} component is being built.
     *
     * Allows external code to add new sections in the **Advanced Search** panel.
     *
     * All bound handlers receive {@link IBuildingAdvancedSearchEventArgs} as an argument
     *
     * @type {string}
     */
    AdvancedSearchEvents.buildingAdvancedSearch = 'buildingAdvancedSearch';
    AdvancedSearchEvents.executeAdvancedSearch = 'executeAdvancedSearch';
    return AdvancedSearchEvents;
}());
exports.AdvancedSearchEvents = AdvancedSearchEvents;


/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var coveo_analytics_1 = __webpack_require__(310);
var storage_1 = __webpack_require__(105);
function buildHistoryStore() {
    var historyStore = buildCookieHistoryStore();
    historyStore.store = storage_1.getAvailableStorage();
    return historyStore;
}
exports.buildHistoryStore = buildHistoryStore;
function buildNullHistoryStore() {
    var historyStore = buildCookieHistoryStore();
    historyStore.store = new storage_1.NullStorage();
    return historyStore;
}
exports.buildNullHistoryStore = buildNullHistoryStore;
function buildCookieHistoryStore() {
    var cookieStorage = new storage_1.CookieStorage();
    return new coveo_analytics_1.history.HistoryStore(cookieStorage);
}


/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var DateUtils_1 = __webpack_require__(33);
var GlobalExports_1 = __webpack_require__(3);
var Strings_1 = __webpack_require__(6);
var Assert_1 = __webpack_require__(5);
var Globalize = __webpack_require__(23);
var Pikaday = __webpack_require__(457);
/**
 * A date picker widget with standard styling.
 */
var DatePicker = /** @class */ (function () {
    /**
     * Creates a new `DatePicker`.
     * @param onChange The function to call when a new value is selected in the date picker. This function takes the
     * current `DatePicker` instance as an argument.
     */
    function DatePicker(onChange) {
        if (onChange === void 0) { onChange = function () { }; }
        this.onChange = onChange;
        this.wasReset = true;
        Assert_1.Assert.exists(onChange);
        this.buildContent();
    }
    /**
     * Resets the date picker.
     */
    DatePicker.prototype.reset = function () {
        this.picker.setDate(undefined);
        this.wasReset = true;
        this.onChange(this);
    };
    /**
     * Gets the element on which the date picker is bound.
     * @returns {HTMLInputElement} The date picker element.
     */
    DatePicker.prototype.getElement = function () {
        return this.element;
    };
    /**
     * Gets the currently selected value in the date picker.
     * @returns {string} A textual representation of the currently selected value (`YYYY-MM-DD` format).
     */
    DatePicker.prototype.getValue = function () {
        if (this.wasReset) {
            return '';
        }
        var date = this.picker.getDate();
        return date ? DateUtils_1.DateUtils.dateForQuery(this.picker.getDate()) : '';
    };
    /**
     * Get the currently selected value in the date picker, as a Date object
     * @returns {Date} A Date object for the current value, or null if the date picker was reset or a date has not been selected initially.
     */
    DatePicker.prototype.getDateValue = function () {
        if (this.wasReset) {
            return null;
        }
        return this.picker.getDate();
    };
    /**
     * Sets the date picker value.
     * @param date The value to set the date picker to. Must be a
     * [Date](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date) object.
     */
    DatePicker.prototype.setValue = function (date) {
        Assert_1.Assert.exists(date);
        this.picker.setDate(date);
        this.wasReset = false;
    };
    /**
     * Gets the element on which the date picker is bound.
     * @returns {HTMLInputElement} The date picker element.
     */
    DatePicker.prototype.build = function () {
        return this.element;
    };
    DatePicker.prototype.buildContent = function () {
        var _this = this;
        this.element = Dom_1.$$('input', { className: 'coveo-button', 'aria-label': Strings_1.l('Date') }).el;
        this.element.readOnly = true;
        this.picker = new Pikaday({
            field: this.element,
            onSelect: function () {
                _this.wasReset = false;
                _this.onChange.call(_this, _this);
            },
            i18n: {
                previousMonth: Strings_1.l('PreviousMonth'),
                nextMonth: Strings_1.l('NextMonth'),
                months: Globalize.culture().calendar.months.names,
                weekdays: Globalize.culture().calendar.days.names,
                weekdaysShort: Globalize.culture().calendar.days.namesAbbr
            }
        });
    };
    DatePicker.doExport = function () {
        GlobalExports_1.exportGlobally({
            DatePicker: DatePicker
        });
    };
    return DatePicker;
}());
exports.DatePicker = DatePicker;


/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(9);
var Assert_1 = __webpack_require__(5);
var TimeSpanUtils_1 = __webpack_require__(73);
var DeviceUtils_1 = __webpack_require__(24);
var Utils_1 = __webpack_require__(4);
var JQueryutils_1 = __webpack_require__(77);
var _ = __webpack_require__(0);
var UrlUtils_1 = __webpack_require__(43);
// In ie8, XMLHttpRequest has no status property, so let's use this enum instead
var XMLHttpRequestStatus;
(function (XMLHttpRequestStatus) {
    XMLHttpRequestStatus[XMLHttpRequestStatus["OPENED"] = XMLHttpRequest.OPENED || 1] = "OPENED";
    XMLHttpRequestStatus[XMLHttpRequestStatus["HEADERS_RECEIVED"] = XMLHttpRequest.HEADERS_RECEIVED || 2] = "HEADERS_RECEIVED";
    XMLHttpRequestStatus[XMLHttpRequestStatus["DONE"] = XMLHttpRequest.DONE || 4] = "DONE";
})(XMLHttpRequestStatus || (XMLHttpRequestStatus = {}));
/**
 * This class is in charge of calling an endpoint (eg: a {@link SearchEndpoint}).
 *
 * This means it's only uses to execute an XMLHttpRequest (for example), massage the response and check if there are errors.
 *
 * Will execute the call and return a Promise.
 *
 * Call using one of those options :
 *
 * * XMLHttpRequest for recent browser that support CORS, or if the endpoint is on the same origin.
 * * XDomainRequest for older IE browser that do not support CORS.
 * * Jsonp if all else fails, or is explicitly enabled.
 */
var EndpointCaller = /** @class */ (function () {
    /**
     * Create a new EndpointCaller.
     * @param options Specify the authentication that will be used for this endpoint. Not needed if the endpoint is public and has no authentication
     */
    function EndpointCaller(options) {
        if (options === void 0) { options = {}; }
        this.options = options;
        /**
         * Set this property to true to enable Jsonp call to the endpoint.<br/>
         * Be aware that jsonp is "easier" to setup endpoint wise, but has a lot of drawback and limitation for the client code.<br/>
         * Default to false.
         * @type {boolean}
         */
        this.useJsonp = false;
        this.logger = new Logger_1.Logger(this);
    }
    EndpointCaller.convertJsonToQueryString = function (json) {
        Assert_1.Assert.exists(json);
        return _.chain(json)
            .map(function (value, key) {
            if (value != null) {
                var stringValue = _.isObject(value) ? JSON.stringify(value) : value.toString();
                return key + "=" + Utils_1.Utils.safeEncodeURIComponent(stringValue);
            }
            return null;
        })
            .compact()
            .value();
    };
    EndpointCaller.convertJsonToFormBody = function (json) {
        return this.convertJsonToQueryString(json).join('&');
    };
    /**
     * Generic call to the endpoint using the provided {@link IEndpointCallParameters}.<br/>
     * Internally, will decide which method to use to call the endpoint :<br/>
     * -- XMLHttpRequest for recent browser that support CORS, or if the endpoint is on the same origin.<br/>
     * -- XDomainRequest for older IE browser that do not support CORS.<br/>
     * -- Jsonp if all else fails, or is explicitly enabled.
     * @param params The parameters to use for the call
     * @returns {any} A promise of the given type
     */
    EndpointCaller.prototype.call = function (params) {
        var requestInfo = {
            url: params.url,
            queryString: params.errorsAsSuccess ? params.queryString.concat(['errorsAsSuccess=1']) : params.queryString,
            requestData: params.requestData,
            requestDataType: params.requestDataType || 'application/x-www-form-urlencoded; charset=UTF-8',
            begun: new Date(),
            method: params.method
        };
        requestInfo.headers = this.buildRequestHeaders(requestInfo);
        if (_.isFunction(this.options.requestModifier)) {
            requestInfo = this.options.requestModifier(requestInfo);
        }
        this.logger.trace('Performing REST request', requestInfo);
        var urlObject = this.parseURL(requestInfo.url);
        // In IE8, hostname and port return "" when we are on the same domain.
        var isLocalHost = window.location.hostname === urlObject.hostname || urlObject.hostname === '';
        var currentPort = window.location.port != '' ? window.location.port : window.location.protocol == 'https:' ? '443' : '80';
        var isSamePort = currentPort == urlObject.port;
        var isCrossOrigin = !(isLocalHost && isSamePort);
        if (!this.useJsonp) {
            if (this.isCORSSupported() || !isCrossOrigin) {
                return this.callUsingXMLHttpRequest(requestInfo, params.responseType);
            }
            else if (this.isXDomainRequestSupported()) {
                return this.callUsingXDomainRequest(requestInfo);
            }
            else {
                return this.callUsingAjaxJsonP(requestInfo);
            }
        }
        else {
            return this.callUsingAjaxJsonP(requestInfo);
        }
    };
    /**
     * Call the endpoint using XMLHttpRequest. Used internally by {@link EndpointCaller.call}.<br/>
     * Will try internally to handle error if it can.<br/>
     * Promise will otherwise fail with the error type.
     * @param requestInfo The info about the request
     * @param responseType The responseType. Default to text. https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType
     * @returns {Promise<T>|Promise}
     */
    EndpointCaller.prototype.callUsingXMLHttpRequest = function (requestInfo, responseType) {
        var _this = this;
        if (responseType === void 0) { responseType = 'text'; }
        return new Promise(function (resolve, reject) {
            var xmlHttpRequest = _this.getXmlHttpRequest();
            // Beware, most stuff must be set on the event that says the request is OPENED.
            // Otherwise it'll bork on some browsers. Gotta love standards.
            // This sent variable allowed to remove the second call of onreadystatechange with the state OPENED in IE11
            var sent = false;
            xmlHttpRequest.onreadystatechange = function (ev) {
                if (xmlHttpRequest.readyState == XMLHttpRequestStatus.OPENED && !sent) {
                    sent = true;
                    xmlHttpRequest.withCredentials = !_this.options.anonymous;
                    _.each(requestInfo.headers, function (headerValue, headerKey) {
                        xmlHttpRequest.setRequestHeader(headerKey, headerValue);
                    });
                    if (requestInfo.method == 'GET') {
                        xmlHttpRequest.send();
                    }
                    else if (requestInfo.requestDataType.indexOf('application/json') === 0) {
                        xmlHttpRequest.send(JSON.stringify(requestInfo.requestData));
                    }
                    else {
                        xmlHttpRequest.send(EndpointCaller.convertJsonToFormBody(requestInfo.requestData));
                    }
                    // The "responseType" varies if the request is a success or not.
                    // Therefore we postpone setting "responseType" until we know if the
                    // request is a success or not. Doing so, we avoid this potential
                    // error in Chrome:
                    //
                    //   Uncaught InvalidStateError: Failed to read the 'responseText'
                    //   property from 'XMLHttpRequest': The value is only accessible if
                    //   the object's 'responseType' is '' or 'text' (was 'document').
                    //
                }
                else if (xmlHttpRequest.readyState == XMLHttpRequestStatus.HEADERS_RECEIVED) {
                    var status_1 = xmlHttpRequest.status;
                    if (_this.isSuccessHttpStatus(status_1)) {
                        xmlHttpRequest.responseType = responseType;
                    }
                    else {
                        xmlHttpRequest.responseType = 'text';
                    }
                }
                else if (xmlHttpRequest.readyState == XMLHttpRequestStatus.DONE) {
                    var status_2 = xmlHttpRequest.status;
                    var data = void 0;
                    switch (responseType) {
                        case 'json':
                            data = xmlHttpRequest.response;
                            // Work around a bug in IE11 where responseType jsonis not supported : the response comes back as a plain string
                            // Force the json parse manually
                            if (responseType == 'json' && DeviceUtils_1.DeviceUtils.getDeviceName() == 'IE') {
                                try {
                                    data = JSON.parse(data);
                                }
                                catch (e) {
                                    // Do nothing, it probably means the data was JSON already
                                }
                            }
                            break;
                        case 'text':
                            data = _this.tryParseResponseText(xmlHttpRequest.responseText, xmlHttpRequest.getResponseHeader('Content-Type'));
                            break;
                        default:
                            data = xmlHttpRequest.response;
                            break;
                    }
                    if (data == undefined) {
                        data = _this.tryParseResponseText(xmlHttpRequest.responseText, xmlHttpRequest.getResponseHeader('Content-Type'));
                    }
                    if (_this.isSuccessHttpStatus(status_2)) {
                        _this.handleSuccessfulResponseThatMightBeAnError(requestInfo, data, resolve, reject);
                    }
                    else {
                        _this.handleError(requestInfo, xmlHttpRequest.status, data, reject);
                    }
                }
            };
            var queryString = requestInfo.queryString;
            if (requestInfo.method == 'GET') {
                queryString = queryString.concat(EndpointCaller.convertJsonToQueryString(requestInfo.requestData));
            }
            xmlHttpRequest.open(requestInfo.method, _this.combineUrlAndQueryString(requestInfo.url, queryString));
        });
    };
    /**
     * Call the endpoint using XDomainRequest https://msdn.microsoft.com/en-us/library/cc288060(v=vs.85).aspx<br/>
     * Used for IE8/9
     * @param requestInfo The info about the request
     * @returns {Promise<T>|Promise}
     */
    EndpointCaller.prototype.callUsingXDomainRequest = function (requestInfo) {
        var _this = this;
        return new Promise(function (resolve, reject) {
            var queryString = requestInfo.queryString.concat([]);
            // XDomainRequest don't support including stuff in the header, so we must
            // put the access token in the query string if we have one.
            if (_this.options.accessToken) {
                queryString.push('access_token=' + Utils_1.Utils.safeEncodeURIComponent(_this.options.accessToken));
            }
            var xDomainRequest = new XDomainRequest();
            if (requestInfo.method == 'GET') {
                queryString = queryString.concat(EndpointCaller.convertJsonToQueryString(requestInfo.requestData));
            }
            xDomainRequest.open(requestInfo.method, _this.combineUrlAndQueryString(requestInfo.url, queryString));
            xDomainRequest.onload = function () {
                var data = _this.tryParseResponseText(xDomainRequest.responseText, xDomainRequest.contentType);
                _this.handleSuccessfulResponseThatMightBeAnError(requestInfo, data, resolve, reject);
            };
            xDomainRequest.onerror = function () {
                var data = _this.tryParseResponseText(xDomainRequest.responseText, xDomainRequest.contentType);
                _this.handleError(requestInfo, 0, data, reject);
            };
            // We must set those functions otherwise it will sometime fail in IE
            xDomainRequest.ontimeout = function () { return _this.logger.error('Request timeout', xDomainRequest, requestInfo.requestData); };
            xDomainRequest.onprogress = function () { return _this.logger.trace('Request progress', xDomainRequest, requestInfo.requestData); };
            // We must open the request in a separate thread, for obscure reasons
            _.defer(function () {
                if (requestInfo.method == 'GET') {
                    xDomainRequest.send();
                }
                else {
                    xDomainRequest.send(EndpointCaller.convertJsonToFormBody(requestInfo.requestData));
                }
            });
        });
    };
    /**
     * Call the endpoint using Jsonp https://en.wikipedia.org/wiki/JSONP<br/>
     * Should be used for dev only, or for very special setup as using jsonp has a lot of drawbacks.
     * @param requestInfo The info about the request
     * @returns {Promise<T>|Promise}
     */
    EndpointCaller.prototype.callUsingAjaxJsonP = function (requestInfo) {
        var _this = this;
        var jQuery = JQueryutils_1.JQueryUtils.getJQuery();
        Assert_1.Assert.check(jQuery, 'Using jsonp without having included jQuery is not supported.');
        return new Promise(function (resolve, reject) {
            var queryString = requestInfo.queryString.concat(EndpointCaller.convertJsonToQueryString(requestInfo.requestData));
            // JSONP don't support including stuff in the header, so we must
            // put the access token in the query string if we have one.
            if (_this.options.accessToken) {
                queryString.push('access_token=' + Utils_1.Utils.safeEncodeURIComponent(_this.options.accessToken));
            }
            queryString.push('callback=?');
            jQuery.ajax({
                url: _this.combineUrlAndQueryString(requestInfo.url, queryString),
                dataType: 'jsonp',
                success: function (data) { return _this.handleSuccessfulResponseThatMightBeAnError(requestInfo, data, resolve, reject); },
                timeout: EndpointCaller.JSONP_ERROR_TIMEOUT,
                error: function () { return _this.handleError(requestInfo, 0, undefined, reject); }
            });
        });
    };
    EndpointCaller.prototype.parseURL = function (url) {
        var urlObject = document.createElement('a');
        urlObject.href = url;
        return urlObject;
    };
    EndpointCaller.prototype.getXmlHttpRequest = function () {
        var newXmlHttpRequest = this.options.xmlHttpRequest || XMLHttpRequest;
        return new newXmlHttpRequest();
    };
    EndpointCaller.prototype.handleSuccessfulResponseThatMightBeAnError = function (requestInfo, data, success, error) {
        if (this.isErrorResponseBody(data)) {
            this.handleError(requestInfo, data.statusCode, data, error);
        }
        else {
            this.handleSuccess(requestInfo, data, success);
        }
    };
    EndpointCaller.prototype.handleSuccess = function (requestInfo, data, success) {
        var querySuccess = {
            duration: TimeSpanUtils_1.TimeSpan.fromDates(requestInfo.begun, new Date()).getMilliseconds(),
            data: data
        };
        this.logger.trace('REST request successful', data, requestInfo);
        success(querySuccess);
    };
    EndpointCaller.prototype.handleError = function (requestInfo, status, data, error) {
        var queryError = {
            statusCode: status,
            data: data
        };
        this.logger.error('REST request failed', status, data, requestInfo);
        error(queryError);
    };
    EndpointCaller.prototype.combineUrlAndQueryString = function (url, queryString) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [url],
            queryAsString: queryString
        });
    };
    EndpointCaller.prototype.isXDomainRequestSupported = function () {
        return 'XDomainRequest' in window;
    };
    EndpointCaller.prototype.isCORSSupported = function () {
        return 'withCredentials' in this.getXmlHttpRequest();
    };
    EndpointCaller.prototype.isSuccessHttpStatus = function (status) {
        return (status >= 200 && status < 300) || status === 304;
    };
    EndpointCaller.prototype.tryParseResponseText = function (json, contentType) {
        if (contentType != null && contentType.indexOf('application/json') != -1) {
            if (Utils_1.Utils.isNonEmptyString(json)) {
                try {
                    return JSON.parse(json);
                }
                catch (ex) {
                    return undefined;
                }
            }
            else {
                return undefined;
            }
        }
        else {
            return json;
        }
    };
    EndpointCaller.prototype.isErrorResponseBody = function (data) {
        if (data && data.statusCode) {
            return !this.isSuccessHttpStatus(data.statusCode);
        }
        else {
            return false;
        }
    };
    EndpointCaller.prototype.buildRequestHeaders = function (requestInfo) {
        var headers = {};
        if (this.options.accessToken) {
            headers['Authorization'] = "Bearer " + this.options.accessToken;
        }
        else if (this.options.username && this.options.password) {
            headers['Authorization'] = "Basic " + btoa(this.options.username + ':' + this.options.password);
        }
        if (requestInfo.method == 'GET') {
            return headers;
        }
        if (requestInfo.requestDataType.indexOf('application/json') === 0) {
            headers['Content-Type'] = 'application/json; charset=UTF-8';
        }
        else {
            headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
        }
        return headers;
    };
    EndpointCaller.JSONP_ERROR_TIMEOUT = 10000;
    return EndpointCaller;
}());
exports.EndpointCaller = EndpointCaller;


/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var CookieContext = /** @class */ (function () {
    function CookieContext() {
    }
    CookieContext.getHostname = function () {
        return location.hostname;
    };
    return CookieContext;
}());
exports.CookieContext = CookieContext;
// Code originally modified from : https://developers.livechatinc.com/blog/setting-cookies-to-subdomains-in-javascript/
// Should always match: https://github.com/coveo/coveo.analytics.js/blob/master/src/cookieutils.ts
var Cookie = /** @class */ (function () {
    function Cookie() {
    }
    Cookie.set = function (name, value, expire) {
        var domain, expirationDate, domainParts;
        if (expire) {
            expirationDate = new Date();
            expirationDate.setTime(expirationDate.getTime() + expire);
        }
        if (CookieContext.getHostname().indexOf('.') === -1) {
            // no "." in a domain - single domain name, it's localhost or something similar
            writeCookie(name, value, expirationDate);
        }
        else {
            domainParts = CookieContext.getHostname().split('.');
            // we always have at least 2 domain parts
            domain = domainParts[domainParts.length - 2] + '.' + domainParts[domainParts.length - 1];
            writeCookie(name, value, expirationDate, domain);
        }
    };
    Cookie.get = function (name) {
        var cookiePrefix = name + '=';
        var cookieArray = document.cookie.split(';');
        for (var i = 0; i < cookieArray.length; i++) {
            var cookie = cookieArray[i];
            cookie = cookie.replace(/^\s+/, ''); //strip whitespace from front of cookie only
            if (cookie.lastIndexOf(cookiePrefix, 0) === 0) {
                return cookie.substring(cookiePrefix.length, cookie.length);
            }
        }
        return null;
    };
    Cookie.erase = function (name) {
        this.set(name, '', -1);
    };
    return Cookie;
}());
function writeCookie(name, value, expirationDate, domain) {
    document.cookie =
        name + "=" + value +
            (expirationDate ? ";expires=" + expirationDate.toUTCString() : '') +
            (domain ? ";domain=" + domain : '') +
            ';SameSite=Lax';
}
var ScopedCookie = /** @class */ (function () {
    function ScopedCookie() {
    }
    ScopedCookie.set = function (name, value, expire) {
        Cookie.set(this.getRealCookieName(name), value, expire);
    };
    ScopedCookie.get = function (name) {
        return Cookie.get(this.getRealCookieName(name));
    };
    ScopedCookie.erase = function (name) {
        return Cookie.erase(this.getRealCookieName(name));
    };
    ScopedCookie.getRealCookieName = function (name) {
        return "" + this.prefix + name;
    };
    ScopedCookie.prefix = 'coveo_';
    return ScopedCookie;
}());
exports.ScopedCookie = ScopedCookie;


/***/ }),
/* 93 */,
/* 94 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var popper_js_1 = __webpack_require__(98);
var ResponsiveComponentsManager_1 = __webpack_require__(62);
var Assert_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(6);
var ComponentOptions_1 = __webpack_require__(8);
var ResponsiveDropdownContent = /** @class */ (function () {
    function ResponsiveDropdownContent(componentName, element, coveoRoot, minWidth, widthRatio) {
        this.element = element;
        Assert_1.Assert.isString(componentName);
        Assert_1.Assert.exists(element);
        Assert_1.Assert.exists(coveoRoot);
        Assert_1.Assert.isLargerOrEqualsThan(0, minWidth);
        Assert_1.Assert.isLargerOrEqualsThan(0, widthRatio);
        Assert_1.Assert.isSmallerOrEqualsThan(1, widthRatio);
        this.cssClassName = "coveo-" + componentName + "-dropdown-content";
        this.coveoRoot = coveoRoot;
        this.widthRatio = widthRatio;
        this.minWidth = minWidth;
    }
    ResponsiveDropdownContent.isTargetInsideOpenedDropdown = function (target) {
        Assert_1.Assert.exists(target);
        var targetParentDropdown = target.parent(ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        if (targetParentDropdown) {
            return targetParentDropdown.style.display != 'none';
        }
        return false;
    };
    ResponsiveDropdownContent.prototype.positionDropdown = function () {
        this.setElementAttributes();
        this.createPopper();
    };
    ResponsiveDropdownContent.prototype.hideDropdown = function () {
        if (this.popperReference) {
            this.unbindPopperEvents();
            this.popperReference.destroy();
        }
        this.unsetElementAttributes();
    };
    ResponsiveDropdownContent.prototype.cleanUp = function () {
        this.element.el.removeAttribute('style');
    };
    ResponsiveDropdownContent.prototype.setElementAttributes = function () {
        this.element.show();
        this.element.addClass(this.cssClassName);
        this.element.addClass(ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        this.element.setAttribute('role', 'group');
        this.element.setAttribute('aria-label', Strings_1.l('FiltersDropdown'));
        this.setElementWidth();
    };
    ResponsiveDropdownContent.prototype.setElementWidth = function () {
        var width = this.widthRatio * this.coveoRoot.width();
        if (width <= this.minWidth) {
            width = this.minWidth;
        }
        this.element.el.style.width = width.toString() + 'px';
    };
    ResponsiveDropdownContent.prototype.unsetElementAttributes = function () {
        this.element.hide();
        this.element.removeClass(this.cssClassName);
        this.element.removeClass(ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME);
        this.element.setAttribute('role', null);
        this.element.setAttribute('aria-label', null);
    };
    Object.defineProperty(ResponsiveDropdownContent.prototype, "popperReferenceElement", {
        get: function () {
            return this.coveoRoot.find("." + ResponsiveComponentsManager_1.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS);
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveDropdownContent.prototype.createPopper = function () {
        this.popperReference = new popper_js_1.default(this.popperReferenceElement, this.element.el, {
            placement: 'bottom-end',
            positionFixed: true,
            modifiers: {
                preventOverflow: {
                    boundariesElement: this.coveoRoot.el
                },
                computeStyle: {
                    gpuAcceleration: false
                }
            },
            eventsEnabled: false
        });
        this.bindPopperEvents();
    };
    Object.defineProperty(ResponsiveDropdownContent.prototype, "scrollableParent", {
        get: function () {
            return ComponentOptions_1.ComponentOptions.findParentScrolling(this.popperReferenceElement);
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveDropdownContent.prototype.bindPopperEvents = function () {
        var _this = this;
        Dom_1.$$(this.scrollableParent).on(['scroll', 'resize'], function () {
            _this.popperReference.update();
        });
    };
    ResponsiveDropdownContent.prototype.unbindPopperEvents = function () {
        var _this = this;
        Dom_1.$$(this.scrollableParent).off(['scroll', 'resize'], function () {
            _this.popperReference.update();
        });
    };
    ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME = 'coveo-dropdown-content';
    return ResponsiveDropdownContent;
}());
exports.ResponsiveDropdownContent = ResponsiveDropdownContent;


/***/ }),
/* 95 */,
/* 96 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(27);
var DefaultResultTemplate_1 = __webpack_require__(123);
var Assert_1 = __webpack_require__(5);
var _ = __webpack_require__(0);
var TemplateList = /** @class */ (function (_super) {
    __extends(TemplateList, _super);
    function TemplateList(templates) {
        var _this = _super.call(this) || this;
        _this.templates = templates;
        Assert_1.Assert.exists(templates);
        return _this;
    }
    TemplateList.prototype.instantiateToString = function (object, instantiateOptions) {
        if (instantiateOptions === void 0) { instantiateOptions = {}; }
        var merged = new Template_1.DefaultInstantiateTemplateOptions().merge(instantiateOptions);
        var filteredTemplates = _.reject(this.templates, function (t) { return t.role != null; });
        for (var i = 0; i < filteredTemplates.length; i++) {
            var result = filteredTemplates[i].instantiateToString(object, merged);
            if (result != null) {
                return result;
            }
        }
        return this.getFallbackTemplate().instantiateToString(object, instantiateOptions);
    };
    TemplateList.prototype.instantiateToElement = function (object, instantiateOptions) {
        if (instantiateOptions === void 0) { instantiateOptions = {}; }
        var merged = new Template_1.DefaultInstantiateTemplateOptions().merge(instantiateOptions);
        var filteredTemplates = _.reject(this.templates, function (t) { return t.role != null; });
        for (var i = 0; i < filteredTemplates.length; i++) {
            var promiseOfHTMLElement = filteredTemplates[i].instantiateToElement(object, merged);
            if (promiseOfHTMLElement != null) {
                return promiseOfHTMLElement;
            }
        }
        return this.getFallbackTemplate().instantiateToElement(object, merged);
    };
    TemplateList.prototype.getFields = function () {
        return _.reduce(this.templates, function (fields, template) { return fields.concat(template.getFields()); }, []);
    };
    TemplateList.prototype.getType = function () {
        return 'TemplateList';
    };
    TemplateList.prototype.getFallbackTemplate = function () {
        return new DefaultResultTemplate_1.DefaultResultTemplate();
    };
    return TemplateList;
}(Template_1.Template));
exports.TemplateList = TemplateList;


/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var DateUtils_1 = __webpack_require__(33);
var FileTypes_1 = __webpack_require__(121);
var Utils_1 = __webpack_require__(4);
var StringUtils_1 = __webpack_require__(22);
var SVGIcons_1 = __webpack_require__(12);
var RegisteredNamedMethods_1 = __webpack_require__(30);
var Logger_1 = __webpack_require__(9);
var Core_1 = __webpack_require__(20);
var Assert_1 = __webpack_require__(5);
var DomUtils = /** @class */ (function () {
    function DomUtils() {
    }
    DomUtils.getPopUpCloseButton = function (captionForClose, captionForReminder) {
        var container = document.createElement('span');
        var closeButton = document.createElement('span');
        Dom_1.$$(closeButton).addClass('coveo-close-button');
        container.appendChild(closeButton);
        var iconClose = document.createElement('span');
        Dom_1.$$(iconClose).addClass('coveo-icon');
        Dom_1.$$(iconClose).addClass('coveo-sprites-quickview-close');
        closeButton.appendChild(iconClose);
        Dom_1.$$(closeButton).text(captionForClose);
        var closeReminder = document.createElement('span');
        Dom_1.$$(closeReminder).addClass('coveo-pop-up-reminder');
        Dom_1.$$(closeReminder).text(captionForReminder);
        container.appendChild(closeReminder);
        return container.outerHTML;
    };
    DomUtils.getBasicLoadingAnimation = function () {
        var loadDotClass = 'coveo-loading-dot';
        var dom = document.createElement('div');
        dom.className = 'coveo-first-loading-animation';
        dom.innerHTML = "<div class='coveo-logo'>" + SVGIcons_1.SVGIcons.icons.coveoLogo + "</div>\n    <div class='coveo-loading-container'>\n      <div class='" + loadDotClass + "'></div>\n      <div class='" + loadDotClass + "'></div>\n      <div class='" + loadDotClass + "'></div>\n      <div class='" + loadDotClass + "'></div>\n    </div>";
        return dom;
    };
    DomUtils.highlight = function (content, classToApply, htmlEncode) {
        if (classToApply === void 0) { classToApply = 'coveo-highlight'; }
        if (htmlEncode === void 0) { htmlEncode = true; }
        var trimmedClass = classToApply !== null ? classToApply.trim() : null;
        if (trimmedClass !== null) {
            Assert_1.Assert.check(/^([^\s\-][a-z\s\-]*[^\s\-])?$/i.test(trimmedClass), 'Invalid class');
        }
        return "<span" + (trimmedClass !== null && trimmedClass.length > 0 ? " class='" + trimmedClass + "'" : '') + ">" + (htmlEncode ? StringUtils_1.StringUtils.htmlEncode(content) : content) + "</span>";
    };
    DomUtils.highlightElement = function (initialString, valueToSearch, classToApply) {
        if (classToApply === void 0) { classToApply = 'coveo-highlight'; }
        var regex = new RegExp(Utils_1.Utils.escapeRegexCharacter(StringUtils_1.StringUtils.latinize(valueToSearch)), 'i');
        var firstChar = StringUtils_1.StringUtils.latinize(initialString).search(regex);
        if (firstChar >= 0) {
            var lastChar = firstChar + valueToSearch.length;
            return (StringUtils_1.StringUtils.htmlEncode(initialString.slice(0, firstChar)) +
                this.highlight(initialString.slice(firstChar, lastChar), classToApply, true) +
                StringUtils_1.StringUtils.htmlEncode(initialString.slice(lastChar)));
        }
        else {
            return initialString;
        }
    };
    DomUtils.getLoadingSpinner = function () {
        var loading = Dom_1.$$('div', {
            className: 'coveo-loading-spinner'
        });
        return loading.el;
    };
    DomUtils.getModalBoxHeader = function (title) {
        var header = Dom_1.$$('div');
        header.el.innerHTML = "<div class='coveo-modalbox-right-header'>\n        <span class='coveo-modalbox-close-button'>\n          <span class='coveo-icon coveo-sprites-common-clear'></span>\n        </span>\n      </div>\n      <div class='coveo-modalbox-left-header'>\n        <span class='coveo-modalbox-pop-up-reminder'> " + (title || '') + "</span>\n      </div>";
        return header;
    };
    DomUtils.getQuickviewHeader = function (result, options, bindings) {
        var date = '';
        if (options.showDate) {
            var dateValueFromResult = Utils_1.Utils.getFieldValue(result, 'date');
            if (dateValueFromResult) {
                date = DateUtils_1.DateUtils.dateTimeToString(new Date(dateValueFromResult));
            }
        }
        var fileType = FileTypes_1.FileTypes.get(result);
        var header = Dom_1.$$('div');
        header.el.innerHTML = "<div class='coveo-quickview-right-header'>\n        <span class='coveo-quickview-time'>" + date + "</span>\n        <span class='coveo-quickview-close-button'>\n          <span class='coveo-icon coveo-sprites-common-clear'></span>\n        </span>\n      </div>\n      <div class='coveo-quickview-left-header'>\n        <span class='coveo-quickview-icon coveo-small " + fileType.icon + "'></span>\n      </div>";
        var clickableLinkElement = Dom_1.$$('a', { className: 'coveo-quickview-pop-up-reminder' });
        var toLoad = Coveo['Salesforce'] ? 'SalesforceResultLink' : 'ResultLink';
        var resultForResultLink = __assign({}, result);
        if (options.title) {
            resultForResultLink.title = options.title;
        }
        DomUtils.loadResultLink(toLoad, clickableLinkElement, header, resultForResultLink, options);
        return header;
    };
    DomUtils.loadResultLink = function (toLoad, clickableLinkElement, header, resultForResultLink, options) {
        return __awaiter(this, void 0, void 0, function () {
            var err_1, logger;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, , 3]);
                        return [4 /*yield*/, RegisteredNamedMethods_1.load(toLoad)];
                    case 1:
                        _a.sent();
                        clickableLinkElement.addClass("Coveo" + toLoad);
                        Core_1.Initialization.automaticallyCreateComponentsInsideResult(clickableLinkElement.el, resultForResultLink);
                        return [3 /*break*/, 3];
                    case 2:
                        err_1 = _a.sent();
                        logger = new Logger_1.Logger(this);
                        logger.error("Failed to load module " + toLoad + " : " + err_1);
                        logger.info("Fallback on displaying a non clickable header");
                        clickableLinkElement.text(options.title);
                        return [3 /*break*/, 3];
                    case 3:
                        Dom_1.$$(header.find('.coveo-quickview-left-header')).append(clickableLinkElement.el);
                        return [2 /*return*/];
                }
            });
        });
    };
    return DomUtils;
}());
exports.DomUtils = DomUtils;


/***/ }),
/* 98 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* WEBPACK VAR INJECTION */(function(global) {/**!
 * @fileOverview Kickass library to create and place poppers near their reference elements.
 * @version 1.14.3
 * @license
 * Copyright (c) 2016 Federico Zivolo and contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';

var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
var timeoutDuration = 0;
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
  if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
    timeoutDuration = 1;
    break;
  }
}

function microtaskDebounce(fn) {
  var called = false;
  return function () {
    if (called) {
      return;
    }
    called = true;
    window.Promise.resolve().then(function () {
      called = false;
      fn();
    });
  };
}

function taskDebounce(fn) {
  var scheduled = false;
  return function () {
    if (!scheduled) {
      scheduled = true;
      setTimeout(function () {
        scheduled = false;
        fn();
      }, timeoutDuration);
    }
  };
}

var supportsMicroTasks = isBrowser && window.Promise;

/**
* Create a debounced version of a method, that's asynchronously deferred
* but called in the minimum time possible.
*
* @method
* @memberof Popper.Utils
* @argument {Function} fn
* @returns {Function}
*/
var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;

/**
 * Check if the given variable is a function
 * @method
 * @memberof Popper.Utils
 * @argument {Any} functionToCheck - variable to check
 * @returns {Boolean} answer to: is a function?
 */
function isFunction(functionToCheck) {
  var getType = {};
  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
}

/**
 * Get CSS computed property of the given element
 * @method
 * @memberof Popper.Utils
 * @argument {Eement} element
 * @argument {String} property
 */
function getStyleComputedProperty(element, property) {
  if (element.nodeType !== 1) {
    return [];
  }
  // NOTE: 1 DOM access here
  var css = getComputedStyle(element, null);
  return property ? css[property] : css;
}

/**
 * Returns the parentNode or the host of the element
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Element} parent
 */
function getParentNode(element) {
  if (element.nodeName === 'HTML') {
    return element;
  }
  return element.parentNode || element.host;
}

/**
 * Returns the scrolling parent of the given element
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Element} scroll parent
 */
function getScrollParent(element) {
  // Return body, `getScroll` will take care to get the correct `scrollTop` from it
  if (!element) {
    return document.body;
  }

  switch (element.nodeName) {
    case 'HTML':
    case 'BODY':
      return element.ownerDocument.body;
    case '#document':
      return element.body;
  }

  // Firefox want us to check `-x` and `-y` variations as well

  var _getStyleComputedProp = getStyleComputedProperty(element),
      overflow = _getStyleComputedProp.overflow,
      overflowX = _getStyleComputedProp.overflowX,
      overflowY = _getStyleComputedProp.overflowY;

  if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
    return element;
  }

  return getScrollParent(getParentNode(element));
}

var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);

/**
 * Determines if the browser is Internet Explorer
 * @method
 * @memberof Popper.Utils
 * @param {Number} version to check
 * @returns {Boolean} isIE
 */
function isIE(version) {
  if (version === 11) {
    return isIE11;
  }
  if (version === 10) {
    return isIE10;
  }
  return isIE11 || isIE10;
}

/**
 * Returns the offset parent of the given element
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Element} offset parent
 */
function getOffsetParent(element) {
  if (!element) {
    return document.documentElement;
  }

  var noOffsetParent = isIE(10) ? document.body : null;

  // NOTE: 1 DOM access here
  var offsetParent = element.offsetParent;
  // Skip hidden elements which don't have an offsetParent
  while (offsetParent === noOffsetParent && element.nextElementSibling) {
    offsetParent = (element = element.nextElementSibling).offsetParent;
  }

  var nodeName = offsetParent && offsetParent.nodeName;

  if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
    return element ? element.ownerDocument.documentElement : document.documentElement;
  }

  // .offsetParent will return the closest TD or TABLE in case
  // no offsetParent is present, I hate this job...
  if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
    return getOffsetParent(offsetParent);
  }

  return offsetParent;
}

function isOffsetContainer(element) {
  var nodeName = element.nodeName;

  if (nodeName === 'BODY') {
    return false;
  }
  return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
}

/**
 * Finds the root node (document, shadowDOM root) of the given element
 * @method
 * @memberof Popper.Utils
 * @argument {Element} node
 * @returns {Element} root node
 */
function getRoot(node) {
  if (node.parentNode !== null) {
    return getRoot(node.parentNode);
  }

  return node;
}

/**
 * Finds the offset parent common to the two provided nodes
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element1
 * @argument {Element} element2
 * @returns {Element} common offset parent
 */
function findCommonOffsetParent(element1, element2) {
  // This check is needed to avoid errors in case one of the elements isn't defined for any reason
  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
    return document.documentElement;
  }

  // Here we make sure to give as "start" the element that comes first in the DOM
  var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
  var start = order ? element1 : element2;
  var end = order ? element2 : element1;

  // Get common ancestor container
  var range = document.createRange();
  range.setStart(start, 0);
  range.setEnd(end, 0);
  var commonAncestorContainer = range.commonAncestorContainer;

  // Both nodes are inside #document

  if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
    if (isOffsetContainer(commonAncestorContainer)) {
      return commonAncestorContainer;
    }

    return getOffsetParent(commonAncestorContainer);
  }

  // one of the nodes is inside shadowDOM, find which one
  var element1root = getRoot(element1);
  if (element1root.host) {
    return findCommonOffsetParent(element1root.host, element2);
  } else {
    return findCommonOffsetParent(element1, getRoot(element2).host);
  }
}

/**
 * Gets the scroll value of the given element in the given side (top and left)
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @argument {String} side `top` or `left`
 * @returns {number} amount of scrolled pixels
 */
function getScroll(element) {
  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';

  var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
  var nodeName = element.nodeName;

  if (nodeName === 'BODY' || nodeName === 'HTML') {
    var html = element.ownerDocument.documentElement;
    var scrollingElement = element.ownerDocument.scrollingElement || html;
    return scrollingElement[upperSide];
  }

  return element[upperSide];
}

/*
 * Sum or subtract the element scroll values (left and top) from a given rect object
 * @method
 * @memberof Popper.Utils
 * @param {Object} rect - Rect object you want to change
 * @param {HTMLElement} element - The element from the function reads the scroll values
 * @param {Boolean} subtract - set to true if you want to subtract the scroll values
 * @return {Object} rect - The modifier rect object
 */
function includeScroll(rect, element) {
  var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

  var scrollTop = getScroll(element, 'top');
  var scrollLeft = getScroll(element, 'left');
  var modifier = subtract ? -1 : 1;
  rect.top += scrollTop * modifier;
  rect.bottom += scrollTop * modifier;
  rect.left += scrollLeft * modifier;
  rect.right += scrollLeft * modifier;
  return rect;
}

/*
 * Helper to detect borders of a given element
 * @method
 * @memberof Popper.Utils
 * @param {CSSStyleDeclaration} styles
 * Result of `getStyleComputedProperty` on the given element
 * @param {String} axis - `x` or `y`
 * @return {number} borders - The borders size of the given axis
 */

function getBordersSize(styles, axis) {
  var sideA = axis === 'x' ? 'Left' : 'Top';
  var sideB = sideA === 'Left' ? 'Right' : 'Bottom';

  return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10);
}

function getSize(axis, body, html, computedStyle) {
  return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);
}

function getWindowSizes() {
  var body = document.body;
  var html = document.documentElement;
  var computedStyle = isIE(10) && getComputedStyle(html);

  return {
    height: getSize('Height', body, html, computedStyle),
    width: getSize('Width', body, html, computedStyle)
  };
}

var classCallCheck = function (instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
};

var createClass = function () {
  function defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
  }

  return function (Constructor, protoProps, staticProps) {
    if (protoProps) defineProperties(Constructor.prototype, protoProps);
    if (staticProps) defineProperties(Constructor, staticProps);
    return Constructor;
  };
}();





var defineProperty = function (obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
};

var _extends = Object.assign || function (target) {
  for (var i = 1; i < arguments.length; i++) {
    var source = arguments[i];

    for (var key in source) {
      if (Object.prototype.hasOwnProperty.call(source, key)) {
        target[key] = source[key];
      }
    }
  }

  return target;
};

/**
 * Given element offsets, generate an output similar to getBoundingClientRect
 * @method
 * @memberof Popper.Utils
 * @argument {Object} offsets
 * @returns {Object} ClientRect like output
 */
function getClientRect(offsets) {
  return _extends({}, offsets, {
    right: offsets.left + offsets.width,
    bottom: offsets.top + offsets.height
  });
}

/**
 * Get bounding client rect of given element
 * @method
 * @memberof Popper.Utils
 * @param {HTMLElement} element
 * @return {Object} client rect
 */
function getBoundingClientRect(element) {
  var rect = {};

  // IE10 10 FIX: Please, don't ask, the element isn't
  // considered in DOM in some circumstances...
  // This isn't reproducible in IE10 compatibility mode of IE11
  try {
    if (isIE(10)) {
      rect = element.getBoundingClientRect();
      var scrollTop = getScroll(element, 'top');
      var scrollLeft = getScroll(element, 'left');
      rect.top += scrollTop;
      rect.left += scrollLeft;
      rect.bottom += scrollTop;
      rect.right += scrollLeft;
    } else {
      rect = element.getBoundingClientRect();
    }
  } catch (e) {}

  var result = {
    left: rect.left,
    top: rect.top,
    width: rect.right - rect.left,
    height: rect.bottom - rect.top
  };

  // subtract scrollbar size from sizes
  var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};
  var width = sizes.width || element.clientWidth || result.right - result.left;
  var height = sizes.height || element.clientHeight || result.bottom - result.top;

  var horizScrollbar = element.offsetWidth - width;
  var vertScrollbar = element.offsetHeight - height;

  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
  // we make this check conditional for performance reasons
  if (horizScrollbar || vertScrollbar) {
    var styles = getStyleComputedProperty(element);
    horizScrollbar -= getBordersSize(styles, 'x');
    vertScrollbar -= getBordersSize(styles, 'y');

    result.width -= horizScrollbar;
    result.height -= vertScrollbar;
  }

  return getClientRect(result);
}

function getOffsetRectRelativeToArbitraryNode(children, parent) {
  var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

  var isIE10 = isIE(10);
  var isHTML = parent.nodeName === 'HTML';
  var childrenRect = getBoundingClientRect(children);
  var parentRect = getBoundingClientRect(parent);
  var scrollParent = getScrollParent(children);

  var styles = getStyleComputedProperty(parent);
  var borderTopWidth = parseFloat(styles.borderTopWidth, 10);
  var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);

  // In cases where the parent is fixed, we must ignore negative scroll in offset calc
  if (fixedPosition && parent.nodeName === 'HTML') {
    parentRect.top = Math.max(parentRect.top, 0);
    parentRect.left = Math.max(parentRect.left, 0);
  }
  var offsets = getClientRect({
    top: childrenRect.top - parentRect.top - borderTopWidth,
    left: childrenRect.left - parentRect.left - borderLeftWidth,
    width: childrenRect.width,
    height: childrenRect.height
  });
  offsets.marginTop = 0;
  offsets.marginLeft = 0;

  // Subtract margins of documentElement in case it's being used as parent
  // we do this only on HTML because it's the only element that behaves
  // differently when margins are applied to it. The margins are included in
  // the box of the documentElement, in the other cases not.
  if (!isIE10 && isHTML) {
    var marginTop = parseFloat(styles.marginTop, 10);
    var marginLeft = parseFloat(styles.marginLeft, 10);

    offsets.top -= borderTopWidth - marginTop;
    offsets.bottom -= borderTopWidth - marginTop;
    offsets.left -= borderLeftWidth - marginLeft;
    offsets.right -= borderLeftWidth - marginLeft;

    // Attach marginTop and marginLeft because in some circumstances we may need them
    offsets.marginTop = marginTop;
    offsets.marginLeft = marginLeft;
  }

  if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
    offsets = includeScroll(offsets, parent);
  }

  return offsets;
}

function getViewportOffsetRectRelativeToArtbitraryNode(element) {
  var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

  var html = element.ownerDocument.documentElement;
  var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
  var width = Math.max(html.clientWidth, window.innerWidth || 0);
  var height = Math.max(html.clientHeight, window.innerHeight || 0);

  var scrollTop = !excludeScroll ? getScroll(html) : 0;
  var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;

  var offset = {
    top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
    left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
    width: width,
    height: height
  };

  return getClientRect(offset);
}

/**
 * Check if the given element is fixed or is inside a fixed parent
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @argument {Element} customContainer
 * @returns {Boolean} answer to "isFixed?"
 */
function isFixed(element) {
  var nodeName = element.nodeName;
  if (nodeName === 'BODY' || nodeName === 'HTML') {
    return false;
  }
  if (getStyleComputedProperty(element, 'position') === 'fixed') {
    return true;
  }
  return isFixed(getParentNode(element));
}

/**
 * Finds the first parent of an element that has a transformed property defined
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Element} first transformed parent or documentElement
 */

function getFixedPositionOffsetParent(element) {
  // This check is needed to avoid errors in case one of the elements isn't defined for any reason
  if (!element || !element.parentElement || isIE()) {
    return document.documentElement;
  }
  var el = element.parentElement;
  while (el && getStyleComputedProperty(el, 'transform') === 'none') {
    el = el.parentElement;
  }
  return el || document.documentElement;
}

/**
 * Computed the boundaries limits and return them
 * @method
 * @memberof Popper.Utils
 * @param {HTMLElement} popper
 * @param {HTMLElement} reference
 * @param {number} padding
 * @param {HTMLElement} boundariesElement - Element used to define the boundaries
 * @param {Boolean} fixedPosition - Is in fixed position mode
 * @returns {Object} Coordinates of the boundaries
 */
function getBoundaries(popper, reference, padding, boundariesElement) {
  var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;

  // NOTE: 1 DOM access here

  var boundaries = { top: 0, left: 0 };
  var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);

  // Handle viewport case
  if (boundariesElement === 'viewport') {
    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
  } else {
    // Handle other cases based on DOM element used as boundaries
    var boundariesNode = void 0;
    if (boundariesElement === 'scrollParent') {
      boundariesNode = getScrollParent(getParentNode(reference));
      if (boundariesNode.nodeName === 'BODY') {
        boundariesNode = popper.ownerDocument.documentElement;
      }
    } else if (boundariesElement === 'window') {
      boundariesNode = popper.ownerDocument.documentElement;
    } else {
      boundariesNode = boundariesElement;
    }

    var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);

    // In case of HTML, we need a different computation
    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
      var _getWindowSizes = getWindowSizes(),
          height = _getWindowSizes.height,
          width = _getWindowSizes.width;

      boundaries.top += offsets.top - offsets.marginTop;
      boundaries.bottom = height + offsets.top;
      boundaries.left += offsets.left - offsets.marginLeft;
      boundaries.right = width + offsets.left;
    } else {
      // for all the other DOM elements, this one is good
      boundaries = offsets;
    }
  }

  // Add paddings
  boundaries.left += padding;
  boundaries.top += padding;
  boundaries.right -= padding;
  boundaries.bottom -= padding;

  return boundaries;
}

function getArea(_ref) {
  var width = _ref.width,
      height = _ref.height;

  return width * height;
}

/**
 * Utility used to transform the `auto` placement to the placement with more
 * available space.
 * @method
 * @memberof Popper.Utils
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
  var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;

  if (placement.indexOf('auto') === -1) {
    return placement;
  }

  var boundaries = getBoundaries(popper, reference, padding, boundariesElement);

  var rects = {
    top: {
      width: boundaries.width,
      height: refRect.top - boundaries.top
    },
    right: {
      width: boundaries.right - refRect.right,
      height: boundaries.height
    },
    bottom: {
      width: boundaries.width,
      height: boundaries.bottom - refRect.bottom
    },
    left: {
      width: refRect.left - boundaries.left,
      height: boundaries.height
    }
  };

  var sortedAreas = Object.keys(rects).map(function (key) {
    return _extends({
      key: key
    }, rects[key], {
      area: getArea(rects[key])
    });
  }).sort(function (a, b) {
    return b.area - a.area;
  });

  var filteredAreas = sortedAreas.filter(function (_ref2) {
    var width = _ref2.width,
        height = _ref2.height;
    return width >= popper.clientWidth && height >= popper.clientHeight;
  });

  var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;

  var variation = placement.split('-')[1];

  return computedPlacement + (variation ? '-' + variation : '');
}

/**
 * Get offsets to the reference element
 * @method
 * @memberof Popper.Utils
 * @param {Object} state
 * @param {Element} popper - the popper element
 * @param {Element} reference - the reference element (the popper will be relative to this)
 * @param {Element} fixedPosition - is in fixed position mode
 * @returns {Object} An object containing the offsets which will be applied to the popper
 */
function getReferenceOffsets(state, popper, reference) {
  var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

  var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference);
  return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
}

/**
 * Get the outer sizes of the given element (offset size + margins)
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element
 * @returns {Object} object containing width and height properties
 */
function getOuterSizes(element) {
  var styles = getComputedStyle(element);
  var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
  var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
  var result = {
    width: element.offsetWidth + y,
    height: element.offsetHeight + x
  };
  return result;
}

/**
 * Get the opposite placement of the given one
 * @method
 * @memberof Popper.Utils
 * @argument {String} placement
 * @returns {String} flipped placement
 */
function getOppositePlacement(placement) {
  var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
  return placement.replace(/left|right|bottom|top/g, function (matched) {
    return hash[matched];
  });
}

/**
 * Get offsets to the popper
 * @method
 * @memberof Popper.Utils
 * @param {Object} position - CSS position the Popper will get applied
 * @param {HTMLElement} popper - the popper element
 * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
 * @param {String} placement - one of the valid placement options
 * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
 */
function getPopperOffsets(popper, referenceOffsets, placement) {
  placement = placement.split('-')[0];

  // Get popper node sizes
  var popperRect = getOuterSizes(popper);

  // Add position, width and height to our offsets object
  var popperOffsets = {
    width: popperRect.width,
    height: popperRect.height
  };

  // depending by the popper placement we have to compute its offsets slightly differently
  var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
  var mainSide = isHoriz ? 'top' : 'left';
  var secondarySide = isHoriz ? 'left' : 'top';
  var measurement = isHoriz ? 'height' : 'width';
  var secondaryMeasurement = !isHoriz ? 'height' : 'width';

  popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
  if (placement === secondarySide) {
    popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
  } else {
    popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
  }

  return popperOffsets;
}

/**
 * Mimics the `find` method of Array
 * @method
 * @memberof Popper.Utils
 * @argument {Array} arr
 * @argument prop
 * @argument value
 * @returns index or -1
 */
function find(arr, check) {
  // use native find if supported
  if (Array.prototype.find) {
    return arr.find(check);
  }

  // use `filter` to obtain the same behavior of `find`
  return arr.filter(check)[0];
}

/**
 * Return the index of the matching object
 * @method
 * @memberof Popper.Utils
 * @argument {Array} arr
 * @argument prop
 * @argument value
 * @returns index or -1
 */
function findIndex(arr, prop, value) {
  // use native findIndex if supported
  if (Array.prototype.findIndex) {
    return arr.findIndex(function (cur) {
      return cur[prop] === value;
    });
  }

  // use `find` + `indexOf` if `findIndex` isn't supported
  var match = find(arr, function (obj) {
    return obj[prop] === value;
  });
  return arr.indexOf(match);
}

/**
 * Loop trough the list of modifiers and run them in order,
 * each of them will then edit the data object.
 * @method
 * @memberof Popper.Utils
 * @param {dataObject} data
 * @param {Array} modifiers
 * @param {String} ends - Optional modifier name used as stopper
 * @returns {dataObject}
 */
function runModifiers(modifiers, data, ends) {
  var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));

  modifiersToRun.forEach(function (modifier) {
    if (modifier['function']) {
      // eslint-disable-line dot-notation
      console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
    }
    var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
    if (modifier.enabled && isFunction(fn)) {
      // Add properties to offsets to make them a complete clientRect object
      // we do this before each modifier to make sure the previous one doesn't
      // mess with these values
      data.offsets.popper = getClientRect(data.offsets.popper);
      data.offsets.reference = getClientRect(data.offsets.reference);

      data = fn(data, modifier);
    }
  });

  return data;
}

/**
 * Updates the position of the popper, computing the new offsets and applying
 * the new style.<br />
 * Prefer `scheduleUpdate` over `update` because of performance reasons.
 * @method
 * @memberof Popper
 */
function update() {
  // if popper is destroyed, don't perform any further update
  if (this.state.isDestroyed) {
    return;
  }

  var data = {
    instance: this,
    styles: {},
    arrowStyles: {},
    attributes: {},
    flipped: false,
    offsets: {}
  };

  // compute reference element offsets
  data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);

  // compute auto placement, store placement inside the data object,
  // modifiers will be able to edit `placement` if needed
  // and refer to originalPlacement to know the original value
  data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);

  // store the computed placement inside `originalPlacement`
  data.originalPlacement = data.placement;

  data.positionFixed = this.options.positionFixed;

  // compute the popper offsets
  data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);

  data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';

  // run the modifiers
  data = runModifiers(this.modifiers, data);

  // the first `update` will call `onCreate` callback
  // the other ones will call `onUpdate` callback
  if (!this.state.isCreated) {
    this.state.isCreated = true;
    this.options.onCreate(data);
  } else {
    this.options.onUpdate(data);
  }
}

/**
 * Helper used to know if the given modifier is enabled.
 * @method
 * @memberof Popper.Utils
 * @returns {Boolean}
 */
function isModifierEnabled(modifiers, modifierName) {
  return modifiers.some(function (_ref) {
    var name = _ref.name,
        enabled = _ref.enabled;
    return enabled && name === modifierName;
  });
}

/**
 * Get the prefixed supported property name
 * @method
 * @memberof Popper.Utils
 * @argument {String} property (camelCase)
 * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
 */
function getSupportedPropertyName(property) {
  var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
  var upperProp = property.charAt(0).toUpperCase() + property.slice(1);

  for (var i = 0; i < prefixes.length; i++) {
    var prefix = prefixes[i];
    var toCheck = prefix ? '' + prefix + upperProp : property;
    if (typeof document.body.style[toCheck] !== 'undefined') {
      return toCheck;
    }
  }
  return null;
}

/**
 * Destroy the popper
 * @method
 * @memberof Popper
 */
function destroy() {
  this.state.isDestroyed = true;

  // touch DOM only if `applyStyle` modifier is enabled
  if (isModifierEnabled(this.modifiers, 'applyStyle')) {
    this.popper.removeAttribute('x-placement');
    this.popper.style.position = '';
    this.popper.style.top = '';
    this.popper.style.left = '';
    this.popper.style.right = '';
    this.popper.style.bottom = '';
    this.popper.style.willChange = '';
    this.popper.style[getSupportedPropertyName('transform')] = '';
  }

  this.disableEventListeners();

  // remove the popper if user explicity asked for the deletion on destroy
  // do not use `remove` because IE11 doesn't support it
  if (this.options.removeOnDestroy) {
    this.popper.parentNode.removeChild(this.popper);
  }
  return this;
}

/**
 * Get the window associated with the element
 * @argument {Element} element
 * @returns {Window}
 */
function getWindow(element) {
  var ownerDocument = element.ownerDocument;
  return ownerDocument ? ownerDocument.defaultView : window;
}

function attachToScrollParents(scrollParent, event, callback, scrollParents) {
  var isBody = scrollParent.nodeName === 'BODY';
  var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
  target.addEventListener(event, callback, { passive: true });

  if (!isBody) {
    attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
  }
  scrollParents.push(target);
}

/**
 * Setup needed event listeners used to update the popper position
 * @method
 * @memberof Popper.Utils
 * @private
 */
function setupEventListeners(reference, options, state, updateBound) {
  // Resize event listener on window
  state.updateBound = updateBound;
  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });

  // Scroll event listener on scroll parents
  var scrollElement = getScrollParent(reference);
  attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
  state.scrollElement = scrollElement;
  state.eventsEnabled = true;

  return state;
}

/**
 * It will add resize/scroll events and start recalculating
 * position of the popper element when they are triggered.
 * @method
 * @memberof Popper
 */
function enableEventListeners() {
  if (!this.state.eventsEnabled) {
    this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
  }
}

/**
 * Remove event listeners used to update the popper position
 * @method
 * @memberof Popper.Utils
 * @private
 */
function removeEventListeners(reference, state) {
  // Remove resize event listener on window
  getWindow(reference).removeEventListener('resize', state.updateBound);

  // Remove scroll event listener on scroll parents
  state.scrollParents.forEach(function (target) {
    target.removeEventListener('scroll', state.updateBound);
  });

  // Reset state
  state.updateBound = null;
  state.scrollParents = [];
  state.scrollElement = null;
  state.eventsEnabled = false;
  return state;
}

/**
 * It will remove resize/scroll events and won't recalculate popper position
 * when they are triggered. It also won't trigger onUpdate callback anymore,
 * unless you call `update` method manually.
 * @method
 * @memberof Popper
 */
function disableEventListeners() {
  if (this.state.eventsEnabled) {
    cancelAnimationFrame(this.scheduleUpdate);
    this.state = removeEventListeners(this.reference, this.state);
  }
}

/**
 * Tells if a given input is a number
 * @method
 * @memberof Popper.Utils
 * @param {*} input to check
 * @return {Boolean}
 */
function isNumeric(n) {
  return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
}

/**
 * Set the style to the given popper
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element - Element to apply the style to
 * @argument {Object} styles
 * Object with a list of properties and values which will be applied to the element
 */
function setStyles(element, styles) {
  Object.keys(styles).forEach(function (prop) {
    var unit = '';
    // add unit if the value is numeric and is one of the following
    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
      unit = 'px';
    }
    element.style[prop] = styles[prop] + unit;
  });
}

/**
 * Set the attributes to the given popper
 * @method
 * @memberof Popper.Utils
 * @argument {Element} element - Element to apply the attributes to
 * @argument {Object} styles
 * Object with a list of properties and values which will be applied to the element
 */
function setAttributes(element, attributes) {
  Object.keys(attributes).forEach(function (prop) {
    var value = attributes[prop];
    if (value !== false) {
      element.setAttribute(prop, attributes[prop]);
    } else {
      element.removeAttribute(prop);
    }
  });
}

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} data.styles - List of style properties - values to apply to popper element
 * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The same data object
 */
function applyStyle(data) {
  // any property present in `data.styles` will be applied to the popper,
  // in this way we can make the 3rd party modifiers add custom styles to it
  // Be aware, modifiers could override the properties defined in the previous
  // lines of this modifier!
  setStyles(data.instance.popper, data.styles);

  // any property present in `data.attributes` will be applied to the popper,
  // they will be set as HTML attributes of the element
  setAttributes(data.instance.popper, data.attributes);

  // if arrowElement is defined and arrowStyles has some properties
  if (data.arrowElement && Object.keys(data.arrowStyles).length) {
    setStyles(data.arrowElement, data.arrowStyles);
  }

  return data;
}

/**
 * Set the x-placement attribute before everything else because it could be used
 * to add margins to the popper margins needs to be calculated to get the
 * correct popper offsets.
 * @method
 * @memberof Popper.modifiers
 * @param {HTMLElement} reference - The reference element used to position the popper
 * @param {HTMLElement} popper - The HTML element used as popper
 * @param {Object} options - Popper.js options
 */
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
  // compute reference element offsets
  var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);

  // compute auto placement, store placement inside the data object,
  // modifiers will be able to edit `placement` if needed
  // and refer to originalPlacement to know the original value
  var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);

  popper.setAttribute('x-placement', placement);

  // Apply `position` to popper before anything else because
  // without the position applied we can't guarantee correct computations
  setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });

  return options;
}

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function computeStyle(data, options) {
  var x = options.x,
      y = options.y;
  var popper = data.offsets.popper;

  // Remove this legacy support in Popper.js v2

  var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
    return modifier.name === 'applyStyle';
  }).gpuAcceleration;
  if (legacyGpuAccelerationOption !== undefined) {
    console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
  }
  var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;

  var offsetParent = getOffsetParent(data.instance.popper);
  var offsetParentRect = getBoundingClientRect(offsetParent);

  // Styles
  var styles = {
    position: popper.position
  };

  // Avoid blurry text by using full pixel integers.
  // For pixel-perfect positioning, top/bottom prefers rounded
  // values, while left/right prefers floored values.
  var offsets = {
    left: Math.floor(popper.left),
    top: Math.round(popper.top),
    bottom: Math.round(popper.bottom),
    right: Math.floor(popper.right)
  };

  var sideA = x === 'bottom' ? 'top' : 'bottom';
  var sideB = y === 'right' ? 'left' : 'right';

  // if gpuAcceleration is set to `true` and transform is supported,
  //  we use `translate3d` to apply the position to the popper we
  // automatically use the supported prefixed version if needed
  var prefixedProperty = getSupportedPropertyName('transform');

  // now, let's make a step back and look at this code closely (wtf?)
  // If the content of the popper grows once it's been positioned, it
  // may happen that the popper gets misplaced because of the new content
  // overflowing its reference element
  // To avoid this problem, we provide two options (x and y), which allow
  // the consumer to define the offset origin.
  // If we position a popper on top of a reference element, we can set
  // `x` to `top` to make the popper grow towards its top instead of
  // its bottom.
  var left = void 0,
      top = void 0;
  if (sideA === 'bottom') {
    top = -offsetParentRect.height + offsets.bottom;
  } else {
    top = offsets.top;
  }
  if (sideB === 'right') {
    left = -offsetParentRect.width + offsets.right;
  } else {
    left = offsets.left;
  }
  if (gpuAcceleration && prefixedProperty) {
    styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
    styles[sideA] = 0;
    styles[sideB] = 0;
    styles.willChange = 'transform';
  } else {
    // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
    var invertTop = sideA === 'bottom' ? -1 : 1;
    var invertLeft = sideB === 'right' ? -1 : 1;
    styles[sideA] = top * invertTop;
    styles[sideB] = left * invertLeft;
    styles.willChange = sideA + ', ' + sideB;
  }

  // Attributes
  var attributes = {
    'x-placement': data.placement
  };

  // Update `data` attributes, styles and arrowStyles
  data.attributes = _extends({}, attributes, data.attributes);
  data.styles = _extends({}, styles, data.styles);
  data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);

  return data;
}

/**
 * Helper used to know if the given modifier depends from another one.<br />
 * It checks if the needed modifier is listed and enabled.
 * @method
 * @memberof Popper.Utils
 * @param {Array} modifiers - list of modifiers
 * @param {String} requestingName - name of requesting modifier
 * @param {String} requestedName - name of requested modifier
 * @returns {Boolean}
 */
function isModifierRequired(modifiers, requestingName, requestedName) {
  var requesting = find(modifiers, function (_ref) {
    var name = _ref.name;
    return name === requestingName;
  });

  var isRequired = !!requesting && modifiers.some(function (modifier) {
    return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
  });

  if (!isRequired) {
    var _requesting = '`' + requestingName + '`';
    var requested = '`' + requestedName + '`';
    console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
  }
  return isRequired;
}

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function arrow(data, options) {
  var _data$offsets$arrow;

  // arrow depends on keepTogether in order to work
  if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
    return data;
  }

  var arrowElement = options.element;

  // if arrowElement is a string, suppose it's a CSS selector
  if (typeof arrowElement === 'string') {
    arrowElement = data.instance.popper.querySelector(arrowElement);

    // if arrowElement is not found, don't run the modifier
    if (!arrowElement) {
      return data;
    }
  } else {
    // if the arrowElement isn't a query selector we must check that the
    // provided DOM node is child of its popper node
    if (!data.instance.popper.contains(arrowElement)) {
      console.warn('WARNING: `arrow.element` must be child of its popper element!');
      return data;
    }
  }

  var placement = data.placement.split('-')[0];
  var _data$offsets = data.offsets,
      popper = _data$offsets.popper,
      reference = _data$offsets.reference;

  var isVertical = ['left', 'right'].indexOf(placement) !== -1;

  var len = isVertical ? 'height' : 'width';
  var sideCapitalized = isVertical ? 'Top' : 'Left';
  var side = sideCapitalized.toLowerCase();
  var altSide = isVertical ? 'left' : 'top';
  var opSide = isVertical ? 'bottom' : 'right';
  var arrowElementSize = getOuterSizes(arrowElement)[len];

  //
  // extends keepTogether behavior making sure the popper and its
  // reference have enough pixels in conjuction
  //

  // top/left side
  if (reference[opSide] - arrowElementSize < popper[side]) {
    data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
  }
  // bottom/right side
  if (reference[side] + arrowElementSize > popper[opSide]) {
    data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
  }
  data.offsets.popper = getClientRect(data.offsets.popper);

  // compute center of the popper
  var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;

  // Compute the sideValue using the updated popper offsets
  // take popper margin in account because we don't have this info available
  var css = getStyleComputedProperty(data.instance.popper);
  var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10);
  var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10);
  var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;

  // prevent arrowElement from being placed not contiguously to its popper
  sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);

  data.arrowElement = arrowElement;
  data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);

  return data;
}

/**
 * Get the opposite placement variation of the given one
 * @method
 * @memberof Popper.Utils
 * @argument {String} placement variation
 * @returns {String} flipped placement variation
 */
function getOppositeVariation(variation) {
  if (variation === 'end') {
    return 'start';
  } else if (variation === 'start') {
    return 'end';
  }
  return variation;
}

/**
 * List of accepted placements to use as values of the `placement` option.<br />
 * Valid placements are:
 * - `auto`
 * - `top`
 * - `right`
 * - `bottom`
 * - `left`
 *
 * Each placement can have a variation from this list:
 * - `-start`
 * - `-end`
 *
 * Variations are interpreted easily if you think of them as the left to right
 * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
 * is right.<br />
 * Vertically (`left` and `right`), `start` is top and `end` is bottom.
 *
 * Some valid examples are:
 * - `top-end` (on top of reference, right aligned)
 * - `right-start` (on right of reference, top aligned)
 * - `bottom` (on bottom, centered)
 * - `auto-right` (on the side with more space available, alignment depends by placement)
 *
 * @static
 * @type {Array}
 * @enum {String}
 * @readonly
 * @method placements
 * @memberof Popper
 */
var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];

// Get rid of `auto` `auto-start` and `auto-end`
var validPlacements = placements.slice(3);

/**
 * Given an initial placement, returns all the subsequent placements
 * clockwise (or counter-clockwise).
 *
 * @method
 * @memberof Popper.Utils
 * @argument {String} placement - A valid placement (it accepts variations)
 * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
 * @returns {Array} placements including their variations
 */
function clockwise(placement) {
  var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

  var index = validPlacements.indexOf(placement);
  var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
  return counter ? arr.reverse() : arr;
}

var BEHAVIORS = {
  FLIP: 'flip',
  CLOCKWISE: 'clockwise',
  COUNTERCLOCKWISE: 'counterclockwise'
};

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function flip(data, options) {
  // if `inner` modifier is enabled, we can't use the `flip` modifier
  if (isModifierEnabled(data.instance.modifiers, 'inner')) {
    return data;
  }

  if (data.flipped && data.placement === data.originalPlacement) {
    // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
    return data;
  }

  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);

  var placement = data.placement.split('-')[0];
  var placementOpposite = getOppositePlacement(placement);
  var variation = data.placement.split('-')[1] || '';

  var flipOrder = [];

  switch (options.behavior) {
    case BEHAVIORS.FLIP:
      flipOrder = [placement, placementOpposite];
      break;
    case BEHAVIORS.CLOCKWISE:
      flipOrder = clockwise(placement);
      break;
    case BEHAVIORS.COUNTERCLOCKWISE:
      flipOrder = clockwise(placement, true);
      break;
    default:
      flipOrder = options.behavior;
  }

  flipOrder.forEach(function (step, index) {
    if (placement !== step || flipOrder.length === index + 1) {
      return data;
    }

    placement = data.placement.split('-')[0];
    placementOpposite = getOppositePlacement(placement);

    var popperOffsets = data.offsets.popper;
    var refOffsets = data.offsets.reference;

    // using floor because the reference offsets may contain decimals we are not going to consider here
    var floor = Math.floor;
    var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);

    var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
    var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
    var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
    var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);

    var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;

    // flip the variation if required
    var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
    var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);

    if (overlapsRef || overflowsBoundaries || flippedVariation) {
      // this boolean to detect any flip loop
      data.flipped = true;

      if (overlapsRef || overflowsBoundaries) {
        placement = flipOrder[index + 1];
      }

      if (flippedVariation) {
        variation = getOppositeVariation(variation);
      }

      data.placement = placement + (variation ? '-' + variation : '');

      // this object contains `position`, we want to preserve it along with
      // any additional property we may add in the future
      data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));

      data = runModifiers(data.instance.modifiers, data, 'flip');
    }
  });
  return data;
}

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function keepTogether(data) {
  var _data$offsets = data.offsets,
      popper = _data$offsets.popper,
      reference = _data$offsets.reference;

  var placement = data.placement.split('-')[0];
  var floor = Math.floor;
  var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
  var side = isVertical ? 'right' : 'bottom';
  var opSide = isVertical ? 'left' : 'top';
  var measurement = isVertical ? 'width' : 'height';

  if (popper[side] < floor(reference[opSide])) {
    data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
  }
  if (popper[opSide] > floor(reference[side])) {
    data.offsets.popper[opSide] = floor(reference[side]);
  }

  return data;
}

/**
 * Converts a string containing value + unit into a px value number
 * @function
 * @memberof {modifiers~offset}
 * @private
 * @argument {String} str - Value + unit string
 * @argument {String} measurement - `height` or `width`
 * @argument {Object} popperOffsets
 * @argument {Object} referenceOffsets
 * @returns {Number|String}
 * Value in pixels, or original string if no values were extracted
 */
function toValue(str, measurement, popperOffsets, referenceOffsets) {
  // separate value from unit
  var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
  var value = +split[1];
  var unit = split[2];

  // If it's not a number it's an operator, I guess
  if (!value) {
    return str;
  }

  if (unit.indexOf('%') === 0) {
    var element = void 0;
    switch (unit) {
      case '%p':
        element = popperOffsets;
        break;
      case '%':
      case '%r':
      default:
        element = referenceOffsets;
    }

    var rect = getClientRect(element);
    return rect[measurement] / 100 * value;
  } else if (unit === 'vh' || unit === 'vw') {
    // if is a vh or vw, we calculate the size based on the viewport
    var size = void 0;
    if (unit === 'vh') {
      size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
    } else {
      size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
    }
    return size / 100 * value;
  } else {
    // if is an explicit pixel unit, we get rid of the unit and keep the value
    // if is an implicit unit, it's px, and we return just the value
    return value;
  }
}

/**
 * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
 * @function
 * @memberof {modifiers~offset}
 * @private
 * @argument {String} offset
 * @argument {Object} popperOffsets
 * @argument {Object} referenceOffsets
 * @argument {String} basePlacement
 * @returns {Array} a two cells array with x and y offsets in numbers
 */
function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
  var offsets = [0, 0];

  // Use height if placement is left or right and index is 0 otherwise use width
  // in this way the first offset will use an axis and the second one
  // will use the other one
  var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;

  // Split the offset string to obtain a list of values and operands
  // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
  var fragments = offset.split(/(\+|\-)/).map(function (frag) {
    return frag.trim();
  });

  // Detect if the offset string contains a pair of values or a single one
  // they could be separated by comma or space
  var divider = fragments.indexOf(find(fragments, function (frag) {
    return frag.search(/,|\s/) !== -1;
  }));

  if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
    console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
  }

  // If divider is found, we divide the list of values and operands to divide
  // them by ofset X and Y.
  var splitRegex = /\s*,\s*|\s+/;
  var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];

  // Convert the values with units to absolute pixels to allow our computations
  ops = ops.map(function (op, index) {
    // Most of the units rely on the orientation of the popper
    var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
    var mergeWithPrevious = false;
    return op
    // This aggregates any `+` or `-` sign that aren't considered operators
    // e.g.: 10 + +5 => [10, +, +5]
    .reduce(function (a, b) {
      if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
        a[a.length - 1] = b;
        mergeWithPrevious = true;
        return a;
      } else if (mergeWithPrevious) {
        a[a.length - 1] += b;
        mergeWithPrevious = false;
        return a;
      } else {
        return a.concat(b);
      }
    }, [])
    // Here we convert the string values into number values (in px)
    .map(function (str) {
      return toValue(str, measurement, popperOffsets, referenceOffsets);
    });
  });

  // Loop trough the offsets arrays and execute the operations
  ops.forEach(function (op, index) {
    op.forEach(function (frag, index2) {
      if (isNumeric(frag)) {
        offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
      }
    });
  });
  return offsets;
}

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @argument {Number|String} options.offset=0
 * The offset value as described in the modifier description
 * @returns {Object} The data object, properly modified
 */
function offset(data, _ref) {
  var offset = _ref.offset;
  var placement = data.placement,
      _data$offsets = data.offsets,
      popper = _data$offsets.popper,
      reference = _data$offsets.reference;

  var basePlacement = placement.split('-')[0];

  var offsets = void 0;
  if (isNumeric(+offset)) {
    offsets = [+offset, 0];
  } else {
    offsets = parseOffset(offset, popper, reference, basePlacement);
  }

  if (basePlacement === 'left') {
    popper.top += offsets[0];
    popper.left -= offsets[1];
  } else if (basePlacement === 'right') {
    popper.top += offsets[0];
    popper.left += offsets[1];
  } else if (basePlacement === 'top') {
    popper.left += offsets[0];
    popper.top -= offsets[1];
  } else if (basePlacement === 'bottom') {
    popper.left += offsets[0];
    popper.top += offsets[1];
  }

  data.popper = popper;
  return data;
}

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function preventOverflow(data, options) {
  var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);

  // If offsetParent is the reference element, we really want to
  // go one step up and use the next offsetParent as reference to
  // avoid to make this modifier completely useless and look like broken
  if (data.instance.reference === boundariesElement) {
    boundariesElement = getOffsetParent(boundariesElement);
  }

  // NOTE: DOM access here
  // resets the popper's position so that the document size can be calculated excluding
  // the size of the popper element itself
  var transformProp = getSupportedPropertyName('transform');
  var popperStyles = data.instance.popper.style; // assignment to help minification
  var top = popperStyles.top,
      left = popperStyles.left,
      transform = popperStyles[transformProp];

  popperStyles.top = '';
  popperStyles.left = '';
  popperStyles[transformProp] = '';

  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);

  // NOTE: DOM access here
  // restores the original style properties after the offsets have been computed
  popperStyles.top = top;
  popperStyles.left = left;
  popperStyles[transformProp] = transform;

  options.boundaries = boundaries;

  var order = options.priority;
  var popper = data.offsets.popper;

  var check = {
    primary: function primary(placement) {
      var value = popper[placement];
      if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
        value = Math.max(popper[placement], boundaries[placement]);
      }
      return defineProperty({}, placement, value);
    },
    secondary: function secondary(placement) {
      var mainSide = placement === 'right' ? 'left' : 'top';
      var value = popper[mainSide];
      if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
        value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
      }
      return defineProperty({}, mainSide, value);
    }
  };

  order.forEach(function (placement) {
    var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
    popper = _extends({}, popper, check[side](placement));
  });

  data.offsets.popper = popper;

  return data;
}

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function shift(data) {
  var placement = data.placement;
  var basePlacement = placement.split('-')[0];
  var shiftvariation = placement.split('-')[1];

  // if shift shiftvariation is specified, run the modifier
  if (shiftvariation) {
    var _data$offsets = data.offsets,
        reference = _data$offsets.reference,
        popper = _data$offsets.popper;

    var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
    var side = isVertical ? 'left' : 'top';
    var measurement = isVertical ? 'width' : 'height';

    var shiftOffsets = {
      start: defineProperty({}, side, reference[side]),
      end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
    };

    data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
  }

  return data;
}

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by update method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function hide(data) {
  if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
    return data;
  }

  var refRect = data.offsets.reference;
  var bound = find(data.instance.modifiers, function (modifier) {
    return modifier.name === 'preventOverflow';
  }).boundaries;

  if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
    // Avoid unnecessary DOM access if visibility hasn't changed
    if (data.hide === true) {
      return data;
    }

    data.hide = true;
    data.attributes['x-out-of-boundaries'] = '';
  } else {
    // Avoid unnecessary DOM access if visibility hasn't changed
    if (data.hide === false) {
      return data;
    }

    data.hide = false;
    data.attributes['x-out-of-boundaries'] = false;
  }

  return data;
}

/**
 * @function
 * @memberof Modifiers
 * @argument {Object} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {Object} The data object, properly modified
 */
function inner(data) {
  var placement = data.placement;
  var basePlacement = placement.split('-')[0];
  var _data$offsets = data.offsets,
      popper = _data$offsets.popper,
      reference = _data$offsets.reference;

  var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;

  var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;

  popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);

  data.placement = getOppositePlacement(placement);
  data.offsets.popper = getClientRect(popper);

  return data;
}

/**
 * Modifier function, each modifier can have a function of this type assigned
 * to its `fn` property.<br />
 * These functions will be called on each update, this means that you must
 * make sure they are performant enough to avoid performance bottlenecks.
 *
 * @function ModifierFn
 * @argument {dataObject} data - The data object generated by `update` method
 * @argument {Object} options - Modifiers configuration and options
 * @returns {dataObject} The data object, properly modified
 */

/**
 * Modifiers are plugins used to alter the behavior of your poppers.<br />
 * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
 * needed by the library.
 *
 * Usually you don't want to override the `order`, `fn` and `onLoad` props.
 * All the other properties are configurations that could be tweaked.
 * @namespace modifiers
 */
var modifiers = {
  /**
   * Modifier used to shift the popper on the start or end of its reference
   * element.<br />
   * It will read the variation of the `placement` property.<br />
   * It can be one either `-end` or `-start`.
   * @memberof modifiers
   * @inner
   */
  shift: {
    /** @prop {number} order=100 - Index used to define the order of execution */
    order: 100,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: shift
  },

  /**
   * The `offset` modifier can shift your popper on both its axis.
   *
   * It accepts the following units:
   * - `px` or unitless, interpreted as pixels
   * - `%` or `%r`, percentage relative to the length of the reference element
   * - `%p`, percentage relative to the length of the popper element
   * - `vw`, CSS viewport width unit
   * - `vh`, CSS viewport height unit
   *
   * For length is intended the main axis relative to the placement of the popper.<br />
   * This means that if the placement is `top` or `bottom`, the length will be the
   * `width`. In case of `left` or `right`, it will be the height.
   *
   * You can provide a single value (as `Number` or `String`), or a pair of values
   * as `String` divided by a comma or one (or more) white spaces.<br />
   * The latter is a deprecated method because it leads to confusion and will be
   * removed in v2.<br />
   * Additionally, it accepts additions and subtractions between different units.
   * Note that multiplications and divisions aren't supported.
   *
   * Valid examples are:
   * ```
   * 10
   * '10%'
   * '10, 10'
   * '10%, 10'
   * '10 + 10%'
   * '10 - 5vh + 3%'
   * '-10px + 5vh, 5px - 6%'
   * ```
   * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
   * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
   * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373)
   *
   * @memberof modifiers
   * @inner
   */
  offset: {
    /** @prop {number} order=200 - Index used to define the order of execution */
    order: 200,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: offset,
    /** @prop {Number|String} offset=0
     * The offset value as described in the modifier description
     */
    offset: 0
  },

  /**
   * Modifier used to prevent the popper from being positioned outside the boundary.
   *
   * An scenario exists where the reference itself is not within the boundaries.<br />
   * We can say it has "escaped the boundaries" — or just "escaped".<br />
   * In this case we need to decide whether the popper should either:
   *
   * - detach from the reference and remain "trapped" in the boundaries, or
   * - if it should ignore the boundary and "escape with its reference"
   *
   * When `escapeWithReference` is set to`true` and reference is completely
   * outside its boundaries, the popper will overflow (or completely leave)
   * the boundaries in order to remain attached to the edge of the reference.
   *
   * @memberof modifiers
   * @inner
   */
  preventOverflow: {
    /** @prop {number} order=300 - Index used to define the order of execution */
    order: 300,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: preventOverflow,
    /**
     * @prop {Array} [priority=['left','right','top','bottom']]
     * Popper will try to prevent overflow following these priorities by default,
     * then, it could overflow on the left and on top of the `boundariesElement`
     */
    priority: ['left', 'right', 'top', 'bottom'],
    /**
     * @prop {number} padding=5
     * Amount of pixel used to define a minimum distance between the boundaries
     * and the popper this makes sure the popper has always a little padding
     * between the edges of its container
     */
    padding: 5,
    /**
     * @prop {String|HTMLElement} boundariesElement='scrollParent'
     * Boundaries used by the modifier, can be `scrollParent`, `window`,
     * `viewport` or any DOM element.
     */
    boundariesElement: 'scrollParent'
  },

  /**
   * Modifier used to make sure the reference and its popper stay near eachothers
   * without leaving any gap between the two. Expecially useful when the arrow is
   * enabled and you want to assure it to point to its reference element.
   * It cares only about the first axis, you can still have poppers with margin
   * between the popper and its reference element.
   * @memberof modifiers
   * @inner
   */
  keepTogether: {
    /** @prop {number} order=400 - Index used to define the order of execution */
    order: 400,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: keepTogether
  },

  /**
   * This modifier is used to move the `arrowElement` of the popper to make
   * sure it is positioned between the reference element and its popper element.
   * It will read the outer size of the `arrowElement` node to detect how many
   * pixels of conjuction are needed.
   *
   * It has no effect if no `arrowElement` is provided.
   * @memberof modifiers
   * @inner
   */
  arrow: {
    /** @prop {number} order=500 - Index used to define the order of execution */
    order: 500,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: arrow,
    /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
    element: '[x-arrow]'
  },

  /**
   * Modifier used to flip the popper's placement when it starts to overlap its
   * reference element.
   *
   * Requires the `preventOverflow` modifier before it in order to work.
   *
   * **NOTE:** this modifier will interrupt the current update cycle and will
   * restart it if it detects the need to flip the placement.
   * @memberof modifiers
   * @inner
   */
  flip: {
    /** @prop {number} order=600 - Index used to define the order of execution */
    order: 600,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: flip,
    /**
     * @prop {String|Array} behavior='flip'
     * The behavior used to change the popper's placement. It can be one of
     * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
     * placements (with optional variations).
     */
    behavior: 'flip',
    /**
     * @prop {number} padding=5
     * The popper will flip if it hits the edges of the `boundariesElement`
     */
    padding: 5,
    /**
     * @prop {String|HTMLElement} boundariesElement='viewport'
     * The element which will define the boundaries of the popper position,
     * the popper will never be placed outside of the defined boundaries
     * (except if keepTogether is enabled)
     */
    boundariesElement: 'viewport'
  },

  /**
   * Modifier used to make the popper flow toward the inner of the reference element.
   * By default, when this modifier is disabled, the popper will be placed outside
   * the reference element.
   * @memberof modifiers
   * @inner
   */
  inner: {
    /** @prop {number} order=700 - Index used to define the order of execution */
    order: 700,
    /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
    enabled: false,
    /** @prop {ModifierFn} */
    fn: inner
  },

  /**
   * Modifier used to hide the popper when its reference element is outside of the
   * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
   * be used to hide with a CSS selector the popper when its reference is
   * out of boundaries.
   *
   * Requires the `preventOverflow` modifier before it in order to work.
   * @memberof modifiers
   * @inner
   */
  hide: {
    /** @prop {number} order=800 - Index used to define the order of execution */
    order: 800,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: hide
  },

  /**
   * Computes the style that will be applied to the popper element to gets
   * properly positioned.
   *
   * Note that this modifier will not touch the DOM, it just prepares the styles
   * so that `applyStyle` modifier can apply it. This separation is useful
   * in case you need to replace `applyStyle` with a custom implementation.
   *
   * This modifier has `850` as `order` value to maintain backward compatibility
   * with previous versions of Popper.js. Expect the modifiers ordering method
   * to change in future major versions of the library.
   *
   * @memberof modifiers
   * @inner
   */
  computeStyle: {
    /** @prop {number} order=850 - Index used to define the order of execution */
    order: 850,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: computeStyle,
    /**
     * @prop {Boolean} gpuAcceleration=true
     * If true, it uses the CSS 3d transformation to position the popper.
     * Otherwise, it will use the `top` and `left` properties.
     */
    gpuAcceleration: true,
    /**
     * @prop {string} [x='bottom']
     * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
     * Change this if your popper should grow in a direction different from `bottom`
     */
    x: 'bottom',
    /**
     * @prop {string} [x='left']
     * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
     * Change this if your popper should grow in a direction different from `right`
     */
    y: 'right'
  },

  /**
   * Applies the computed styles to the popper element.
   *
   * All the DOM manipulations are limited to this modifier. This is useful in case
   * you want to integrate Popper.js inside a framework or view library and you
   * want to delegate all the DOM manipulations to it.
   *
   * Note that if you disable this modifier, you must make sure the popper element
   * has its position set to `absolute` before Popper.js can do its work!
   *
   * Just disable this modifier and define you own to achieve the desired effect.
   *
   * @memberof modifiers
   * @inner
   */
  applyStyle: {
    /** @prop {number} order=900 - Index used to define the order of execution */
    order: 900,
    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
    enabled: true,
    /** @prop {ModifierFn} */
    fn: applyStyle,
    /** @prop {Function} */
    onLoad: applyStyleOnLoad,
    /**
     * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
     * @prop {Boolean} gpuAcceleration=true
     * If true, it uses the CSS 3d transformation to position the popper.
     * Otherwise, it will use the `top` and `left` properties.
     */
    gpuAcceleration: undefined
  }
};

/**
 * The `dataObject` is an object containing all the informations used by Popper.js
 * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
 * @name dataObject
 * @property {Object} data.instance The Popper.js instance
 * @property {String} data.placement Placement applied to popper
 * @property {String} data.originalPlacement Placement originally defined on init
 * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
 * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper.
 * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
 * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`)
 * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`)
 * @property {Object} data.boundaries Offsets of the popper boundaries
 * @property {Object} data.offsets The measurements of popper, reference and arrow elements.
 * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
 * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
 * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
 */

/**
 * Default options provided to Popper.js constructor.<br />
 * These can be overriden using the `options` argument of Popper.js.<br />
 * To override an option, simply pass as 3rd argument an object with the same
 * structure of this object, example:
 * ```
 * new Popper(ref, pop, {
 *   modifiers: {
 *     preventOverflow: { enabled: false }
 *   }
 * })
 * ```
 * @type {Object}
 * @static
 * @memberof Popper
 */
var Defaults = {
  /**
   * Popper's placement
   * @prop {Popper.placements} placement='bottom'
   */
  placement: 'bottom',

  /**
   * Set this to true if you want popper to position it self in 'fixed' mode
   * @prop {Boolean} positionFixed=false
   */
  positionFixed: false,

  /**
   * Whether events (resize, scroll) are initially enabled
   * @prop {Boolean} eventsEnabled=true
   */
  eventsEnabled: true,

  /**
   * Set to true if you want to automatically remove the popper when
   * you call the `destroy` method.
   * @prop {Boolean} removeOnDestroy=false
   */
  removeOnDestroy: false,

  /**
   * Callback called when the popper is created.<br />
   * By default, is set to no-op.<br />
   * Access Popper.js instance with `data.instance`.
   * @prop {onCreate}
   */
  onCreate: function onCreate() {},

  /**
   * Callback called when the popper is updated, this callback is not called
   * on the initialization/creation of the popper, but only on subsequent
   * updates.<br />
   * By default, is set to no-op.<br />
   * Access Popper.js instance with `data.instance`.
   * @prop {onUpdate}
   */
  onUpdate: function onUpdate() {},

  /**
   * List of modifiers used to modify the offsets before they are applied to the popper.
   * They provide most of the functionalities of Popper.js
   * @prop {modifiers}
   */
  modifiers: modifiers
};

/**
 * @callback onCreate
 * @param {dataObject} data
 */

/**
 * @callback onUpdate
 * @param {dataObject} data
 */

// Utils
// Methods
var Popper = function () {
  /**
   * Create a new Popper.js instance
   * @class Popper
   * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
   * @param {HTMLElement} popper - The HTML element used as popper.
   * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
   * @return {Object} instance - The generated Popper.js instance
   */
  function Popper(reference, popper) {
    var _this = this;

    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
    classCallCheck(this, Popper);

    this.scheduleUpdate = function () {
      return requestAnimationFrame(_this.update);
    };

    // make update() debounced, so that it only runs at most once-per-tick
    this.update = debounce(this.update.bind(this));

    // with {} we create a new object with the options inside it
    this.options = _extends({}, Popper.Defaults, options);

    // init state
    this.state = {
      isDestroyed: false,
      isCreated: false,
      scrollParents: []
    };

    // get reference and popper elements (allow jQuery wrappers)
    this.reference = reference && reference.jquery ? reference[0] : reference;
    this.popper = popper && popper.jquery ? popper[0] : popper;

    // Deep merge modifiers options
    this.options.modifiers = {};
    Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
      _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
    });

    // Refactoring modifiers' list (Object => Array)
    this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
      return _extends({
        name: name
      }, _this.options.modifiers[name]);
    })
    // sort the modifiers by order
    .sort(function (a, b) {
      return a.order - b.order;
    });

    // modifiers have the ability to execute arbitrary code when Popper.js get inited
    // such code is executed in the same order of its modifier
    // they could add new properties to their options configuration
    // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
    this.modifiers.forEach(function (modifierOptions) {
      if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
        modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
      }
    });

    // fire the first update to position the popper in the right place
    this.update();

    var eventsEnabled = this.options.eventsEnabled;
    if (eventsEnabled) {
      // setup event listeners, they will take care of update the position in specific situations
      this.enableEventListeners();
    }

    this.state.eventsEnabled = eventsEnabled;
  }

  // We can't use class properties because they don't get listed in the
  // class prototype and break stuff like Sinon stubs


  createClass(Popper, [{
    key: 'update',
    value: function update$$1() {
      return update.call(this);
    }
  }, {
    key: 'destroy',
    value: function destroy$$1() {
      return destroy.call(this);
    }
  }, {
    key: 'enableEventListeners',
    value: function enableEventListeners$$1() {
      return enableEventListeners.call(this);
    }
  }, {
    key: 'disableEventListeners',
    value: function disableEventListeners$$1() {
      return disableEventListeners.call(this);
    }

    /**
     * Schedule an update, it will run on the next UI update available
     * @method scheduleUpdate
     * @memberof Popper
     */


    /**
     * Collection of utilities useful when writing custom modifiers.
     * Starting from version 1.7, this method is available only if you
     * include `popper-utils.js` before `popper.js`.
     *
     * **DEPRECATION**: This way to access PopperUtils is deprecated
     * and will be removed in v2! Use the PopperUtils module directly instead.
     * Due to the high instability of the methods contained in Utils, we can't
     * guarantee them to follow semver. Use them at your own risk!
     * @static
     * @private
     * @type {Object}
     * @deprecated since version 1.8
     * @member Utils
     * @memberof Popper
     */

  }]);
  return Popper;
}();

/**
 * The `referenceObject` is an object that provides an interface compatible with Popper.js
 * and lets you use it as replacement of a real DOM node.<br />
 * You can use this method to position a popper relatively to a set of coordinates
 * in case you don't have a DOM node to use as reference.
 *
 * ```
 * new Popper(referenceObject, popperNode);
 * ```
 *
 * NB: This feature isn't supported in Internet Explorer 10
 * @name referenceObject
 * @property {Function} data.getBoundingClientRect
 * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
 * @property {number} data.clientWidth
 * An ES6 getter that will return the width of the virtual reference element.
 * @property {number} data.clientHeight
 * An ES6 getter that will return the height of the virtual reference element.
 */


Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
Popper.placements = placements;
Popper.Defaults = Defaults;

/* harmony default export */ __webpack_exports__["default"] = (Popper);
//# sourceMappingURL=popper.js.map

/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(76)))

/***/ }),
/* 99 */,
/* 100 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `StandaloneSearchInterfaceEvents` static class contains the string definitions of all events that strongly relate to the standalone search interface.
 */
var StandaloneSearchInterfaceEvents = /** @class */ (function () {
    function StandaloneSearchInterfaceEvents() {
    }
    /**
     * Triggered by the [`StandaloneSearchBox`]{@link StandaloneSearchBox} component during initialization, just before redirecting to the full search page.
     *
     * @type {string} The string value is `beforeRedirect`.
     */
    StandaloneSearchInterfaceEvents.beforeRedirect = 'beforeRedirect';
    return StandaloneSearchInterfaceEvents;
}());
exports.StandaloneSearchInterfaceEvents = StandaloneSearchInterfaceEvents;


/***/ }),
/* 101 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var PreferencesPanelEvents = /** @class */ (function () {
    function PreferencesPanelEvents() {
    }
    PreferencesPanelEvents.savePreferences = 'savePreferences';
    PreferencesPanelEvents.exitPreferencesWithoutSave = 'exitPreferencesWithoutSave';
    return PreferencesPanelEvents;
}());
exports.PreferencesPanelEvents = PreferencesPanelEvents;


/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var AdvancedSearchEvents_1 = __webpack_require__(88);
exports.AdvancedSearchEvents = AdvancedSearchEvents_1.AdvancedSearchEvents;
var AnalyticsEvents_1 = __webpack_require__(58);
exports.AnalyticsEvents = AnalyticsEvents_1.AnalyticsEvents;
var BreadcrumbEvents_1 = __webpack_require__(35);
exports.BreadcrumbEvents = BreadcrumbEvents_1.BreadcrumbEvents;
var DebugEvents_1 = __webpack_require__(106);
exports.DebugEvents = DebugEvents_1.DebugEvents;
var DistanceEvents_1 = __webpack_require__(204);
exports.DistanceEvents = DistanceEvents_1.DistanceEvents;
var InitializationEvents_1 = __webpack_require__(17);
exports.InitializationEvents = InitializationEvents_1.InitializationEvents;
var OmniboxEvents_1 = __webpack_require__(34);
exports.OmniboxEvents = OmniboxEvents_1.OmniboxEvents;
var PreferencesPanelEvents_1 = __webpack_require__(101);
exports.PreferencesPanelEvents = PreferencesPanelEvents_1.PreferencesPanelEvents;
var QueryEvents_1 = __webpack_require__(11);
exports.QueryEvents = QueryEvents_1.QueryEvents;
var ResultListEvents_1 = __webpack_require__(29);
exports.ResultListEvents = ResultListEvents_1.ResultListEvents;
var ResultLayoutEvents_1 = __webpack_require__(134);
exports.ResultLayoutEvents = ResultLayoutEvents_1.ResultLayoutEvents;
var SearchAlertEvents_1 = __webpack_require__(87);
exports.SearchAlertsEvents = SearchAlertEvents_1.SearchAlertsEvents;
var SettingsEvents_1 = __webpack_require__(56);
exports.SettingsEvents = SettingsEvents_1.SettingsEvents;
var SliderEvents_1 = __webpack_require__(143);
exports.SliderEvents = SliderEvents_1.SliderEvents;
var StandaloneSearchInterfaceEvents_1 = __webpack_require__(100);
exports.StandaloneSearchInterfaceEvents = StandaloneSearchInterfaceEvents_1.StandaloneSearchInterfaceEvents;


/***/ }),
/* 103 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com

;(function (global, factory) {
     true ? module.exports = factory() :
    typeof define === 'function' && define.amd ? define(factory) :
    global.moment = factory()
}(this, (function () { 'use strict';

    var hookCallback;

    function hooks() {
        return hookCallback.apply(null, arguments);
    }

    // This is done to register the method called with moment()
    // without creating circular dependencies.
    function setHookCallback(callback) {
        hookCallback = callback;
    }

    function isArray(input) {
        return (
            input instanceof Array ||
            Object.prototype.toString.call(input) === '[object Array]'
        );
    }

    function isObject(input) {
        // IE8 will treat undefined and null as object if it wasn't for
        // input != null
        return (
            input != null &&
            Object.prototype.toString.call(input) === '[object Object]'
        );
    }

    function hasOwnProp(a, b) {
        return Object.prototype.hasOwnProperty.call(a, b);
    }

    function isObjectEmpty(obj) {
        if (Object.getOwnPropertyNames) {
            return Object.getOwnPropertyNames(obj).length === 0;
        } else {
            var k;
            for (k in obj) {
                if (hasOwnProp(obj, k)) {
                    return false;
                }
            }
            return true;
        }
    }

    function isUndefined(input) {
        return input === void 0;
    }

    function isNumber(input) {
        return (
            typeof input === 'number' ||
            Object.prototype.toString.call(input) === '[object Number]'
        );
    }

    function isDate(input) {
        return (
            input instanceof Date ||
            Object.prototype.toString.call(input) === '[object Date]'
        );
    }

    function map(arr, fn) {
        var res = [],
            i,
            arrLen = arr.length;
        for (i = 0; i < arrLen; ++i) {
            res.push(fn(arr[i], i));
        }
        return res;
    }

    function extend(a, b) {
        for (var i in b) {
            if (hasOwnProp(b, i)) {
                a[i] = b[i];
            }
        }

        if (hasOwnProp(b, 'toString')) {
            a.toString = b.toString;
        }

        if (hasOwnProp(b, 'valueOf')) {
            a.valueOf = b.valueOf;
        }

        return a;
    }

    function createUTC(input, format, locale, strict) {
        return createLocalOrUTC(input, format, locale, strict, true).utc();
    }

    function defaultParsingFlags() {
        // We need to deep clone this object.
        return {
            empty: false,
            unusedTokens: [],
            unusedInput: [],
            overflow: -2,
            charsLeftOver: 0,
            nullInput: false,
            invalidEra: null,
            invalidMonth: null,
            invalidFormat: false,
            userInvalidated: false,
            iso: false,
            parsedDateParts: [],
            era: null,
            meridiem: null,
            rfc2822: false,
            weekdayMismatch: false,
        };
    }

    function getParsingFlags(m) {
        if (m._pf == null) {
            m._pf = defaultParsingFlags();
        }
        return m._pf;
    }

    var some;
    if (Array.prototype.some) {
        some = Array.prototype.some;
    } else {
        some = function (fun) {
            var t = Object(this),
                len = t.length >>> 0,
                i;

            for (i = 0; i < len; i++) {
                if (i in t && fun.call(this, t[i], i, t)) {
                    return true;
                }
            }

            return false;
        };
    }

    function isValid(m) {
        if (m._isValid == null) {
            var flags = getParsingFlags(m),
                parsedParts = some.call(flags.parsedDateParts, function (i) {
                    return i != null;
                }),
                isNowValid =
                    !isNaN(m._d.getTime()) &&
                    flags.overflow < 0 &&
                    !flags.empty &&
                    !flags.invalidEra &&
                    !flags.invalidMonth &&
                    !flags.invalidWeekday &&
                    !flags.weekdayMismatch &&
                    !flags.nullInput &&
                    !flags.invalidFormat &&
                    !flags.userInvalidated &&
                    (!flags.meridiem || (flags.meridiem && parsedParts));

            if (m._strict) {
                isNowValid =
                    isNowValid &&
                    flags.charsLeftOver === 0 &&
                    flags.unusedTokens.length === 0 &&
                    flags.bigHour === undefined;
            }

            if (Object.isFrozen == null || !Object.isFrozen(m)) {
                m._isValid = isNowValid;
            } else {
                return isNowValid;
            }
        }
        return m._isValid;
    }

    function createInvalid(flags) {
        var m = createUTC(NaN);
        if (flags != null) {
            extend(getParsingFlags(m), flags);
        } else {
            getParsingFlags(m).userInvalidated = true;
        }

        return m;
    }

    // Plugins that add properties should also add the key here (null value),
    // so we can properly clone ourselves.
    var momentProperties = (hooks.momentProperties = []),
        updateInProgress = false;

    function copyConfig(to, from) {
        var i,
            prop,
            val,
            momentPropertiesLen = momentProperties.length;

        if (!isUndefined(from._isAMomentObject)) {
            to._isAMomentObject = from._isAMomentObject;
        }
        if (!isUndefined(from._i)) {
            to._i = from._i;
        }
        if (!isUndefined(from._f)) {
            to._f = from._f;
        }
        if (!isUndefined(from._l)) {
            to._l = from._l;
        }
        if (!isUndefined(from._strict)) {
            to._strict = from._strict;
        }
        if (!isUndefined(from._tzm)) {
            to._tzm = from._tzm;
        }
        if (!isUndefined(from._isUTC)) {
            to._isUTC = from._isUTC;
        }
        if (!isUndefined(from._offset)) {
            to._offset = from._offset;
        }
        if (!isUndefined(from._pf)) {
            to._pf = getParsingFlags(from);
        }
        if (!isUndefined(from._locale)) {
            to._locale = from._locale;
        }

        if (momentPropertiesLen > 0) {
            for (i = 0; i < momentPropertiesLen; i++) {
                prop = momentProperties[i];
                val = from[prop];
                if (!isUndefined(val)) {
                    to[prop] = val;
                }
            }
        }

        return to;
    }

    // Moment prototype object
    function Moment(config) {
        copyConfig(this, config);
        this._d = new Date(config._d != null ? config._d.getTime() : NaN);
        if (!this.isValid()) {
            this._d = new Date(NaN);
        }
        // Prevent infinite loop in case updateOffset creates new moment
        // objects.
        if (updateInProgress === false) {
            updateInProgress = true;
            hooks.updateOffset(this);
            updateInProgress = false;
        }
    }

    function isMoment(obj) {
        return (
            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
        );
    }

    function warn(msg) {
        if (
            hooks.suppressDeprecationWarnings === false &&
            typeof console !== 'undefined' &&
            console.warn
        ) {
            console.warn('Deprecation warning: ' + msg);
        }
    }

    function deprecate(msg, fn) {
        var firstTime = true;

        return extend(function () {
            if (hooks.deprecationHandler != null) {
                hooks.deprecationHandler(null, msg);
            }
            if (firstTime) {
                var args = [],
                    arg,
                    i,
                    key,
                    argLen = arguments.length;
                for (i = 0; i < argLen; i++) {
                    arg = '';
                    if (typeof arguments[i] === 'object') {
                        arg += '\n[' + i + '] ';
                        for (key in arguments[0]) {
                            if (hasOwnProp(arguments[0], key)) {
                                arg += key + ': ' + arguments[0][key] + ', ';
                            }
                        }
                        arg = arg.slice(0, -2); // Remove trailing comma and space
                    } else {
                        arg = arguments[i];
                    }
                    args.push(arg);
                }
                warn(
                    msg +
                        '\nArguments: ' +
                        Array.prototype.slice.call(args).join('') +
                        '\n' +
                        new Error().stack
                );
                firstTime = false;
            }
            return fn.apply(this, arguments);
        }, fn);
    }

    var deprecations = {};

    function deprecateSimple(name, msg) {
        if (hooks.deprecationHandler != null) {
            hooks.deprecationHandler(name, msg);
        }
        if (!deprecations[name]) {
            warn(msg);
            deprecations[name] = true;
        }
    }

    hooks.suppressDeprecationWarnings = false;
    hooks.deprecationHandler = null;

    function isFunction(input) {
        return (
            (typeof Function !== 'undefined' && input instanceof Function) ||
            Object.prototype.toString.call(input) === '[object Function]'
        );
    }

    function set(config) {
        var prop, i;
        for (i in config) {
            if (hasOwnProp(config, i)) {
                prop = config[i];
                if (isFunction(prop)) {
                    this[i] = prop;
                } else {
                    this['_' + i] = prop;
                }
            }
        }
        this._config = config;
        // Lenient ordinal parsing accepts just a number in addition to
        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
        // TODO: Remove "ordinalParse" fallback in next major release.
        this._dayOfMonthOrdinalParseLenient = new RegExp(
            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
                '|' +
                /\d{1,2}/.source
        );
    }

    function mergeConfigs(parentConfig, childConfig) {
        var res = extend({}, parentConfig),
            prop;
        for (prop in childConfig) {
            if (hasOwnProp(childConfig, prop)) {
                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
                    res[prop] = {};
                    extend(res[prop], parentConfig[prop]);
                    extend(res[prop], childConfig[prop]);
                } else if (childConfig[prop] != null) {
                    res[prop] = childConfig[prop];
                } else {
                    delete res[prop];
                }
            }
        }
        for (prop in parentConfig) {
            if (
                hasOwnProp(parentConfig, prop) &&
                !hasOwnProp(childConfig, prop) &&
                isObject(parentConfig[prop])
            ) {
                // make sure changes to properties don't modify parent config
                res[prop] = extend({}, res[prop]);
            }
        }
        return res;
    }

    function Locale(config) {
        if (config != null) {
            this.set(config);
        }
    }

    var keys;

    if (Object.keys) {
        keys = Object.keys;
    } else {
        keys = function (obj) {
            var i,
                res = [];
            for (i in obj) {
                if (hasOwnProp(obj, i)) {
                    res.push(i);
                }
            }
            return res;
        };
    }

    var defaultCalendar = {
        sameDay: '[Today at] LT',
        nextDay: '[Tomorrow at] LT',
        nextWeek: 'dddd [at] LT',
        lastDay: '[Yesterday at] LT',
        lastWeek: '[Last] dddd [at] LT',
        sameElse: 'L',
    };

    function calendar(key, mom, now) {
        var output = this._calendar[key] || this._calendar['sameElse'];
        return isFunction(output) ? output.call(mom, now) : output;
    }

    function zeroFill(number, targetLength, forceSign) {
        var absNumber = '' + Math.abs(number),
            zerosToFill = targetLength - absNumber.length,
            sign = number >= 0;
        return (
            (sign ? (forceSign ? '+' : '') : '-') +
            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
            absNumber
        );
    }

    var formattingTokens =
            /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
        localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
        formatFunctions = {},
        formatTokenFunctions = {};

    // token:    'M'
    // padded:   ['MM', 2]
    // ordinal:  'Mo'
    // callback: function () { this.month() + 1 }
    function addFormatToken(token, padded, ordinal, callback) {
        var func = callback;
        if (typeof callback === 'string') {
            func = function () {
                return this[callback]();
            };
        }
        if (token) {
            formatTokenFunctions[token] = func;
        }
        if (padded) {
            formatTokenFunctions[padded[0]] = function () {
                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
            };
        }
        if (ordinal) {
            formatTokenFunctions[ordinal] = function () {
                return this.localeData().ordinal(
                    func.apply(this, arguments),
                    token
                );
            };
        }
    }

    function removeFormattingTokens(input) {
        if (input.match(/\[[\s\S]/)) {
            return input.replace(/^\[|\]$/g, '');
        }
        return input.replace(/\\/g, '');
    }

    function makeFormatFunction(format) {
        var array = format.match(formattingTokens),
            i,
            length;

        for (i = 0, length = array.length; i < length; i++) {
            if (formatTokenFunctions[array[i]]) {
                array[i] = formatTokenFunctions[array[i]];
            } else {
                array[i] = removeFormattingTokens(array[i]);
            }
        }

        return function (mom) {
            var output = '',
                i;
            for (i = 0; i < length; i++) {
                output += isFunction(array[i])
                    ? array[i].call(mom, format)
                    : array[i];
            }
            return output;
        };
    }

    // format date using native date object
    function formatMoment(m, format) {
        if (!m.isValid()) {
            return m.localeData().invalidDate();
        }

        format = expandFormat(format, m.localeData());
        formatFunctions[format] =
            formatFunctions[format] || makeFormatFunction(format);

        return formatFunctions[format](m);
    }

    function expandFormat(format, locale) {
        var i = 5;

        function replaceLongDateFormatTokens(input) {
            return locale.longDateFormat(input) || input;
        }

        localFormattingTokens.lastIndex = 0;
        while (i >= 0 && localFormattingTokens.test(format)) {
            format = format.replace(
                localFormattingTokens,
                replaceLongDateFormatTokens
            );
            localFormattingTokens.lastIndex = 0;
            i -= 1;
        }

        return format;
    }

    var defaultLongDateFormat = {
        LTS: 'h:mm:ss A',
        LT: 'h:mm A',
        L: 'MM/DD/YYYY',
        LL: 'MMMM D, YYYY',
        LLL: 'MMMM D, YYYY h:mm A',
        LLLL: 'dddd, MMMM D, YYYY h:mm A',
    };

    function longDateFormat(key) {
        var format = this._longDateFormat[key],
            formatUpper = this._longDateFormat[key.toUpperCase()];

        if (format || !formatUpper) {
            return format;
        }

        this._longDateFormat[key] = formatUpper
            .match(formattingTokens)
            .map(function (tok) {
                if (
                    tok === 'MMMM' ||
                    tok === 'MM' ||
                    tok === 'DD' ||
                    tok === 'dddd'
                ) {
                    return tok.slice(1);
                }
                return tok;
            })
            .join('');

        return this._longDateFormat[key];
    }

    var defaultInvalidDate = 'Invalid date';

    function invalidDate() {
        return this._invalidDate;
    }

    var defaultOrdinal = '%d',
        defaultDayOfMonthOrdinalParse = /\d{1,2}/;

    function ordinal(number) {
        return this._ordinal.replace('%d', number);
    }

    var defaultRelativeTime = {
        future: 'in %s',
        past: '%s ago',
        s: 'a few seconds',
        ss: '%d seconds',
        m: 'a minute',
        mm: '%d minutes',
        h: 'an hour',
        hh: '%d hours',
        d: 'a day',
        dd: '%d days',
        w: 'a week',
        ww: '%d weeks',
        M: 'a month',
        MM: '%d months',
        y: 'a year',
        yy: '%d years',
    };

    function relativeTime(number, withoutSuffix, string, isFuture) {
        var output = this._relativeTime[string];
        return isFunction(output)
            ? output(number, withoutSuffix, string, isFuture)
            : output.replace(/%d/i, number);
    }

    function pastFuture(diff, output) {
        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
        return isFunction(format) ? format(output) : format.replace(/%s/i, output);
    }

    var aliases = {};

    function addUnitAlias(unit, shorthand) {
        var lowerCase = unit.toLowerCase();
        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
    }

    function normalizeUnits(units) {
        return typeof units === 'string'
            ? aliases[units] || aliases[units.toLowerCase()]
            : undefined;
    }

    function normalizeObjectUnits(inputObject) {
        var normalizedInput = {},
            normalizedProp,
            prop;

        for (prop in inputObject) {
            if (hasOwnProp(inputObject, prop)) {
                normalizedProp = normalizeUnits(prop);
                if (normalizedProp) {
                    normalizedInput[normalizedProp] = inputObject[prop];
                }
            }
        }

        return normalizedInput;
    }

    var priorities = {};

    function addUnitPriority(unit, priority) {
        priorities[unit] = priority;
    }

    function getPrioritizedUnits(unitsObj) {
        var units = [],
            u;
        for (u in unitsObj) {
            if (hasOwnProp(unitsObj, u)) {
                units.push({ unit: u, priority: priorities[u] });
            }
        }
        units.sort(function (a, b) {
            return a.priority - b.priority;
        });
        return units;
    }

    function isLeapYear(year) {
        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
    }

    function absFloor(number) {
        if (number < 0) {
            // -0 -> 0
            return Math.ceil(number) || 0;
        } else {
            return Math.floor(number);
        }
    }

    function toInt(argumentForCoercion) {
        var coercedNumber = +argumentForCoercion,
            value = 0;

        if (coercedNumber !== 0 && isFinite(coercedNumber)) {
            value = absFloor(coercedNumber);
        }

        return value;
    }

    function makeGetSet(unit, keepTime) {
        return function (value) {
            if (value != null) {
                set$1(this, unit, value);
                hooks.updateOffset(this, keepTime);
                return this;
            } else {
                return get(this, unit);
            }
        };
    }

    function get(mom, unit) {
        return mom.isValid()
            ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
            : NaN;
    }

    function set$1(mom, unit, value) {
        if (mom.isValid() && !isNaN(value)) {
            if (
                unit === 'FullYear' &&
                isLeapYear(mom.year()) &&
                mom.month() === 1 &&
                mom.date() === 29
            ) {
                value = toInt(value);
                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
                    value,
                    mom.month(),
                    daysInMonth(value, mom.month())
                );
            } else {
                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
            }
        }
    }

    // MOMENTS

    function stringGet(units) {
        units = normalizeUnits(units);
        if (isFunction(this[units])) {
            return this[units]();
        }
        return this;
    }

    function stringSet(units, value) {
        if (typeof units === 'object') {
            units = normalizeObjectUnits(units);
            var prioritized = getPrioritizedUnits(units),
                i,
                prioritizedLen = prioritized.length;
            for (i = 0; i < prioritizedLen; i++) {
                this[prioritized[i].unit](units[prioritized[i].unit]);
            }
        } else {
            units = normalizeUnits(units);
            if (isFunction(this[units])) {
                return this[units](value);
            }
        }
        return this;
    }

    var match1 = /\d/, //       0 - 9
        match2 = /\d\d/, //      00 - 99
        match3 = /\d{3}/, //     000 - 999
        match4 = /\d{4}/, //    0000 - 9999
        match6 = /[+-]?\d{6}/, // -999999 - 999999
        match1to2 = /\d\d?/, //       0 - 99
        match3to4 = /\d\d\d\d?/, //     999 - 9999
        match5to6 = /\d\d\d\d\d\d?/, //   99999 - 999999
        match1to3 = /\d{1,3}/, //       0 - 999
        match1to4 = /\d{1,4}/, //       0 - 9999
        match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
        matchUnsigned = /\d+/, //       0 - inf
        matchSigned = /[+-]?\d+/, //    -inf - inf
        matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
        matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
        matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
        // any word (or two) characters or numbers including two/three word month in arabic.
        // includes scottish gaelic two word and hyphenated months
        matchWord =
            /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
        regexes;

    regexes = {};

    function addRegexToken(token, regex, strictRegex) {
        regexes[token] = isFunction(regex)
            ? regex
            : function (isStrict, localeData) {
                  return isStrict && strictRegex ? strictRegex : regex;
              };
    }

    function getParseRegexForToken(token, config) {
        if (!hasOwnProp(regexes, token)) {
            return new RegExp(unescapeFormat(token));
        }

        return regexes[token](config._strict, config._locale);
    }

    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
    function unescapeFormat(s) {
        return regexEscape(
            s
                .replace('\\', '')
                .replace(
                    /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
                    function (matched, p1, p2, p3, p4) {
                        return p1 || p2 || p3 || p4;
                    }
                )
        );
    }

    function regexEscape(s) {
        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
    }

    var tokens = {};

    function addParseToken(token, callback) {
        var i,
            func = callback,
            tokenLen;
        if (typeof token === 'string') {
            token = [token];
        }
        if (isNumber(callback)) {
            func = function (input, array) {
                array[callback] = toInt(input);
            };
        }
        tokenLen = token.length;
        for (i = 0; i < tokenLen; i++) {
            tokens[token[i]] = func;
        }
    }

    function addWeekParseToken(token, callback) {
        addParseToken(token, function (input, array, config, token) {
            config._w = config._w || {};
            callback(input, config._w, config, token);
        });
    }

    function addTimeToArrayFromToken(token, input, config) {
        if (input != null && hasOwnProp(tokens, token)) {
            tokens[token](input, config._a, config, token);
        }
    }

    var YEAR = 0,
        MONTH = 1,
        DATE = 2,
        HOUR = 3,
        MINUTE = 4,
        SECOND = 5,
        MILLISECOND = 6,
        WEEK = 7,
        WEEKDAY = 8;

    function mod(n, x) {
        return ((n % x) + x) % x;
    }

    var indexOf;

    if (Array.prototype.indexOf) {
        indexOf = Array.prototype.indexOf;
    } else {
        indexOf = function (o) {
            // I know
            var i;
            for (i = 0; i < this.length; ++i) {
                if (this[i] === o) {
                    return i;
                }
            }
            return -1;
        };
    }

    function daysInMonth(year, month) {
        if (isNaN(year) || isNaN(month)) {
            return NaN;
        }
        var modMonth = mod(month, 12);
        year += (month - modMonth) / 12;
        return modMonth === 1
            ? isLeapYear(year)
                ? 29
                : 28
            : 31 - ((modMonth % 7) % 2);
    }

    // FORMATTING

    addFormatToken('M', ['MM', 2], 'Mo', function () {
        return this.month() + 1;
    });

    addFormatToken('MMM', 0, 0, function (format) {
        return this.localeData().monthsShort(this, format);
    });

    addFormatToken('MMMM', 0, 0, function (format) {
        return this.localeData().months(this, format);
    });

    // ALIASES

    addUnitAlias('month', 'M');

    // PRIORITY

    addUnitPriority('month', 8);

    // PARSING

    addRegexToken('M', match1to2);
    addRegexToken('MM', match1to2, match2);
    addRegexToken('MMM', function (isStrict, locale) {
        return locale.monthsShortRegex(isStrict);
    });
    addRegexToken('MMMM', function (isStrict, locale) {
        return locale.monthsRegex(isStrict);
    });

    addParseToken(['M', 'MM'], function (input, array) {
        array[MONTH] = toInt(input) - 1;
    });

    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
        var month = config._locale.monthsParse(input, token, config._strict);
        // if we didn't find a month name, mark the date as invalid.
        if (month != null) {
            array[MONTH] = month;
        } else {
            getParsingFlags(config).invalidMonth = input;
        }
    });

    // LOCALES

    var defaultLocaleMonths =
            'January_February_March_April_May_June_July_August_September_October_November_December'.split(
                '_'
            ),
        defaultLocaleMonthsShort =
            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
        MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
        defaultMonthsShortRegex = matchWord,
        defaultMonthsRegex = matchWord;

    function localeMonths(m, format) {
        if (!m) {
            return isArray(this._months)
                ? this._months
                : this._months['standalone'];
        }
        return isArray(this._months)
            ? this._months[m.month()]
            : this._months[
                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
                      ? 'format'
                      : 'standalone'
              ][m.month()];
    }

    function localeMonthsShort(m, format) {
        if (!m) {
            return isArray(this._monthsShort)
                ? this._monthsShort
                : this._monthsShort['standalone'];
        }
        return isArray(this._monthsShort)
            ? this._monthsShort[m.month()]
            : this._monthsShort[
                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
              ][m.month()];
    }

    function handleStrictParse(monthName, format, strict) {
        var i,
            ii,
            mom,
            llc = monthName.toLocaleLowerCase();
        if (!this._monthsParse) {
            // this is not used
            this._monthsParse = [];
            this._longMonthsParse = [];
            this._shortMonthsParse = [];
            for (i = 0; i < 12; ++i) {
                mom = createUTC([2000, i]);
                this._shortMonthsParse[i] = this.monthsShort(
                    mom,
                    ''
                ).toLocaleLowerCase();
                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
            }
        }

        if (strict) {
            if (format === 'MMM') {
                ii = indexOf.call(this._shortMonthsParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._longMonthsParse, llc);
                return ii !== -1 ? ii : null;
            }
        } else {
            if (format === 'MMM') {
                ii = indexOf.call(this._shortMonthsParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._longMonthsParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._longMonthsParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._shortMonthsParse, llc);
                return ii !== -1 ? ii : null;
            }
        }
    }

    function localeMonthsParse(monthName, format, strict) {
        var i, mom, regex;

        if (this._monthsParseExact) {
            return handleStrictParse.call(this, monthName, format, strict);
        }

        if (!this._monthsParse) {
            this._monthsParse = [];
            this._longMonthsParse = [];
            this._shortMonthsParse = [];
        }

        // TODO: add sorting
        // Sorting makes sure if one month (or abbr) is a prefix of another
        // see sorting in computeMonthsParse
        for (i = 0; i < 12; i++) {
            // make the regex if we don't have it already
            mom = createUTC([2000, i]);
            if (strict && !this._longMonthsParse[i]) {
                this._longMonthsParse[i] = new RegExp(
                    '^' + this.months(mom, '').replace('.', '') + '$',
                    'i'
                );
                this._shortMonthsParse[i] = new RegExp(
                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',
                    'i'
                );
            }
            if (!strict && !this._monthsParse[i]) {
                regex =
                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
            }
            // test the regex
            if (
                strict &&
                format === 'MMMM' &&
                this._longMonthsParse[i].test(monthName)
            ) {
                return i;
            } else if (
                strict &&
                format === 'MMM' &&
                this._shortMonthsParse[i].test(monthName)
            ) {
                return i;
            } else if (!strict && this._monthsParse[i].test(monthName)) {
                return i;
            }
        }
    }

    // MOMENTS

    function setMonth(mom, value) {
        var dayOfMonth;

        if (!mom.isValid()) {
            // No op
            return mom;
        }

        if (typeof value === 'string') {
            if (/^\d+$/.test(value)) {
                value = toInt(value);
            } else {
                value = mom.localeData().monthsParse(value);
                // TODO: Another silent failure?
                if (!isNumber(value)) {
                    return mom;
                }
            }
        }

        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
        return mom;
    }

    function getSetMonth(value) {
        if (value != null) {
            setMonth(this, value);
            hooks.updateOffset(this, true);
            return this;
        } else {
            return get(this, 'Month');
        }
    }

    function getDaysInMonth() {
        return daysInMonth(this.year(), this.month());
    }

    function monthsShortRegex(isStrict) {
        if (this._monthsParseExact) {
            if (!hasOwnProp(this, '_monthsRegex')) {
                computeMonthsParse.call(this);
            }
            if (isStrict) {
                return this._monthsShortStrictRegex;
            } else {
                return this._monthsShortRegex;
            }
        } else {
            if (!hasOwnProp(this, '_monthsShortRegex')) {
                this._monthsShortRegex = defaultMonthsShortRegex;
            }
            return this._monthsShortStrictRegex && isStrict
                ? this._monthsShortStrictRegex
                : this._monthsShortRegex;
        }
    }

    function monthsRegex(isStrict) {
        if (this._monthsParseExact) {
            if (!hasOwnProp(this, '_monthsRegex')) {
                computeMonthsParse.call(this);
            }
            if (isStrict) {
                return this._monthsStrictRegex;
            } else {
                return this._monthsRegex;
            }
        } else {
            if (!hasOwnProp(this, '_monthsRegex')) {
                this._monthsRegex = defaultMonthsRegex;
            }
            return this._monthsStrictRegex && isStrict
                ? this._monthsStrictRegex
                : this._monthsRegex;
        }
    }

    function computeMonthsParse() {
        function cmpLenRev(a, b) {
            return b.length - a.length;
        }

        var shortPieces = [],
            longPieces = [],
            mixedPieces = [],
            i,
            mom;
        for (i = 0; i < 12; i++) {
            // make the regex if we don't have it already
            mom = createUTC([2000, i]);
            shortPieces.push(this.monthsShort(mom, ''));
            longPieces.push(this.months(mom, ''));
            mixedPieces.push(this.months(mom, ''));
            mixedPieces.push(this.monthsShort(mom, ''));
        }
        // Sorting makes sure if one month (or abbr) is a prefix of another it
        // will match the longer piece.
        shortPieces.sort(cmpLenRev);
        longPieces.sort(cmpLenRev);
        mixedPieces.sort(cmpLenRev);
        for (i = 0; i < 12; i++) {
            shortPieces[i] = regexEscape(shortPieces[i]);
            longPieces[i] = regexEscape(longPieces[i]);
        }
        for (i = 0; i < 24; i++) {
            mixedPieces[i] = regexEscape(mixedPieces[i]);
        }

        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
        this._monthsShortRegex = this._monthsRegex;
        this._monthsStrictRegex = new RegExp(
            '^(' + longPieces.join('|') + ')',
            'i'
        );
        this._monthsShortStrictRegex = new RegExp(
            '^(' + shortPieces.join('|') + ')',
            'i'
        );
    }

    // FORMATTING

    addFormatToken('Y', 0, 0, function () {
        var y = this.year();
        return y <= 9999 ? zeroFill(y, 4) : '+' + y;
    });

    addFormatToken(0, ['YY', 2], 0, function () {
        return this.year() % 100;
    });

    addFormatToken(0, ['YYYY', 4], 0, 'year');
    addFormatToken(0, ['YYYYY', 5], 0, 'year');
    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');

    // ALIASES

    addUnitAlias('year', 'y');

    // PRIORITIES

    addUnitPriority('year', 1);

    // PARSING

    addRegexToken('Y', matchSigned);
    addRegexToken('YY', match1to2, match2);
    addRegexToken('YYYY', match1to4, match4);
    addRegexToken('YYYYY', match1to6, match6);
    addRegexToken('YYYYYY', match1to6, match6);

    addParseToken(['YYYYY', 'YYYYYY'], YEAR);
    addParseToken('YYYY', function (input, array) {
        array[YEAR] =
            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
    });
    addParseToken('YY', function (input, array) {
        array[YEAR] = hooks.parseTwoDigitYear(input);
    });
    addParseToken('Y', function (input, array) {
        array[YEAR] = parseInt(input, 10);
    });

    // HELPERS

    function daysInYear(year) {
        return isLeapYear(year) ? 366 : 365;
    }

    // HOOKS

    hooks.parseTwoDigitYear = function (input) {
        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
    };

    // MOMENTS

    var getSetYear = makeGetSet('FullYear', true);

    function getIsLeapYear() {
        return isLeapYear(this.year());
    }

    function createDate(y, m, d, h, M, s, ms) {
        // can't just apply() to create a date:
        // https://stackoverflow.com/q/181348
        var date;
        // the date constructor remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            // preserve leap years using a full 400 year cycle, then reset
            date = new Date(y + 400, m, d, h, M, s, ms);
            if (isFinite(date.getFullYear())) {
                date.setFullYear(y);
            }
        } else {
            date = new Date(y, m, d, h, M, s, ms);
        }

        return date;
    }

    function createUTCDate(y) {
        var date, args;
        // the Date.UTC function remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            args = Array.prototype.slice.call(arguments);
            // preserve leap years using a full 400 year cycle, then reset
            args[0] = y + 400;
            date = new Date(Date.UTC.apply(null, args));
            if (isFinite(date.getUTCFullYear())) {
                date.setUTCFullYear(y);
            }
        } else {
            date = new Date(Date.UTC.apply(null, arguments));
        }

        return date;
    }

    // start-of-first-week - start-of-year
    function firstWeekOffset(year, dow, doy) {
        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
            fwd = 7 + dow - doy,
            // first-week day local weekday -- which local weekday is fwd
            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;

        return -fwdlw + fwd - 1;
    }

    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
        var localWeekday = (7 + weekday - dow) % 7,
            weekOffset = firstWeekOffset(year, dow, doy),
            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
            resYear,
            resDayOfYear;

        if (dayOfYear <= 0) {
            resYear = year - 1;
            resDayOfYear = daysInYear(resYear) + dayOfYear;
        } else if (dayOfYear > daysInYear(year)) {
            resYear = year + 1;
            resDayOfYear = dayOfYear - daysInYear(year);
        } else {
            resYear = year;
            resDayOfYear = dayOfYear;
        }

        return {
            year: resYear,
            dayOfYear: resDayOfYear,
        };
    }

    function weekOfYear(mom, dow, doy) {
        var weekOffset = firstWeekOffset(mom.year(), dow, doy),
            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
            resWeek,
            resYear;

        if (week < 1) {
            resYear = mom.year() - 1;
            resWeek = week + weeksInYear(resYear, dow, doy);
        } else if (week > weeksInYear(mom.year(), dow, doy)) {
            resWeek = week - weeksInYear(mom.year(), dow, doy);
            resYear = mom.year() + 1;
        } else {
            resYear = mom.year();
            resWeek = week;
        }

        return {
            week: resWeek,
            year: resYear,
        };
    }

    function weeksInYear(year, dow, doy) {
        var weekOffset = firstWeekOffset(year, dow, doy),
            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
    }

    // FORMATTING

    addFormatToken('w', ['ww', 2], 'wo', 'week');
    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');

    // ALIASES

    addUnitAlias('week', 'w');
    addUnitAlias('isoWeek', 'W');

    // PRIORITIES

    addUnitPriority('week', 5);
    addUnitPriority('isoWeek', 5);

    // PARSING

    addRegexToken('w', match1to2);
    addRegexToken('ww', match1to2, match2);
    addRegexToken('W', match1to2);
    addRegexToken('WW', match1to2, match2);

    addWeekParseToken(
        ['w', 'ww', 'W', 'WW'],
        function (input, week, config, token) {
            week[token.substr(0, 1)] = toInt(input);
        }
    );

    // HELPERS

    // LOCALES

    function localeWeek(mom) {
        return weekOfYear(mom, this._week.dow, this._week.doy).week;
    }

    var defaultLocaleWeek = {
        dow: 0, // Sunday is the first day of the week.
        doy: 6, // The week that contains Jan 6th is the first week of the year.
    };

    function localeFirstDayOfWeek() {
        return this._week.dow;
    }

    function localeFirstDayOfYear() {
        return this._week.doy;
    }

    // MOMENTS

    function getSetWeek(input) {
        var week = this.localeData().week(this);
        return input == null ? week : this.add((input - week) * 7, 'd');
    }

    function getSetISOWeek(input) {
        var week = weekOfYear(this, 1, 4).week;
        return input == null ? week : this.add((input - week) * 7, 'd');
    }

    // FORMATTING

    addFormatToken('d', 0, 'do', 'day');

    addFormatToken('dd', 0, 0, function (format) {
        return this.localeData().weekdaysMin(this, format);
    });

    addFormatToken('ddd', 0, 0, function (format) {
        return this.localeData().weekdaysShort(this, format);
    });

    addFormatToken('dddd', 0, 0, function (format) {
        return this.localeData().weekdays(this, format);
    });

    addFormatToken('e', 0, 0, 'weekday');
    addFormatToken('E', 0, 0, 'isoWeekday');

    // ALIASES

    addUnitAlias('day', 'd');
    addUnitAlias('weekday', 'e');
    addUnitAlias('isoWeekday', 'E');

    // PRIORITY
    addUnitPriority('day', 11);
    addUnitPriority('weekday', 11);
    addUnitPriority('isoWeekday', 11);

    // PARSING

    addRegexToken('d', match1to2);
    addRegexToken('e', match1to2);
    addRegexToken('E', match1to2);
    addRegexToken('dd', function (isStrict, locale) {
        return locale.weekdaysMinRegex(isStrict);
    });
    addRegexToken('ddd', function (isStrict, locale) {
        return locale.weekdaysShortRegex(isStrict);
    });
    addRegexToken('dddd', function (isStrict, locale) {
        return locale.weekdaysRegex(isStrict);
    });

    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
        var weekday = config._locale.weekdaysParse(input, token, config._strict);
        // if we didn't get a weekday name, mark the date as invalid
        if (weekday != null) {
            week.d = weekday;
        } else {
            getParsingFlags(config).invalidWeekday = input;
        }
    });

    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
        week[token] = toInt(input);
    });

    // HELPERS

    function parseWeekday(input, locale) {
        if (typeof input !== 'string') {
            return input;
        }

        if (!isNaN(input)) {
            return parseInt(input, 10);
        }

        input = locale.weekdaysParse(input);
        if (typeof input === 'number') {
            return input;
        }

        return null;
    }

    function parseIsoWeekday(input, locale) {
        if (typeof input === 'string') {
            return locale.weekdaysParse(input) % 7 || 7;
        }
        return isNaN(input) ? null : input;
    }

    // LOCALES
    function shiftWeekdays(ws, n) {
        return ws.slice(n, 7).concat(ws.slice(0, n));
    }

    var defaultLocaleWeekdays =
            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
        defaultWeekdaysRegex = matchWord,
        defaultWeekdaysShortRegex = matchWord,
        defaultWeekdaysMinRegex = matchWord;

    function localeWeekdays(m, format) {
        var weekdays = isArray(this._weekdays)
            ? this._weekdays
            : this._weekdays[
                  m && m !== true && this._weekdays.isFormat.test(format)
                      ? 'format'
                      : 'standalone'
              ];
        return m === true
            ? shiftWeekdays(weekdays, this._week.dow)
            : m
            ? weekdays[m.day()]
            : weekdays;
    }

    function localeWeekdaysShort(m) {
        return m === true
            ? shiftWeekdays(this._weekdaysShort, this._week.dow)
            : m
            ? this._weekdaysShort[m.day()]
            : this._weekdaysShort;
    }

    function localeWeekdaysMin(m) {
        return m === true
            ? shiftWeekdays(this._weekdaysMin, this._week.dow)
            : m
            ? this._weekdaysMin[m.day()]
            : this._weekdaysMin;
    }

    function handleStrictParse$1(weekdayName, format, strict) {
        var i,
            ii,
            mom,
            llc = weekdayName.toLocaleLowerCase();
        if (!this._weekdaysParse) {
            this._weekdaysParse = [];
            this._shortWeekdaysParse = [];
            this._minWeekdaysParse = [];

            for (i = 0; i < 7; ++i) {
                mom = createUTC([2000, 1]).day(i);
                this._minWeekdaysParse[i] = this.weekdaysMin(
                    mom,
                    ''
                ).toLocaleLowerCase();
                this._shortWeekdaysParse[i] = this.weekdaysShort(
                    mom,
                    ''
                ).toLocaleLowerCase();
                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
            }
        }

        if (strict) {
            if (format === 'dddd') {
                ii = indexOf.call(this._weekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else if (format === 'ddd') {
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._minWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            }
        } else {
            if (format === 'dddd') {
                ii = indexOf.call(this._weekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._minWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else if (format === 'ddd') {
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._weekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._minWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            } else {
                ii = indexOf.call(this._minWeekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._weekdaysParse, llc);
                if (ii !== -1) {
                    return ii;
                }
                ii = indexOf.call(this._shortWeekdaysParse, llc);
                return ii !== -1 ? ii : null;
            }
        }
    }

    function localeWeekdaysParse(weekdayName, format, strict) {
        var i, mom, regex;

        if (this._weekdaysParseExact) {
            return handleStrictParse$1.call(this, weekdayName, format, strict);
        }

        if (!this._weekdaysParse) {
            this._weekdaysParse = [];
            this._minWeekdaysParse = [];
            this._shortWeekdaysParse = [];
            this._fullWeekdaysParse = [];
        }

        for (i = 0; i < 7; i++) {
            // make the regex if we don't have it already

            mom = createUTC([2000, 1]).day(i);
            if (strict && !this._fullWeekdaysParse[i]) {
                this._fullWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
                this._shortWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
                this._minWeekdaysParse[i] = new RegExp(
                    '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
                    'i'
                );
            }
            if (!this._weekdaysParse[i]) {
                regex =
                    '^' +
                    this.weekdays(mom, '') +
                    '|^' +
                    this.weekdaysShort(mom, '') +
                    '|^' +
                    this.weekdaysMin(mom, '');
                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
            }
            // test the regex
            if (
                strict &&
                format === 'dddd' &&
                this._fullWeekdaysParse[i].test(weekdayName)
            ) {
                return i;
            } else if (
                strict &&
                format === 'ddd' &&
                this._shortWeekdaysParse[i].test(weekdayName)
            ) {
                return i;
            } else if (
                strict &&
                format === 'dd' &&
                this._minWeekdaysParse[i].test(weekdayName)
            ) {
                return i;
            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
                return i;
            }
        }
    }

    // MOMENTS

    function getSetDayOfWeek(input) {
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }
        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
        if (input != null) {
            input = parseWeekday(input, this.localeData());
            return this.add(input - day, 'd');
        } else {
            return day;
        }
    }

    function getSetLocaleDayOfWeek(input) {
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }
        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
        return input == null ? weekday : this.add(input - weekday, 'd');
    }

    function getSetISODayOfWeek(input) {
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }

        // behaves the same as moment#day except
        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
        // as a setter, sunday should belong to the previous week.

        if (input != null) {
            var weekday = parseIsoWeekday(input, this.localeData());
            return this.day(this.day() % 7 ? weekday : weekday - 7);
        } else {
            return this.day() || 7;
        }
    }

    function weekdaysRegex(isStrict) {
        if (this._weekdaysParseExact) {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                computeWeekdaysParse.call(this);
            }
            if (isStrict) {
                return this._weekdaysStrictRegex;
            } else {
                return this._weekdaysRegex;
            }
        } else {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                this._weekdaysRegex = defaultWeekdaysRegex;
            }
            return this._weekdaysStrictRegex && isStrict
                ? this._weekdaysStrictRegex
                : this._weekdaysRegex;
        }
    }

    function weekdaysShortRegex(isStrict) {
        if (this._weekdaysParseExact) {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                computeWeekdaysParse.call(this);
            }
            if (isStrict) {
                return this._weekdaysShortStrictRegex;
            } else {
                return this._weekdaysShortRegex;
            }
        } else {
            if (!hasOwnProp(this, '_weekdaysShortRegex')) {
                this._weekdaysShortRegex = defaultWeekdaysShortRegex;
            }
            return this._weekdaysShortStrictRegex && isStrict
                ? this._weekdaysShortStrictRegex
                : this._weekdaysShortRegex;
        }
    }

    function weekdaysMinRegex(isStrict) {
        if (this._weekdaysParseExact) {
            if (!hasOwnProp(this, '_weekdaysRegex')) {
                computeWeekdaysParse.call(this);
            }
            if (isStrict) {
                return this._weekdaysMinStrictRegex;
            } else {
                return this._weekdaysMinRegex;
            }
        } else {
            if (!hasOwnProp(this, '_weekdaysMinRegex')) {
                this._weekdaysMinRegex = defaultWeekdaysMinRegex;
            }
            return this._weekdaysMinStrictRegex && isStrict
                ? this._weekdaysMinStrictRegex
                : this._weekdaysMinRegex;
        }
    }

    function computeWeekdaysParse() {
        function cmpLenRev(a, b) {
            return b.length - a.length;
        }

        var minPieces = [],
            shortPieces = [],
            longPieces = [],
            mixedPieces = [],
            i,
            mom,
            minp,
            shortp,
            longp;
        for (i = 0; i < 7; i++) {
            // make the regex if we don't have it already
            mom = createUTC([2000, 1]).day(i);
            minp = regexEscape(this.weekdaysMin(mom, ''));
            shortp = regexEscape(this.weekdaysShort(mom, ''));
            longp = regexEscape(this.weekdays(mom, ''));
            minPieces.push(minp);
            shortPieces.push(shortp);
            longPieces.push(longp);
            mixedPieces.push(minp);
            mixedPieces.push(shortp);
            mixedPieces.push(longp);
        }
        // Sorting makes sure if one weekday (or abbr) is a prefix of another it
        // will match the longer piece.
        minPieces.sort(cmpLenRev);
        shortPieces.sort(cmpLenRev);
        longPieces.sort(cmpLenRev);
        mixedPieces.sort(cmpLenRev);

        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
        this._weekdaysShortRegex = this._weekdaysRegex;
        this._weekdaysMinRegex = this._weekdaysRegex;

        this._weekdaysStrictRegex = new RegExp(
            '^(' + longPieces.join('|') + ')',
            'i'
        );
        this._weekdaysShortStrictRegex = new RegExp(
            '^(' + shortPieces.join('|') + ')',
            'i'
        );
        this._weekdaysMinStrictRegex = new RegExp(
            '^(' + minPieces.join('|') + ')',
            'i'
        );
    }

    // FORMATTING

    function hFormat() {
        return this.hours() % 12 || 12;
    }

    function kFormat() {
        return this.hours() || 24;
    }

    addFormatToken('H', ['HH', 2], 0, 'hour');
    addFormatToken('h', ['hh', 2], 0, hFormat);
    addFormatToken('k', ['kk', 2], 0, kFormat);

    addFormatToken('hmm', 0, 0, function () {
        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
    });

    addFormatToken('hmmss', 0, 0, function () {
        return (
            '' +
            hFormat.apply(this) +
            zeroFill(this.minutes(), 2) +
            zeroFill(this.seconds(), 2)
        );
    });

    addFormatToken('Hmm', 0, 0, function () {
        return '' + this.hours() + zeroFill(this.minutes(), 2);
    });

    addFormatToken('Hmmss', 0, 0, function () {
        return (
            '' +
            this.hours() +
            zeroFill(this.minutes(), 2) +
            zeroFill(this.seconds(), 2)
        );
    });

    function meridiem(token, lowercase) {
        addFormatToken(token, 0, 0, function () {
            return this.localeData().meridiem(
                this.hours(),
                this.minutes(),
                lowercase
            );
        });
    }

    meridiem('a', true);
    meridiem('A', false);

    // ALIASES

    addUnitAlias('hour', 'h');

    // PRIORITY
    addUnitPriority('hour', 13);

    // PARSING

    function matchMeridiem(isStrict, locale) {
        return locale._meridiemParse;
    }

    addRegexToken('a', matchMeridiem);
    addRegexToken('A', matchMeridiem);
    addRegexToken('H', match1to2);
    addRegexToken('h', match1to2);
    addRegexToken('k', match1to2);
    addRegexToken('HH', match1to2, match2);
    addRegexToken('hh', match1to2, match2);
    addRegexToken('kk', match1to2, match2);

    addRegexToken('hmm', match3to4);
    addRegexToken('hmmss', match5to6);
    addRegexToken('Hmm', match3to4);
    addRegexToken('Hmmss', match5to6);

    addParseToken(['H', 'HH'], HOUR);
    addParseToken(['k', 'kk'], function (input, array, config) {
        var kInput = toInt(input);
        array[HOUR] = kInput === 24 ? 0 : kInput;
    });
    addParseToken(['a', 'A'], function (input, array, config) {
        config._isPm = config._locale.isPM(input);
        config._meridiem = input;
    });
    addParseToken(['h', 'hh'], function (input, array, config) {
        array[HOUR] = toInt(input);
        getParsingFlags(config).bigHour = true;
    });
    addParseToken('hmm', function (input, array, config) {
        var pos = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos));
        array[MINUTE] = toInt(input.substr(pos));
        getParsingFlags(config).bigHour = true;
    });
    addParseToken('hmmss', function (input, array, config) {
        var pos1 = input.length - 4,
            pos2 = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos1));
        array[MINUTE] = toInt(input.substr(pos1, 2));
        array[SECOND] = toInt(input.substr(pos2));
        getParsingFlags(config).bigHour = true;
    });
    addParseToken('Hmm', function (input, array, config) {
        var pos = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos));
        array[MINUTE] = toInt(input.substr(pos));
    });
    addParseToken('Hmmss', function (input, array, config) {
        var pos1 = input.length - 4,
            pos2 = input.length - 2;
        array[HOUR] = toInt(input.substr(0, pos1));
        array[MINUTE] = toInt(input.substr(pos1, 2));
        array[SECOND] = toInt(input.substr(pos2));
    });

    // LOCALES

    function localeIsPM(input) {
        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
        // Using charAt should be more compatible.
        return (input + '').toLowerCase().charAt(0) === 'p';
    }

    var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
        // Setting the hour should keep the time, because the user explicitly
        // specified which hour they want. So trying to maintain the same hour (in
        // a new timezone) makes sense. Adding/subtracting hours does not follow
        // this rule.
        getSetHour = makeGetSet('Hours', true);

    function localeMeridiem(hours, minutes, isLower) {
        if (hours > 11) {
            return isLower ? 'pm' : 'PM';
        } else {
            return isLower ? 'am' : 'AM';
        }
    }

    var baseConfig = {
        calendar: defaultCalendar,
        longDateFormat: defaultLongDateFormat,
        invalidDate: defaultInvalidDate,
        ordinal: defaultOrdinal,
        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
        relativeTime: defaultRelativeTime,

        months: defaultLocaleMonths,
        monthsShort: defaultLocaleMonthsShort,

        week: defaultLocaleWeek,

        weekdays: defaultLocaleWeekdays,
        weekdaysMin: defaultLocaleWeekdaysMin,
        weekdaysShort: defaultLocaleWeekdaysShort,

        meridiemParse: defaultLocaleMeridiemParse,
    };

    // internal storage for locale config files
    var locales = {},
        localeFamilies = {},
        globalLocale;

    function commonPrefix(arr1, arr2) {
        var i,
            minl = Math.min(arr1.length, arr2.length);
        for (i = 0; i < minl; i += 1) {
            if (arr1[i] !== arr2[i]) {
                return i;
            }
        }
        return minl;
    }

    function normalizeLocale(key) {
        return key ? key.toLowerCase().replace('_', '-') : key;
    }

    // pick the locale from the array
    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
    function chooseLocale(names) {
        var i = 0,
            j,
            next,
            locale,
            split;

        while (i < names.length) {
            split = normalizeLocale(names[i]).split('-');
            j = split.length;
            next = normalizeLocale(names[i + 1]);
            next = next ? next.split('-') : null;
            while (j > 0) {
                locale = loadLocale(split.slice(0, j).join('-'));
                if (locale) {
                    return locale;
                }
                if (
                    next &&
                    next.length >= j &&
                    commonPrefix(split, next) >= j - 1
                ) {
                    //the next array item is better than a shallower substring of this one
                    break;
                }
                j--;
            }
            i++;
        }
        return globalLocale;
    }

    function isLocaleNameSane(name) {
        // Prevent names that look like filesystem paths, i.e contain '/' or '\'
        return name.match('^[^/\\\\]*$') != null;
    }

    function loadLocale(name) {
        var oldLocale = null,
            aliasedRequire;
        // TODO: Find a better way to register and load all the locales in Node
        if (
            locales[name] === undefined &&
            typeof module !== 'undefined' &&
            module &&
            module.exports &&
            isLocaleNameSane(name)
        ) {
            try {
                oldLocale = globalLocale._abbr;
                aliasedRequire = require;
                !(function webpackMissingModule() { var e = new Error("Cannot find module \"./locale\""); e.code = 'MODULE_NOT_FOUND'; throw e; }());
                getSetGlobalLocale(oldLocale);
            } catch (e) {
                // mark as not found to avoid repeating expensive file require call causing high CPU
                // when trying to find en-US, en_US, en-us for every format call
                locales[name] = null; // null means not found
            }
        }
        return locales[name];
    }

    // This function will load locale and then set the global locale.  If
    // no arguments are passed in, it will simply return the current global
    // locale key.
    function getSetGlobalLocale(key, values) {
        var data;
        if (key) {
            if (isUndefined(values)) {
                data = getLocale(key);
            } else {
                data = defineLocale(key, values);
            }

            if (data) {
                // moment.duration._locale = moment._locale = data;
                globalLocale = data;
            } else {
                if (typeof console !== 'undefined' && console.warn) {
                    //warn user if arguments are passed but the locale could not be set
                    console.warn(
                        'Locale ' + key + ' not found. Did you forget to load it?'
                    );
                }
            }
        }

        return globalLocale._abbr;
    }

    function defineLocale(name, config) {
        if (config !== null) {
            var locale,
                parentConfig = baseConfig;
            config.abbr = name;
            if (locales[name] != null) {
                deprecateSimple(
                    'defineLocaleOverride',
                    'use moment.updateLocale(localeName, config) to change ' +
                        'an existing locale. moment.defineLocale(localeName, ' +
                        'config) should only be used for creating a new locale ' +
                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
                );
                parentConfig = locales[name]._config;
            } else if (config.parentLocale != null) {
                if (locales[config.parentLocale] != null) {
                    parentConfig = locales[config.parentLocale]._config;
                } else {
                    locale = loadLocale(config.parentLocale);
                    if (locale != null) {
                        parentConfig = locale._config;
                    } else {
                        if (!localeFamilies[config.parentLocale]) {
                            localeFamilies[config.parentLocale] = [];
                        }
                        localeFamilies[config.parentLocale].push({
                            name: name,
                            config: config,
                        });
                        return null;
                    }
                }
            }
            locales[name] = new Locale(mergeConfigs(parentConfig, config));

            if (localeFamilies[name]) {
                localeFamilies[name].forEach(function (x) {
                    defineLocale(x.name, x.config);
                });
            }

            // backwards compat for now: also set the locale
            // make sure we set the locale AFTER all child locales have been
            // created, so we won't end up with the child locale set.
            getSetGlobalLocale(name);

            return locales[name];
        } else {
            // useful for testing
            delete locales[name];
            return null;
        }
    }

    function updateLocale(name, config) {
        if (config != null) {
            var locale,
                tmpLocale,
                parentConfig = baseConfig;

            if (locales[name] != null && locales[name].parentLocale != null) {
                // Update existing child locale in-place to avoid memory-leaks
                locales[name].set(mergeConfigs(locales[name]._config, config));
            } else {
                // MERGE
                tmpLocale = loadLocale(name);
                if (tmpLocale != null) {
                    parentConfig = tmpLocale._config;
                }
                config = mergeConfigs(parentConfig, config);
                if (tmpLocale == null) {
                    // updateLocale is called for creating a new locale
                    // Set abbr so it will have a name (getters return
                    // undefined otherwise).
                    config.abbr = name;
                }
                locale = new Locale(config);
                locale.parentLocale = locales[name];
                locales[name] = locale;
            }

            // backwards compat for now: also set the locale
            getSetGlobalLocale(name);
        } else {
            // pass null for config to unupdate, useful for tests
            if (locales[name] != null) {
                if (locales[name].parentLocale != null) {
                    locales[name] = locales[name].parentLocale;
                    if (name === getSetGlobalLocale()) {
                        getSetGlobalLocale(name);
                    }
                } else if (locales[name] != null) {
                    delete locales[name];
                }
            }
        }
        return locales[name];
    }

    // returns locale data
    function getLocale(key) {
        var locale;

        if (key && key._locale && key._locale._abbr) {
            key = key._locale._abbr;
        }

        if (!key) {
            return globalLocale;
        }

        if (!isArray(key)) {
            //short-circuit everything else
            locale = loadLocale(key);
            if (locale) {
                return locale;
            }
            key = [key];
        }

        return chooseLocale(key);
    }

    function listLocales() {
        return keys(locales);
    }

    function checkOverflow(m) {
        var overflow,
            a = m._a;

        if (a && getParsingFlags(m).overflow === -2) {
            overflow =
                a[MONTH] < 0 || a[MONTH] > 11
                    ? MONTH
                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
                    ? DATE
                    : a[HOUR] < 0 ||
                      a[HOUR] > 24 ||
                      (a[HOUR] === 24 &&
                          (a[MINUTE] !== 0 ||
                              a[SECOND] !== 0 ||
                              a[MILLISECOND] !== 0))
                    ? HOUR
                    : a[MINUTE] < 0 || a[MINUTE] > 59
                    ? MINUTE
                    : a[SECOND] < 0 || a[SECOND] > 59
                    ? SECOND
                    : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
                    ? MILLISECOND
                    : -1;

            if (
                getParsingFlags(m)._overflowDayOfYear &&
                (overflow < YEAR || overflow > DATE)
            ) {
                overflow = DATE;
            }
            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
                overflow = WEEK;
            }
            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
                overflow = WEEKDAY;
            }

            getParsingFlags(m).overflow = overflow;
        }

        return m;
    }

    // iso 8601 regex
    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
    var extendedIsoRegex =
            /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
        basicIsoRegex =
            /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
        tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
        isoDates = [
            ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
            ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
            ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
            ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
            ['YYYY-DDD', /\d{4}-\d{3}/],
            ['YYYY-MM', /\d{4}-\d\d/, false],
            ['YYYYYYMMDD', /[+-]\d{10}/],
            ['YYYYMMDD', /\d{8}/],
            ['GGGG[W]WWE', /\d{4}W\d{3}/],
            ['GGGG[W]WW', /\d{4}W\d{2}/, false],
            ['YYYYDDD', /\d{7}/],
            ['YYYYMM', /\d{6}/, false],
            ['YYYY', /\d{4}/, false],
        ],
        // iso time formats and regexes
        isoTimes = [
            ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
            ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
            ['HH:mm:ss', /\d\d:\d\d:\d\d/],
            ['HH:mm', /\d\d:\d\d/],
            ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
            ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
            ['HHmmss', /\d\d\d\d\d\d/],
            ['HHmm', /\d\d\d\d/],
            ['HH', /\d\d/],
        ],
        aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
        rfc2822 =
            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
        obsOffsets = {
            UT: 0,
            GMT: 0,
            EDT: -4 * 60,
            EST: -5 * 60,
            CDT: -5 * 60,
            CST: -6 * 60,
            MDT: -6 * 60,
            MST: -7 * 60,
            PDT: -7 * 60,
            PST: -8 * 60,
        };

    // date from iso format
    function configFromISO(config) {
        var i,
            l,
            string = config._i,
            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
            allowTime,
            dateFormat,
            timeFormat,
            tzFormat,
            isoDatesLen = isoDates.length,
            isoTimesLen = isoTimes.length;

        if (match) {
            getParsingFlags(config).iso = true;
            for (i = 0, l = isoDatesLen; i < l; i++) {
                if (isoDates[i][1].exec(match[1])) {
                    dateFormat = isoDates[i][0];
                    allowTime = isoDates[i][2] !== false;
                    break;
                }
            }
            if (dateFormat == null) {
                config._isValid = false;
                return;
            }
            if (match[3]) {
                for (i = 0, l = isoTimesLen; i < l; i++) {
                    if (isoTimes[i][1].exec(match[3])) {
                        // match[2] should be 'T' or space
                        timeFormat = (match[2] || ' ') + isoTimes[i][0];
                        break;
                    }
                }
                if (timeFormat == null) {
                    config._isValid = false;
                    return;
                }
            }
            if (!allowTime && timeFormat != null) {
                config._isValid = false;
                return;
            }
            if (match[4]) {
                if (tzRegex.exec(match[4])) {
                    tzFormat = 'Z';
                } else {
                    config._isValid = false;
                    return;
                }
            }
            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
            configFromStringAndFormat(config);
        } else {
            config._isValid = false;
        }
    }

    function extractFromRFC2822Strings(
        yearStr,
        monthStr,
        dayStr,
        hourStr,
        minuteStr,
        secondStr
    ) {
        var result = [
            untruncateYear(yearStr),
            defaultLocaleMonthsShort.indexOf(monthStr),
            parseInt(dayStr, 10),
            parseInt(hourStr, 10),
            parseInt(minuteStr, 10),
        ];

        if (secondStr) {
            result.push(parseInt(secondStr, 10));
        }

        return result;
    }

    function untruncateYear(yearStr) {
        var year = parseInt(yearStr, 10);
        if (year <= 49) {
            return 2000 + year;
        } else if (year <= 999) {
            return 1900 + year;
        }
        return year;
    }

    function preprocessRFC2822(s) {
        // Remove comments and folding whitespace and replace multiple-spaces with a single space
        return s
            .replace(/\([^()]*\)|[\n\t]/g, ' ')
            .replace(/(\s\s+)/g, ' ')
            .replace(/^\s\s*/, '')
            .replace(/\s\s*$/, '');
    }

    function checkWeekday(weekdayStr, parsedInput, config) {
        if (weekdayStr) {
            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
                weekdayActual = new Date(
                    parsedInput[0],
                    parsedInput[1],
                    parsedInput[2]
                ).getDay();
            if (weekdayProvided !== weekdayActual) {
                getParsingFlags(config).weekdayMismatch = true;
                config._isValid = false;
                return false;
            }
        }
        return true;
    }

    function calculateOffset(obsOffset, militaryOffset, numOffset) {
        if (obsOffset) {
            return obsOffsets[obsOffset];
        } else if (militaryOffset) {
            // the only allowed military tz is Z
            return 0;
        } else {
            var hm = parseInt(numOffset, 10),
                m = hm % 100,
                h = (hm - m) / 100;
            return h * 60 + m;
        }
    }

    // date and time from ref 2822 format
    function configFromRFC2822(config) {
        var match = rfc2822.exec(preprocessRFC2822(config._i)),
            parsedArray;
        if (match) {
            parsedArray = extractFromRFC2822Strings(
                match[4],
                match[3],
                match[2],
                match[5],
                match[6],
                match[7]
            );
            if (!checkWeekday(match[1], parsedArray, config)) {
                return;
            }

            config._a = parsedArray;
            config._tzm = calculateOffset(match[8], match[9], match[10]);

            config._d = createUTCDate.apply(null, config._a);
            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);

            getParsingFlags(config).rfc2822 = true;
        } else {
            config._isValid = false;
        }
    }

    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
    function configFromString(config) {
        var matched = aspNetJsonRegex.exec(config._i);
        if (matched !== null) {
            config._d = new Date(+matched[1]);
            return;
        }

        configFromISO(config);
        if (config._isValid === false) {
            delete config._isValid;
        } else {
            return;
        }

        configFromRFC2822(config);
        if (config._isValid === false) {
            delete config._isValid;
        } else {
            return;
        }

        if (config._strict) {
            config._isValid = false;
        } else {
            // Final attempt, use Input Fallback
            hooks.createFromInputFallback(config);
        }
    }

    hooks.createFromInputFallback = deprecate(
        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
        function (config) {
            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
        }
    );

    // Pick the first defined of two or three arguments.
    function defaults(a, b, c) {
        if (a != null) {
            return a;
        }
        if (b != null) {
            return b;
        }
        return c;
    }

    function currentDateArray(config) {
        // hooks is actually the exported moment object
        var nowValue = new Date(hooks.now());
        if (config._useUTC) {
            return [
                nowValue.getUTCFullYear(),
                nowValue.getUTCMonth(),
                nowValue.getUTCDate(),
            ];
        }
        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
    }

    // convert an array to a date.
    // the array should mirror the parameters below
    // note: all values past the year are optional and will default to the lowest possible value.
    // [year, month, day , hour, minute, second, millisecond]
    function configFromArray(config) {
        var i,
            date,
            input = [],
            currentDate,
            expectedWeekday,
            yearToUse;

        if (config._d) {
            return;
        }

        currentDate = currentDateArray(config);

        //compute day of the year from weeks and weekdays
        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
            dayOfYearFromWeekInfo(config);
        }

        //if the day of the year is set, figure out what it is
        if (config._dayOfYear != null) {
            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);

            if (
                config._dayOfYear > daysInYear(yearToUse) ||
                config._dayOfYear === 0
            ) {
                getParsingFlags(config)._overflowDayOfYear = true;
            }

            date = createUTCDate(yearToUse, 0, config._dayOfYear);
            config._a[MONTH] = date.getUTCMonth();
            config._a[DATE] = date.getUTCDate();
        }

        // Default to current date.
        // * if no year, month, day of month are given, default to today
        // * if day of month is given, default month and year
        // * if month is given, default only year
        // * if year is given, don't default anything
        for (i = 0; i < 3 && config._a[i] == null; ++i) {
            config._a[i] = input[i] = currentDate[i];
        }

        // Zero out whatever was not defaulted, including time
        for (; i < 7; i++) {
            config._a[i] = input[i] =
                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
        }

        // Check for 24:00:00.000
        if (
            config._a[HOUR] === 24 &&
            config._a[MINUTE] === 0 &&
            config._a[SECOND] === 0 &&
            config._a[MILLISECOND] === 0
        ) {
            config._nextDay = true;
            config._a[HOUR] = 0;
        }

        config._d = (config._useUTC ? createUTCDate : createDate).apply(
            null,
            input
        );
        expectedWeekday = config._useUTC
            ? config._d.getUTCDay()
            : config._d.getDay();

        // Apply timezone offset from input. The actual utcOffset can be changed
        // with parseZone.
        if (config._tzm != null) {
            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
        }

        if (config._nextDay) {
            config._a[HOUR] = 24;
        }

        // check for mismatching day of week
        if (
            config._w &&
            typeof config._w.d !== 'undefined' &&
            config._w.d !== expectedWeekday
        ) {
            getParsingFlags(config).weekdayMismatch = true;
        }
    }

    function dayOfYearFromWeekInfo(config) {
        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;

        w = config._w;
        if (w.GG != null || w.W != null || w.E != null) {
            dow = 1;
            doy = 4;

            // TODO: We need to take the current isoWeekYear, but that depends on
            // how we interpret now (local, utc, fixed offset). So create
            // a now version of current config (take local/utc/offset flags, and
            // create now).
            weekYear = defaults(
                w.GG,
                config._a[YEAR],
                weekOfYear(createLocal(), 1, 4).year
            );
            week = defaults(w.W, 1);
            weekday = defaults(w.E, 1);
            if (weekday < 1 || weekday > 7) {
                weekdayOverflow = true;
            }
        } else {
            dow = config._locale._week.dow;
            doy = config._locale._week.doy;

            curWeek = weekOfYear(createLocal(), dow, doy);

            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);

            // Default to current week.
            week = defaults(w.w, curWeek.week);

            if (w.d != null) {
                // weekday -- low day numbers are considered next week
                weekday = w.d;
                if (weekday < 0 || weekday > 6) {
                    weekdayOverflow = true;
                }
            } else if (w.e != null) {
                // local weekday -- counting starts from beginning of week
                weekday = w.e + dow;
                if (w.e < 0 || w.e > 6) {
                    weekdayOverflow = true;
                }
            } else {
                // default to beginning of week
                weekday = dow;
            }
        }
        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
            getParsingFlags(config)._overflowWeeks = true;
        } else if (weekdayOverflow != null) {
            getParsingFlags(config)._overflowWeekday = true;
        } else {
            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
            config._a[YEAR] = temp.year;
            config._dayOfYear = temp.dayOfYear;
        }
    }

    // constant that refers to the ISO standard
    hooks.ISO_8601 = function () {};

    // constant that refers to the RFC 2822 form
    hooks.RFC_2822 = function () {};

    // date from string and format string
    function configFromStringAndFormat(config) {
        // TODO: Move this to another part of the creation flow to prevent circular deps
        if (config._f === hooks.ISO_8601) {
            configFromISO(config);
            return;
        }
        if (config._f === hooks.RFC_2822) {
            configFromRFC2822(config);
            return;
        }
        config._a = [];
        getParsingFlags(config).empty = true;

        // This array is used to make a Date, either with `new Date` or `Date.UTC`
        var string = '' + config._i,
            i,
            parsedInput,
            tokens,
            token,
            skipped,
            stringLength = string.length,
            totalParsedInputLength = 0,
            era,
            tokenLen;

        tokens =
            expandFormat(config._f, config._locale).match(formattingTokens) || [];
        tokenLen = tokens.length;
        for (i = 0; i < tokenLen; i++) {
            token = tokens[i];
            parsedInput = (string.match(getParseRegexForToken(token, config)) ||
                [])[0];
            if (parsedInput) {
                skipped = string.substr(0, string.indexOf(parsedInput));
                if (skipped.length > 0) {
                    getParsingFlags(config).unusedInput.push(skipped);
                }
                string = string.slice(
                    string.indexOf(parsedInput) + parsedInput.length
                );
                totalParsedInputLength += parsedInput.length;
            }
            // don't parse if it's not a known token
            if (formatTokenFunctions[token]) {
                if (parsedInput) {
                    getParsingFlags(config).empty = false;
                } else {
                    getParsingFlags(config).unusedTokens.push(token);
                }
                addTimeToArrayFromToken(token, parsedInput, config);
            } else if (config._strict && !parsedInput) {
                getParsingFlags(config).unusedTokens.push(token);
            }
        }

        // add remaining unparsed input length to the string
        getParsingFlags(config).charsLeftOver =
            stringLength - totalParsedInputLength;
        if (string.length > 0) {
            getParsingFlags(config).unusedInput.push(string);
        }

        // clear _12h flag if hour is <= 12
        if (
            config._a[HOUR] <= 12 &&
            getParsingFlags(config).bigHour === true &&
            config._a[HOUR] > 0
        ) {
            getParsingFlags(config).bigHour = undefined;
        }

        getParsingFlags(config).parsedDateParts = config._a.slice(0);
        getParsingFlags(config).meridiem = config._meridiem;
        // handle meridiem
        config._a[HOUR] = meridiemFixWrap(
            config._locale,
            config._a[HOUR],
            config._meridiem
        );

        // handle era
        era = getParsingFlags(config).era;
        if (era !== null) {
            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
        }

        configFromArray(config);
        checkOverflow(config);
    }

    function meridiemFixWrap(locale, hour, meridiem) {
        var isPm;

        if (meridiem == null) {
            // nothing to do
            return hour;
        }
        if (locale.meridiemHour != null) {
            return locale.meridiemHour(hour, meridiem);
        } else if (locale.isPM != null) {
            // Fallback
            isPm = locale.isPM(meridiem);
            if (isPm && hour < 12) {
                hour += 12;
            }
            if (!isPm && hour === 12) {
                hour = 0;
            }
            return hour;
        } else {
            // this is not supposed to happen
            return hour;
        }
    }

    // date from string and array of format strings
    function configFromStringAndArray(config) {
        var tempConfig,
            bestMoment,
            scoreToBeat,
            i,
            currentScore,
            validFormatFound,
            bestFormatIsValid = false,
            configfLen = config._f.length;

        if (configfLen === 0) {
            getParsingFlags(config).invalidFormat = true;
            config._d = new Date(NaN);
            return;
        }

        for (i = 0; i < configfLen; i++) {
            currentScore = 0;
            validFormatFound = false;
            tempConfig = copyConfig({}, config);
            if (config._useUTC != null) {
                tempConfig._useUTC = config._useUTC;
            }
            tempConfig._f = config._f[i];
            configFromStringAndFormat(tempConfig);

            if (isValid(tempConfig)) {
                validFormatFound = true;
            }

            // if there is any input that was not parsed add a penalty for that format
            currentScore += getParsingFlags(tempConfig).charsLeftOver;

            //or tokens
            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;

            getParsingFlags(tempConfig).score = currentScore;

            if (!bestFormatIsValid) {
                if (
                    scoreToBeat == null ||
                    currentScore < scoreToBeat ||
                    validFormatFound
                ) {
                    scoreToBeat = currentScore;
                    bestMoment = tempConfig;
                    if (validFormatFound) {
                        bestFormatIsValid = true;
                    }
                }
            } else {
                if (currentScore < scoreToBeat) {
                    scoreToBeat = currentScore;
                    bestMoment = tempConfig;
                }
            }
        }

        extend(config, bestMoment || tempConfig);
    }

    function configFromObject(config) {
        if (config._d) {
            return;
        }

        var i = normalizeObjectUnits(config._i),
            dayOrDate = i.day === undefined ? i.date : i.day;
        config._a = map(
            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
            function (obj) {
                return obj && parseInt(obj, 10);
            }
        );

        configFromArray(config);
    }

    function createFromConfig(config) {
        var res = new Moment(checkOverflow(prepareConfig(config)));
        if (res._nextDay) {
            // Adding is smart enough around DST
            res.add(1, 'd');
            res._nextDay = undefined;
        }

        return res;
    }

    function prepareConfig(config) {
        var input = config._i,
            format = config._f;

        config._locale = config._locale || getLocale(config._l);

        if (input === null || (format === undefined && input === '')) {
            return createInvalid({ nullInput: true });
        }

        if (typeof input === 'string') {
            config._i = input = config._locale.preparse(input);
        }

        if (isMoment(input)) {
            return new Moment(checkOverflow(input));
        } else if (isDate(input)) {
            config._d = input;
        } else if (isArray(format)) {
            configFromStringAndArray(config);
        } else if (format) {
            configFromStringAndFormat(config);
        } else {
            configFromInput(config);
        }

        if (!isValid(config)) {
            config._d = null;
        }

        return config;
    }

    function configFromInput(config) {
        var input = config._i;
        if (isUndefined(input)) {
            config._d = new Date(hooks.now());
        } else if (isDate(input)) {
            config._d = new Date(input.valueOf());
        } else if (typeof input === 'string') {
            configFromString(config);
        } else if (isArray(input)) {
            config._a = map(input.slice(0), function (obj) {
                return parseInt(obj, 10);
            });
            configFromArray(config);
        } else if (isObject(input)) {
            configFromObject(config);
        } else if (isNumber(input)) {
            // from milliseconds
            config._d = new Date(input);
        } else {
            hooks.createFromInputFallback(config);
        }
    }

    function createLocalOrUTC(input, format, locale, strict, isUTC) {
        var c = {};

        if (format === true || format === false) {
            strict = format;
            format = undefined;
        }

        if (locale === true || locale === false) {
            strict = locale;
            locale = undefined;
        }

        if (
            (isObject(input) && isObjectEmpty(input)) ||
            (isArray(input) && input.length === 0)
        ) {
            input = undefined;
        }
        // object construction must be done this way.
        // https://github.com/moment/moment/issues/1423
        c._isAMomentObject = true;
        c._useUTC = c._isUTC = isUTC;
        c._l = locale;
        c._i = input;
        c._f = format;
        c._strict = strict;

        return createFromConfig(c);
    }

    function createLocal(input, format, locale, strict) {
        return createLocalOrUTC(input, format, locale, strict, false);
    }

    var prototypeMin = deprecate(
            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
            function () {
                var other = createLocal.apply(null, arguments);
                if (this.isValid() && other.isValid()) {
                    return other < this ? this : other;
                } else {
                    return createInvalid();
                }
            }
        ),
        prototypeMax = deprecate(
            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
            function () {
                var other = createLocal.apply(null, arguments);
                if (this.isValid() && other.isValid()) {
                    return other > this ? this : other;
                } else {
                    return createInvalid();
                }
            }
        );

    // Pick a moment m from moments so that m[fn](other) is true for all
    // other. This relies on the function fn to be transitive.
    //
    // moments should either be an array of moment objects or an array, whose
    // first element is an array of moment objects.
    function pickBy(fn, moments) {
        var res, i;
        if (moments.length === 1 && isArray(moments[0])) {
            moments = moments[0];
        }
        if (!moments.length) {
            return createLocal();
        }
        res = moments[0];
        for (i = 1; i < moments.length; ++i) {
            if (!moments[i].isValid() || moments[i][fn](res)) {
                res = moments[i];
            }
        }
        return res;
    }

    // TODO: Use [].sort instead?
    function min() {
        var args = [].slice.call(arguments, 0);

        return pickBy('isBefore', args);
    }

    function max() {
        var args = [].slice.call(arguments, 0);

        return pickBy('isAfter', args);
    }

    var now = function () {
        return Date.now ? Date.now() : +new Date();
    };

    var ordering = [
        'year',
        'quarter',
        'month',
        'week',
        'day',
        'hour',
        'minute',
        'second',
        'millisecond',
    ];

    function isDurationValid(m) {
        var key,
            unitHasDecimal = false,
            i,
            orderLen = ordering.length;
        for (key in m) {
            if (
                hasOwnProp(m, key) &&
                !(
                    indexOf.call(ordering, key) !== -1 &&
                    (m[key] == null || !isNaN(m[key]))
                )
            ) {
                return false;
            }
        }

        for (i = 0; i < orderLen; ++i) {
            if (m[ordering[i]]) {
                if (unitHasDecimal) {
                    return false; // only allow non-integers for smallest unit
                }
                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
                    unitHasDecimal = true;
                }
            }
        }

        return true;
    }

    function isValid$1() {
        return this._isValid;
    }

    function createInvalid$1() {
        return createDuration(NaN);
    }

    function Duration(duration) {
        var normalizedInput = normalizeObjectUnits(duration),
            years = normalizedInput.year || 0,
            quarters = normalizedInput.quarter || 0,
            months = normalizedInput.month || 0,
            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
            days = normalizedInput.day || 0,
            hours = normalizedInput.hour || 0,
            minutes = normalizedInput.minute || 0,
            seconds = normalizedInput.second || 0,
            milliseconds = normalizedInput.millisecond || 0;

        this._isValid = isDurationValid(normalizedInput);

        // representation for dateAddRemove
        this._milliseconds =
            +milliseconds +
            seconds * 1e3 + // 1000
            minutes * 6e4 + // 1000 * 60
            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
        // Because of dateAddRemove treats 24 hours as different from a
        // day when working around DST, we need to store them separately
        this._days = +days + weeks * 7;
        // It is impossible to translate months into days without knowing
        // which months you are are talking about, so we have to store
        // it separately.
        this._months = +months + quarters * 3 + years * 12;

        this._data = {};

        this._locale = getLocale();

        this._bubble();
    }

    function isDuration(obj) {
        return obj instanceof Duration;
    }

    function absRound(number) {
        if (number < 0) {
            return Math.round(-1 * number) * -1;
        } else {
            return Math.round(number);
        }
    }

    // compare two arrays, return the number of differences
    function compareArrays(array1, array2, dontConvert) {
        var len = Math.min(array1.length, array2.length),
            lengthDiff = Math.abs(array1.length - array2.length),
            diffs = 0,
            i;
        for (i = 0; i < len; i++) {
            if (
                (dontConvert && array1[i] !== array2[i]) ||
                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
            ) {
                diffs++;
            }
        }
        return diffs + lengthDiff;
    }

    // FORMATTING

    function offset(token, separator) {
        addFormatToken(token, 0, 0, function () {
            var offset = this.utcOffset(),
                sign = '+';
            if (offset < 0) {
                offset = -offset;
                sign = '-';
            }
            return (
                sign +
                zeroFill(~~(offset / 60), 2) +
                separator +
                zeroFill(~~offset % 60, 2)
            );
        });
    }

    offset('Z', ':');
    offset('ZZ', '');

    // PARSING

    addRegexToken('Z', matchShortOffset);
    addRegexToken('ZZ', matchShortOffset);
    addParseToken(['Z', 'ZZ'], function (input, array, config) {
        config._useUTC = true;
        config._tzm = offsetFromString(matchShortOffset, input);
    });

    // HELPERS

    // timezone chunker
    // '+10:00' > ['10',  '00']
    // '-1530'  > ['-15', '30']
    var chunkOffset = /([\+\-]|\d\d)/gi;

    function offsetFromString(matcher, string) {
        var matches = (string || '').match(matcher),
            chunk,
            parts,
            minutes;

        if (matches === null) {
            return null;
        }

        chunk = matches[matches.length - 1] || [];
        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
        minutes = +(parts[1] * 60) + toInt(parts[2]);

        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
    }

    // Return a moment from input, that is local/utc/zone equivalent to model.
    function cloneWithOffset(input, model) {
        var res, diff;
        if (model._isUTC) {
            res = model.clone();
            diff =
                (isMoment(input) || isDate(input)
                    ? input.valueOf()
                    : createLocal(input).valueOf()) - res.valueOf();
            // Use low-level api, because this fn is low-level api.
            res._d.setTime(res._d.valueOf() + diff);
            hooks.updateOffset(res, false);
            return res;
        } else {
            return createLocal(input).local();
        }
    }

    function getDateOffset(m) {
        // On Firefox.24 Date#getTimezoneOffset returns a floating point.
        // https://github.com/moment/moment/pull/1871
        return -Math.round(m._d.getTimezoneOffset());
    }

    // HOOKS

    // This function will be called whenever a moment is mutated.
    // It is intended to keep the offset in sync with the timezone.
    hooks.updateOffset = function () {};

    // MOMENTS

    // keepLocalTime = true means only change the timezone, without
    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
    // +0200, so we adjust the time as needed, to be valid.
    //
    // Keeping the time actually adds/subtracts (one hour)
    // from the actual represented time. That is why we call updateOffset
    // a second time. In case it wants us to change the offset again
    // _changeInProgress == true case, then we have to adjust, because
    // there is no such time in the given timezone.
    function getSetOffset(input, keepLocalTime, keepMinutes) {
        var offset = this._offset || 0,
            localAdjust;
        if (!this.isValid()) {
            return input != null ? this : NaN;
        }
        if (input != null) {
            if (typeof input === 'string') {
                input = offsetFromString(matchShortOffset, input);
                if (input === null) {
                    return this;
                }
            } else if (Math.abs(input) < 16 && !keepMinutes) {
                input = input * 60;
            }
            if (!this._isUTC && keepLocalTime) {
                localAdjust = getDateOffset(this);
            }
            this._offset = input;
            this._isUTC = true;
            if (localAdjust != null) {
                this.add(localAdjust, 'm');
            }
            if (offset !== input) {
                if (!keepLocalTime || this._changeInProgress) {
                    addSubtract(
                        this,
                        createDuration(input - offset, 'm'),
                        1,
                        false
                    );
                } else if (!this._changeInProgress) {
                    this._changeInProgress = true;
                    hooks.updateOffset(this, true);
                    this._changeInProgress = null;
                }
            }
            return this;
        } else {
            return this._isUTC ? offset : getDateOffset(this);
        }
    }

    function getSetZone(input, keepLocalTime) {
        if (input != null) {
            if (typeof input !== 'string') {
                input = -input;
            }

            this.utcOffset(input, keepLocalTime);

            return this;
        } else {
            return -this.utcOffset();
        }
    }

    function setOffsetToUTC(keepLocalTime) {
        return this.utcOffset(0, keepLocalTime);
    }

    function setOffsetToLocal(keepLocalTime) {
        if (this._isUTC) {
            this.utcOffset(0, keepLocalTime);
            this._isUTC = false;

            if (keepLocalTime) {
                this.subtract(getDateOffset(this), 'm');
            }
        }
        return this;
    }

    function setOffsetToParsedOffset() {
        if (this._tzm != null) {
            this.utcOffset(this._tzm, false, true);
        } else if (typeof this._i === 'string') {
            var tZone = offsetFromString(matchOffset, this._i);
            if (tZone != null) {
                this.utcOffset(tZone);
            } else {
                this.utcOffset(0, true);
            }
        }
        return this;
    }

    function hasAlignedHourOffset(input) {
        if (!this.isValid()) {
            return false;
        }
        input = input ? createLocal(input).utcOffset() : 0;

        return (this.utcOffset() - input) % 60 === 0;
    }

    function isDaylightSavingTime() {
        return (
            this.utcOffset() > this.clone().month(0).utcOffset() ||
            this.utcOffset() > this.clone().month(5).utcOffset()
        );
    }

    function isDaylightSavingTimeShifted() {
        if (!isUndefined(this._isDSTShifted)) {
            return this._isDSTShifted;
        }

        var c = {},
            other;

        copyConfig(c, this);
        c = prepareConfig(c);

        if (c._a) {
            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
            this._isDSTShifted =
                this.isValid() && compareArrays(c._a, other.toArray()) > 0;
        } else {
            this._isDSTShifted = false;
        }

        return this._isDSTShifted;
    }

    function isLocal() {
        return this.isValid() ? !this._isUTC : false;
    }

    function isUtcOffset() {
        return this.isValid() ? this._isUTC : false;
    }

    function isUtc() {
        return this.isValid() ? this._isUTC && this._offset === 0 : false;
    }

    // ASP.NET json date format regex
    var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
        // and further modified to allow for strings containing both week and day
        isoRegex =
            /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;

    function createDuration(input, key) {
        var duration = input,
            // matching against regexp is expensive, do it on demand
            match = null,
            sign,
            ret,
            diffRes;

        if (isDuration(input)) {
            duration = {
                ms: input._milliseconds,
                d: input._days,
                M: input._months,
            };
        } else if (isNumber(input) || !isNaN(+input)) {
            duration = {};
            if (key) {
                duration[key] = +input;
            } else {
                duration.milliseconds = +input;
            }
        } else if ((match = aspNetRegex.exec(input))) {
            sign = match[1] === '-' ? -1 : 1;
            duration = {
                y: 0,
                d: toInt(match[DATE]) * sign,
                h: toInt(match[HOUR]) * sign,
                m: toInt(match[MINUTE]) * sign,
                s: toInt(match[SECOND]) * sign,
                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
            };
        } else if ((match = isoRegex.exec(input))) {
            sign = match[1] === '-' ? -1 : 1;
            duration = {
                y: parseIso(match[2], sign),
                M: parseIso(match[3], sign),
                w: parseIso(match[4], sign),
                d: parseIso(match[5], sign),
                h: parseIso(match[6], sign),
                m: parseIso(match[7], sign),
                s: parseIso(match[8], sign),
            };
        } else if (duration == null) {
            // checks for null or undefined
            duration = {};
        } else if (
            typeof duration === 'object' &&
            ('from' in duration || 'to' in duration)
        ) {
            diffRes = momentsDifference(
                createLocal(duration.from),
                createLocal(duration.to)
            );

            duration = {};
            duration.ms = diffRes.milliseconds;
            duration.M = diffRes.months;
        }

        ret = new Duration(duration);

        if (isDuration(input) && hasOwnProp(input, '_locale')) {
            ret._locale = input._locale;
        }

        if (isDuration(input) && hasOwnProp(input, '_isValid')) {
            ret._isValid = input._isValid;
        }

        return ret;
    }

    createDuration.fn = Duration.prototype;
    createDuration.invalid = createInvalid$1;

    function parseIso(inp, sign) {
        // We'd normally use ~~inp for this, but unfortunately it also
        // converts floats to ints.
        // inp may be undefined, so careful calling replace on it.
        var res = inp && parseFloat(inp.replace(',', '.'));
        // apply sign while we're at it
        return (isNaN(res) ? 0 : res) * sign;
    }

    function positiveMomentsDifference(base, other) {
        var res = {};

        res.months =
            other.month() - base.month() + (other.year() - base.year()) * 12;
        if (base.clone().add(res.months, 'M').isAfter(other)) {
            --res.months;
        }

        res.milliseconds = +other - +base.clone().add(res.months, 'M');

        return res;
    }

    function momentsDifference(base, other) {
        var res;
        if (!(base.isValid() && other.isValid())) {
            return { milliseconds: 0, months: 0 };
        }

        other = cloneWithOffset(other, base);
        if (base.isBefore(other)) {
            res = positiveMomentsDifference(base, other);
        } else {
            res = positiveMomentsDifference(other, base);
            res.milliseconds = -res.milliseconds;
            res.months = -res.months;
        }

        return res;
    }

    // TODO: remove 'name' arg after deprecation is removed
    function createAdder(direction, name) {
        return function (val, period) {
            var dur, tmp;
            //invert the arguments, but complain about it
            if (period !== null && !isNaN(+period)) {
                deprecateSimple(
                    name,
                    'moment().' +
                        name +
                        '(period, number) is deprecated. Please use moment().' +
                        name +
                        '(number, period). ' +
                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
                );
                tmp = val;
                val = period;
                period = tmp;
            }

            dur = createDuration(val, period);
            addSubtract(this, dur, direction);
            return this;
        };
    }

    function addSubtract(mom, duration, isAdding, updateOffset) {
        var milliseconds = duration._milliseconds,
            days = absRound(duration._days),
            months = absRound(duration._months);

        if (!mom.isValid()) {
            // No op
            return;
        }

        updateOffset = updateOffset == null ? true : updateOffset;

        if (months) {
            setMonth(mom, get(mom, 'Month') + months * isAdding);
        }
        if (days) {
            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
        }
        if (milliseconds) {
            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
        }
        if (updateOffset) {
            hooks.updateOffset(mom, days || months);
        }
    }

    var add = createAdder(1, 'add'),
        subtract = createAdder(-1, 'subtract');

    function isString(input) {
        return typeof input === 'string' || input instanceof String;
    }

    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
    function isMomentInput(input) {
        return (
            isMoment(input) ||
            isDate(input) ||
            isString(input) ||
            isNumber(input) ||
            isNumberOrStringArray(input) ||
            isMomentInputObject(input) ||
            input === null ||
            input === undefined
        );
    }

    function isMomentInputObject(input) {
        var objectTest = isObject(input) && !isObjectEmpty(input),
            propertyTest = false,
            properties = [
                'years',
                'year',
                'y',
                'months',
                'month',
                'M',
                'days',
                'day',
                'd',
                'dates',
                'date',
                'D',
                'hours',
                'hour',
                'h',
                'minutes',
                'minute',
                'm',
                'seconds',
                'second',
                's',
                'milliseconds',
                'millisecond',
                'ms',
            ],
            i,
            property,
            propertyLen = properties.length;

        for (i = 0; i < propertyLen; i += 1) {
            property = properties[i];
            propertyTest = propertyTest || hasOwnProp(input, property);
        }

        return objectTest && propertyTest;
    }

    function isNumberOrStringArray(input) {
        var arrayTest = isArray(input),
            dataTypeTest = false;
        if (arrayTest) {
            dataTypeTest =
                input.filter(function (item) {
                    return !isNumber(item) && isString(input);
                }).length === 0;
        }
        return arrayTest && dataTypeTest;
    }

    function isCalendarSpec(input) {
        var objectTest = isObject(input) && !isObjectEmpty(input),
            propertyTest = false,
            properties = [
                'sameDay',
                'nextDay',
                'lastDay',
                'nextWeek',
                'lastWeek',
                'sameElse',
            ],
            i,
            property;

        for (i = 0; i < properties.length; i += 1) {
            property = properties[i];
            propertyTest = propertyTest || hasOwnProp(input, property);
        }

        return objectTest && propertyTest;
    }

    function getCalendarFormat(myMoment, now) {
        var diff = myMoment.diff(now, 'days', true);
        return diff < -6
            ? 'sameElse'
            : diff < -1
            ? 'lastWeek'
            : diff < 0
            ? 'lastDay'
            : diff < 1
            ? 'sameDay'
            : diff < 2
            ? 'nextDay'
            : diff < 7
            ? 'nextWeek'
            : 'sameElse';
    }

    function calendar$1(time, formats) {
        // Support for single parameter, formats only overload to the calendar function
        if (arguments.length === 1) {
            if (!arguments[0]) {
                time = undefined;
                formats = undefined;
            } else if (isMomentInput(arguments[0])) {
                time = arguments[0];
                formats = undefined;
            } else if (isCalendarSpec(arguments[0])) {
                formats = arguments[0];
                time = undefined;
            }
        }
        // We want to compare the start of today, vs this.
        // Getting start-of-today depends on whether we're local/utc/offset or not.
        var now = time || createLocal(),
            sod = cloneWithOffset(now, this).startOf('day'),
            format = hooks.calendarFormat(this, sod) || 'sameElse',
            output =
                formats &&
                (isFunction(formats[format])
                    ? formats[format].call(this, now)
                    : formats[format]);

        return this.format(
            output || this.localeData().calendar(format, this, createLocal(now))
        );
    }

    function clone() {
        return new Moment(this);
    }

    function isAfter(input, units) {
        var localInput = isMoment(input) ? input : createLocal(input);
        if (!(this.isValid() && localInput.isValid())) {
            return false;
        }
        units = normalizeUnits(units) || 'millisecond';
        if (units === 'millisecond') {
            return this.valueOf() > localInput.valueOf();
        } else {
            return localInput.valueOf() < this.clone().startOf(units).valueOf();
        }
    }

    function isBefore(input, units) {
        var localInput = isMoment(input) ? input : createLocal(input);
        if (!(this.isValid() && localInput.isValid())) {
            return false;
        }
        units = normalizeUnits(units) || 'millisecond';
        if (units === 'millisecond') {
            return this.valueOf() < localInput.valueOf();
        } else {
            return this.clone().endOf(units).valueOf() < localInput.valueOf();
        }
    }

    function isBetween(from, to, units, inclusivity) {
        var localFrom = isMoment(from) ? from : createLocal(from),
            localTo = isMoment(to) ? to : createLocal(to);
        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
            return false;
        }
        inclusivity = inclusivity || '()';
        return (
            (inclusivity[0] === '('
                ? this.isAfter(localFrom, units)
                : !this.isBefore(localFrom, units)) &&
            (inclusivity[1] === ')'
                ? this.isBefore(localTo, units)
                : !this.isAfter(localTo, units))
        );
    }

    function isSame(input, units) {
        var localInput = isMoment(input) ? input : createLocal(input),
            inputMs;
        if (!(this.isValid() && localInput.isValid())) {
            return false;
        }
        units = normalizeUnits(units) || 'millisecond';
        if (units === 'millisecond') {
            return this.valueOf() === localInput.valueOf();
        } else {
            inputMs = localInput.valueOf();
            return (
                this.clone().startOf(units).valueOf() <= inputMs &&
                inputMs <= this.clone().endOf(units).valueOf()
            );
        }
    }

    function isSameOrAfter(input, units) {
        return this.isSame(input, units) || this.isAfter(input, units);
    }

    function isSameOrBefore(input, units) {
        return this.isSame(input, units) || this.isBefore(input, units);
    }

    function diff(input, units, asFloat) {
        var that, zoneDelta, output;

        if (!this.isValid()) {
            return NaN;
        }

        that = cloneWithOffset(input, this);

        if (!that.isValid()) {
            return NaN;
        }

        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;

        units = normalizeUnits(units);

        switch (units) {
            case 'year':
                output = monthDiff(this, that) / 12;
                break;
            case 'month':
                output = monthDiff(this, that);
                break;
            case 'quarter':
                output = monthDiff(this, that) / 3;
                break;
            case 'second':
                output = (this - that) / 1e3;
                break; // 1000
            case 'minute':
                output = (this - that) / 6e4;
                break; // 1000 * 60
            case 'hour':
                output = (this - that) / 36e5;
                break; // 1000 * 60 * 60
            case 'day':
                output = (this - that - zoneDelta) / 864e5;
                break; // 1000 * 60 * 60 * 24, negate dst
            case 'week':
                output = (this - that - zoneDelta) / 6048e5;
                break; // 1000 * 60 * 60 * 24 * 7, negate dst
            default:
                output = this - that;
        }

        return asFloat ? output : absFloor(output);
    }

    function monthDiff(a, b) {
        if (a.date() < b.date()) {
            // end-of-month calculations work correct when the start month has more
            // days than the end month.
            return -monthDiff(b, a);
        }
        // difference in months
        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
            // b is in (anchor - 1 month, anchor + 1 month)
            anchor = a.clone().add(wholeMonthDiff, 'months'),
            anchor2,
            adjust;

        if (b - anchor < 0) {
            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
            // linear across the month
            adjust = (b - anchor) / (anchor - anchor2);
        } else {
            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
            // linear across the month
            adjust = (b - anchor) / (anchor2 - anchor);
        }

        //check for negative zero, return zero if negative zero
        return -(wholeMonthDiff + adjust) || 0;
    }

    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';

    function toString() {
        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
    }

    function toISOString(keepOffset) {
        if (!this.isValid()) {
            return null;
        }
        var utc = keepOffset !== true,
            m = utc ? this.clone().utc() : this;
        if (m.year() < 0 || m.year() > 9999) {
            return formatMoment(
                m,
                utc
                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
            );
        }
        if (isFunction(Date.prototype.toISOString)) {
            // native implementation is ~50x faster, use it when we can
            if (utc) {
                return this.toDate().toISOString();
            } else {
                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
                    .toISOString()
                    .replace('Z', formatMoment(m, 'Z'));
            }
        }
        return formatMoment(
            m,
            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
        );
    }

    /**
     * Return a human readable representation of a moment that can
     * also be evaluated to get a new moment which is the same
     *
     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
     */
    function inspect() {
        if (!this.isValid()) {
            return 'moment.invalid(/* ' + this._i + ' */)';
        }
        var func = 'moment',
            zone = '',
            prefix,
            year,
            datetime,
            suffix;
        if (!this.isLocal()) {
            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
            zone = 'Z';
        }
        prefix = '[' + func + '("]';
        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
        datetime = '-MM-DD[T]HH:mm:ss.SSS';
        suffix = zone + '[")]';

        return this.format(prefix + year + datetime + suffix);
    }

    function format(inputString) {
        if (!inputString) {
            inputString = this.isUtc()
                ? hooks.defaultFormatUtc
                : hooks.defaultFormat;
        }
        var output = formatMoment(this, inputString);
        return this.localeData().postformat(output);
    }

    function from(time, withoutSuffix) {
        if (
            this.isValid() &&
            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
        ) {
            return createDuration({ to: this, from: time })
                .locale(this.locale())
                .humanize(!withoutSuffix);
        } else {
            return this.localeData().invalidDate();
        }
    }

    function fromNow(withoutSuffix) {
        return this.from(createLocal(), withoutSuffix);
    }

    function to(time, withoutSuffix) {
        if (
            this.isValid() &&
            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
        ) {
            return createDuration({ from: this, to: time })
                .locale(this.locale())
                .humanize(!withoutSuffix);
        } else {
            return this.localeData().invalidDate();
        }
    }

    function toNow(withoutSuffix) {
        return this.to(createLocal(), withoutSuffix);
    }

    // If passed a locale key, it will set the locale for this
    // instance.  Otherwise, it will return the locale configuration
    // variables for this instance.
    function locale(key) {
        var newLocaleData;

        if (key === undefined) {
            return this._locale._abbr;
        } else {
            newLocaleData = getLocale(key);
            if (newLocaleData != null) {
                this._locale = newLocaleData;
            }
            return this;
        }
    }

    var lang = deprecate(
        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
        function (key) {
            if (key === undefined) {
                return this.localeData();
            } else {
                return this.locale(key);
            }
        }
    );

    function localeData() {
        return this._locale;
    }

    var MS_PER_SECOND = 1000,
        MS_PER_MINUTE = 60 * MS_PER_SECOND,
        MS_PER_HOUR = 60 * MS_PER_MINUTE,
        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;

    // actual modulo - handles negative numbers (for dates before 1970):
    function mod$1(dividend, divisor) {
        return ((dividend % divisor) + divisor) % divisor;
    }

    function localStartOfDate(y, m, d) {
        // the date constructor remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            // preserve leap years using a full 400 year cycle, then reset
            return new Date(y + 400, m, d) - MS_PER_400_YEARS;
        } else {
            return new Date(y, m, d).valueOf();
        }
    }

    function utcStartOfDate(y, m, d) {
        // Date.UTC remaps years 0-99 to 1900-1999
        if (y < 100 && y >= 0) {
            // preserve leap years using a full 400 year cycle, then reset
            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
        } else {
            return Date.UTC(y, m, d);
        }
    }

    function startOf(units) {
        var time, startOfDate;
        units = normalizeUnits(units);
        if (units === undefined || units === 'millisecond' || !this.isValid()) {
            return this;
        }

        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;

        switch (units) {
            case 'year':
                time = startOfDate(this.year(), 0, 1);
                break;
            case 'quarter':
                time = startOfDate(
                    this.year(),
                    this.month() - (this.month() % 3),
                    1
                );
                break;
            case 'month':
                time = startOfDate(this.year(), this.month(), 1);
                break;
            case 'week':
                time = startOfDate(
                    this.year(),
                    this.month(),
                    this.date() - this.weekday()
                );
                break;
            case 'isoWeek':
                time = startOfDate(
                    this.year(),
                    this.month(),
                    this.date() - (this.isoWeekday() - 1)
                );
                break;
            case 'day':
            case 'date':
                time = startOfDate(this.year(), this.month(), this.date());
                break;
            case 'hour':
                time = this._d.valueOf();
                time -= mod$1(
                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
                    MS_PER_HOUR
                );
                break;
            case 'minute':
                time = this._d.valueOf();
                time -= mod$1(time, MS_PER_MINUTE);
                break;
            case 'second':
                time = this._d.valueOf();
                time -= mod$1(time, MS_PER_SECOND);
                break;
        }

        this._d.setTime(time);
        hooks.updateOffset(this, true);
        return this;
    }

    function endOf(units) {
        var time, startOfDate;
        units = normalizeUnits(units);
        if (units === undefined || units === 'millisecond' || !this.isValid()) {
            return this;
        }

        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;

        switch (units) {
            case 'year':
                time = startOfDate(this.year() + 1, 0, 1) - 1;
                break;
            case 'quarter':
                time =
                    startOfDate(
                        this.year(),
                        this.month() - (this.month() % 3) + 3,
                        1
                    ) - 1;
                break;
            case 'month':
                time = startOfDate(this.year(), this.month() + 1, 1) - 1;
                break;
            case 'week':
                time =
                    startOfDate(
                        this.year(),
                        this.month(),
                        this.date() - this.weekday() + 7
                    ) - 1;
                break;
            case 'isoWeek':
                time =
                    startOfDate(
                        this.year(),
                        this.month(),
                        this.date() - (this.isoWeekday() - 1) + 7
                    ) - 1;
                break;
            case 'day':
            case 'date':
                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
                break;
            case 'hour':
                time = this._d.valueOf();
                time +=
                    MS_PER_HOUR -
                    mod$1(
                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
                        MS_PER_HOUR
                    ) -
                    1;
                break;
            case 'minute':
                time = this._d.valueOf();
                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
                break;
            case 'second':
                time = this._d.valueOf();
                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
                break;
        }

        this._d.setTime(time);
        hooks.updateOffset(this, true);
        return this;
    }

    function valueOf() {
        return this._d.valueOf() - (this._offset || 0) * 60000;
    }

    function unix() {
        return Math.floor(this.valueOf() / 1000);
    }

    function toDate() {
        return new Date(this.valueOf());
    }

    function toArray() {
        var m = this;
        return [
            m.year(),
            m.month(),
            m.date(),
            m.hour(),
            m.minute(),
            m.second(),
            m.millisecond(),
        ];
    }

    function toObject() {
        var m = this;
        return {
            years: m.year(),
            months: m.month(),
            date: m.date(),
            hours: m.hours(),
            minutes: m.minutes(),
            seconds: m.seconds(),
            milliseconds: m.milliseconds(),
        };
    }

    function toJSON() {
        // new Date(NaN).toJSON() === null
        return this.isValid() ? this.toISOString() : null;
    }

    function isValid$2() {
        return isValid(this);
    }

    function parsingFlags() {
        return extend({}, getParsingFlags(this));
    }

    function invalidAt() {
        return getParsingFlags(this).overflow;
    }

    function creationData() {
        return {
            input: this._i,
            format: this._f,
            locale: this._locale,
            isUTC: this._isUTC,
            strict: this._strict,
        };
    }

    addFormatToken('N', 0, 0, 'eraAbbr');
    addFormatToken('NN', 0, 0, 'eraAbbr');
    addFormatToken('NNN', 0, 0, 'eraAbbr');
    addFormatToken('NNNN', 0, 0, 'eraName');
    addFormatToken('NNNNN', 0, 0, 'eraNarrow');

    addFormatToken('y', ['y', 1], 'yo', 'eraYear');
    addFormatToken('y', ['yy', 2], 0, 'eraYear');
    addFormatToken('y', ['yyy', 3], 0, 'eraYear');
    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');

    addRegexToken('N', matchEraAbbr);
    addRegexToken('NN', matchEraAbbr);
    addRegexToken('NNN', matchEraAbbr);
    addRegexToken('NNNN', matchEraName);
    addRegexToken('NNNNN', matchEraNarrow);

    addParseToken(
        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
        function (input, array, config, token) {
            var era = config._locale.erasParse(input, token, config._strict);
            if (era) {
                getParsingFlags(config).era = era;
            } else {
                getParsingFlags(config).invalidEra = input;
            }
        }
    );

    addRegexToken('y', matchUnsigned);
    addRegexToken('yy', matchUnsigned);
    addRegexToken('yyy', matchUnsigned);
    addRegexToken('yyyy', matchUnsigned);
    addRegexToken('yo', matchEraYearOrdinal);

    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
    addParseToken(['yo'], function (input, array, config, token) {
        var match;
        if (config._locale._eraYearOrdinalRegex) {
            match = input.match(config._locale._eraYearOrdinalRegex);
        }

        if (config._locale.eraYearOrdinalParse) {
            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
        } else {
            array[YEAR] = parseInt(input, 10);
        }
    });

    function localeEras(m, format) {
        var i,
            l,
            date,
            eras = this._eras || getLocale('en')._eras;
        for (i = 0, l = eras.length; i < l; ++i) {
            switch (typeof eras[i].since) {
                case 'string':
                    // truncate time
                    date = hooks(eras[i].since).startOf('day');
                    eras[i].since = date.valueOf();
                    break;
            }

            switch (typeof eras[i].until) {
                case 'undefined':
                    eras[i].until = +Infinity;
                    break;
                case 'string':
                    // truncate time
                    date = hooks(eras[i].until).startOf('day').valueOf();
                    eras[i].until = date.valueOf();
                    break;
            }
        }
        return eras;
    }

    function localeErasParse(eraName, format, strict) {
        var i,
            l,
            eras = this.eras(),
            name,
            abbr,
            narrow;
        eraName = eraName.toUpperCase();

        for (i = 0, l = eras.length; i < l; ++i) {
            name = eras[i].name.toUpperCase();
            abbr = eras[i].abbr.toUpperCase();
            narrow = eras[i].narrow.toUpperCase();

            if (strict) {
                switch (format) {
                    case 'N':
                    case 'NN':
                    case 'NNN':
                        if (abbr === eraName) {
                            return eras[i];
                        }
                        break;

                    case 'NNNN':
                        if (name === eraName) {
                            return eras[i];
                        }
                        break;

                    case 'NNNNN':
                        if (narrow === eraName) {
                            return eras[i];
                        }
                        break;
                }
            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
                return eras[i];
            }
        }
    }

    function localeErasConvertYear(era, year) {
        var dir = era.since <= era.until ? +1 : -1;
        if (year === undefined) {
            return hooks(era.since).year();
        } else {
            return hooks(era.since).year() + (year - era.offset) * dir;
        }
    }

    function getEraName() {
        var i,
            l,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            // truncate time
            val = this.clone().startOf('day').valueOf();

            if (eras[i].since <= val && val <= eras[i].until) {
                return eras[i].name;
            }
            if (eras[i].until <= val && val <= eras[i].since) {
                return eras[i].name;
            }
        }

        return '';
    }

    function getEraNarrow() {
        var i,
            l,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            // truncate time
            val = this.clone().startOf('day').valueOf();

            if (eras[i].since <= val && val <= eras[i].until) {
                return eras[i].narrow;
            }
            if (eras[i].until <= val && val <= eras[i].since) {
                return eras[i].narrow;
            }
        }

        return '';
    }

    function getEraAbbr() {
        var i,
            l,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            // truncate time
            val = this.clone().startOf('day').valueOf();

            if (eras[i].since <= val && val <= eras[i].until) {
                return eras[i].abbr;
            }
            if (eras[i].until <= val && val <= eras[i].since) {
                return eras[i].abbr;
            }
        }

        return '';
    }

    function getEraYear() {
        var i,
            l,
            dir,
            val,
            eras = this.localeData().eras();
        for (i = 0, l = eras.length; i < l; ++i) {
            dir = eras[i].since <= eras[i].until ? +1 : -1;

            // truncate time
            val = this.clone().startOf('day').valueOf();

            if (
                (eras[i].since <= val && val <= eras[i].until) ||
                (eras[i].until <= val && val <= eras[i].since)
            ) {
                return (
                    (this.year() - hooks(eras[i].since).year()) * dir +
                    eras[i].offset
                );
            }
        }

        return this.year();
    }

    function erasNameRegex(isStrict) {
        if (!hasOwnProp(this, '_erasNameRegex')) {
            computeErasParse.call(this);
        }
        return isStrict ? this._erasNameRegex : this._erasRegex;
    }

    function erasAbbrRegex(isStrict) {
        if (!hasOwnProp(this, '_erasAbbrRegex')) {
            computeErasParse.call(this);
        }
        return isStrict ? this._erasAbbrRegex : this._erasRegex;
    }

    function erasNarrowRegex(isStrict) {
        if (!hasOwnProp(this, '_erasNarrowRegex')) {
            computeErasParse.call(this);
        }
        return isStrict ? this._erasNarrowRegex : this._erasRegex;
    }

    function matchEraAbbr(isStrict, locale) {
        return locale.erasAbbrRegex(isStrict);
    }

    function matchEraName(isStrict, locale) {
        return locale.erasNameRegex(isStrict);
    }

    function matchEraNarrow(isStrict, locale) {
        return locale.erasNarrowRegex(isStrict);
    }

    function matchEraYearOrdinal(isStrict, locale) {
        return locale._eraYearOrdinalRegex || matchUnsigned;
    }

    function computeErasParse() {
        var abbrPieces = [],
            namePieces = [],
            narrowPieces = [],
            mixedPieces = [],
            i,
            l,
            eras = this.eras();

        for (i = 0, l = eras.length; i < l; ++i) {
            namePieces.push(regexEscape(eras[i].name));
            abbrPieces.push(regexEscape(eras[i].abbr));
            narrowPieces.push(regexEscape(eras[i].narrow));

            mixedPieces.push(regexEscape(eras[i].name));
            mixedPieces.push(regexEscape(eras[i].abbr));
            mixedPieces.push(regexEscape(eras[i].narrow));
        }

        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
        this._erasNarrowRegex = new RegExp(
            '^(' + narrowPieces.join('|') + ')',
            'i'
        );
    }

    // FORMATTING

    addFormatToken(0, ['gg', 2], 0, function () {
        return this.weekYear() % 100;
    });

    addFormatToken(0, ['GG', 2], 0, function () {
        return this.isoWeekYear() % 100;
    });

    function addWeekYearFormatToken(token, getter) {
        addFormatToken(0, [token, token.length], 0, getter);
    }

    addWeekYearFormatToken('gggg', 'weekYear');
    addWeekYearFormatToken('ggggg', 'weekYear');
    addWeekYearFormatToken('GGGG', 'isoWeekYear');
    addWeekYearFormatToken('GGGGG', 'isoWeekYear');

    // ALIASES

    addUnitAlias('weekYear', 'gg');
    addUnitAlias('isoWeekYear', 'GG');

    // PRIORITY

    addUnitPriority('weekYear', 1);
    addUnitPriority('isoWeekYear', 1);

    // PARSING

    addRegexToken('G', matchSigned);
    addRegexToken('g', matchSigned);
    addRegexToken('GG', match1to2, match2);
    addRegexToken('gg', match1to2, match2);
    addRegexToken('GGGG', match1to4, match4);
    addRegexToken('gggg', match1to4, match4);
    addRegexToken('GGGGG', match1to6, match6);
    addRegexToken('ggggg', match1to6, match6);

    addWeekParseToken(
        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
        function (input, week, config, token) {
            week[token.substr(0, 2)] = toInt(input);
        }
    );

    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
        week[token] = hooks.parseTwoDigitYear(input);
    });

    // MOMENTS

    function getSetWeekYear(input) {
        return getSetWeekYearHelper.call(
            this,
            input,
            this.week(),
            this.weekday(),
            this.localeData()._week.dow,
            this.localeData()._week.doy
        );
    }

    function getSetISOWeekYear(input) {
        return getSetWeekYearHelper.call(
            this,
            input,
            this.isoWeek(),
            this.isoWeekday(),
            1,
            4
        );
    }

    function getISOWeeksInYear() {
        return weeksInYear(this.year(), 1, 4);
    }

    function getISOWeeksInISOWeekYear() {
        return weeksInYear(this.isoWeekYear(), 1, 4);
    }

    function getWeeksInYear() {
        var weekInfo = this.localeData()._week;
        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
    }

    function getWeeksInWeekYear() {
        var weekInfo = this.localeData()._week;
        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
    }

    function getSetWeekYearHelper(input, week, weekday, dow, doy) {
        var weeksTarget;
        if (input == null) {
            return weekOfYear(this, dow, doy).year;
        } else {
            weeksTarget = weeksInYear(input, dow, doy);
            if (week > weeksTarget) {
                week = weeksTarget;
            }
            return setWeekAll.call(this, input, week, weekday, dow, doy);
        }
    }

    function setWeekAll(weekYear, week, weekday, dow, doy) {
        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);

        this.year(date.getUTCFullYear());
        this.month(date.getUTCMonth());
        this.date(date.getUTCDate());
        return this;
    }

    // FORMATTING

    addFormatToken('Q', 0, 'Qo', 'quarter');

    // ALIASES

    addUnitAlias('quarter', 'Q');

    // PRIORITY

    addUnitPriority('quarter', 7);

    // PARSING

    addRegexToken('Q', match1);
    addParseToken('Q', function (input, array) {
        array[MONTH] = (toInt(input) - 1) * 3;
    });

    // MOMENTS

    function getSetQuarter(input) {
        return input == null
            ? Math.ceil((this.month() + 1) / 3)
            : this.month((input - 1) * 3 + (this.month() % 3));
    }

    // FORMATTING

    addFormatToken('D', ['DD', 2], 'Do', 'date');

    // ALIASES

    addUnitAlias('date', 'D');

    // PRIORITY
    addUnitPriority('date', 9);

    // PARSING

    addRegexToken('D', match1to2);
    addRegexToken('DD', match1to2, match2);
    addRegexToken('Do', function (isStrict, locale) {
        // TODO: Remove "ordinalParse" fallback in next major release.
        return isStrict
            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
            : locale._dayOfMonthOrdinalParseLenient;
    });

    addParseToken(['D', 'DD'], DATE);
    addParseToken('Do', function (input, array) {
        array[DATE] = toInt(input.match(match1to2)[0]);
    });

    // MOMENTS

    var getSetDayOfMonth = makeGetSet('Date', true);

    // FORMATTING

    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');

    // ALIASES

    addUnitAlias('dayOfYear', 'DDD');

    // PRIORITY
    addUnitPriority('dayOfYear', 4);

    // PARSING

    addRegexToken('DDD', match1to3);
    addRegexToken('DDDD', match3);
    addParseToken(['DDD', 'DDDD'], function (input, array, config) {
        config._dayOfYear = toInt(input);
    });

    // HELPERS

    // MOMENTS

    function getSetDayOfYear(input) {
        var dayOfYear =
            Math.round(
                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
            ) + 1;
        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
    }

    // FORMATTING

    addFormatToken('m', ['mm', 2], 0, 'minute');

    // ALIASES

    addUnitAlias('minute', 'm');

    // PRIORITY

    addUnitPriority('minute', 14);

    // PARSING

    addRegexToken('m', match1to2);
    addRegexToken('mm', match1to2, match2);
    addParseToken(['m', 'mm'], MINUTE);

    // MOMENTS

    var getSetMinute = makeGetSet('Minutes', false);

    // FORMATTING

    addFormatToken('s', ['ss', 2], 0, 'second');

    // ALIASES

    addUnitAlias('second', 's');

    // PRIORITY

    addUnitPriority('second', 15);

    // PARSING

    addRegexToken('s', match1to2);
    addRegexToken('ss', match1to2, match2);
    addParseToken(['s', 'ss'], SECOND);

    // MOMENTS

    var getSetSecond = makeGetSet('Seconds', false);

    // FORMATTING

    addFormatToken('S', 0, 0, function () {
        return ~~(this.millisecond() / 100);
    });

    addFormatToken(0, ['SS', 2], 0, function () {
        return ~~(this.millisecond() / 10);
    });

    addFormatToken(0, ['SSS', 3], 0, 'millisecond');
    addFormatToken(0, ['SSSS', 4], 0, function () {
        return this.millisecond() * 10;
    });
    addFormatToken(0, ['SSSSS', 5], 0, function () {
        return this.millisecond() * 100;
    });
    addFormatToken(0, ['SSSSSS', 6], 0, function () {
        return this.millisecond() * 1000;
    });
    addFormatToken(0, ['SSSSSSS', 7], 0, function () {
        return this.millisecond() * 10000;
    });
    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
        return this.millisecond() * 100000;
    });
    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
        return this.millisecond() * 1000000;
    });

    // ALIASES

    addUnitAlias('millisecond', 'ms');

    // PRIORITY

    addUnitPriority('millisecond', 16);

    // PARSING

    addRegexToken('S', match1to3, match1);
    addRegexToken('SS', match1to3, match2);
    addRegexToken('SSS', match1to3, match3);

    var token, getSetMillisecond;
    for (token = 'SSSS'; token.length <= 9; token += 'S') {
        addRegexToken(token, matchUnsigned);
    }

    function parseMs(input, array) {
        array[MILLISECOND] = toInt(('0.' + input) * 1000);
    }

    for (token = 'S'; token.length <= 9; token += 'S') {
        addParseToken(token, parseMs);
    }

    getSetMillisecond = makeGetSet('Milliseconds', false);

    // FORMATTING

    addFormatToken('z', 0, 0, 'zoneAbbr');
    addFormatToken('zz', 0, 0, 'zoneName');

    // MOMENTS

    function getZoneAbbr() {
        return this._isUTC ? 'UTC' : '';
    }

    function getZoneName() {
        return this._isUTC ? 'Coordinated Universal Time' : '';
    }

    var proto = Moment.prototype;

    proto.add = add;
    proto.calendar = calendar$1;
    proto.clone = clone;
    proto.diff = diff;
    proto.endOf = endOf;
    proto.format = format;
    proto.from = from;
    proto.fromNow = fromNow;
    proto.to = to;
    proto.toNow = toNow;
    proto.get = stringGet;
    proto.invalidAt = invalidAt;
    proto.isAfter = isAfter;
    proto.isBefore = isBefore;
    proto.isBetween = isBetween;
    proto.isSame = isSame;
    proto.isSameOrAfter = isSameOrAfter;
    proto.isSameOrBefore = isSameOrBefore;
    proto.isValid = isValid$2;
    proto.lang = lang;
    proto.locale = locale;
    proto.localeData = localeData;
    proto.max = prototypeMax;
    proto.min = prototypeMin;
    proto.parsingFlags = parsingFlags;
    proto.set = stringSet;
    proto.startOf = startOf;
    proto.subtract = subtract;
    proto.toArray = toArray;
    proto.toObject = toObject;
    proto.toDate = toDate;
    proto.toISOString = toISOString;
    proto.inspect = inspect;
    if (typeof Symbol !== 'undefined' && Symbol.for != null) {
        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
            return 'Moment<' + this.format() + '>';
        };
    }
    proto.toJSON = toJSON;
    proto.toString = toString;
    proto.unix = unix;
    proto.valueOf = valueOf;
    proto.creationData = creationData;
    proto.eraName = getEraName;
    proto.eraNarrow = getEraNarrow;
    proto.eraAbbr = getEraAbbr;
    proto.eraYear = getEraYear;
    proto.year = getSetYear;
    proto.isLeapYear = getIsLeapYear;
    proto.weekYear = getSetWeekYear;
    proto.isoWeekYear = getSetISOWeekYear;
    proto.quarter = proto.quarters = getSetQuarter;
    proto.month = getSetMonth;
    proto.daysInMonth = getDaysInMonth;
    proto.week = proto.weeks = getSetWeek;
    proto.isoWeek = proto.isoWeeks = getSetISOWeek;
    proto.weeksInYear = getWeeksInYear;
    proto.weeksInWeekYear = getWeeksInWeekYear;
    proto.isoWeeksInYear = getISOWeeksInYear;
    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
    proto.date = getSetDayOfMonth;
    proto.day = proto.days = getSetDayOfWeek;
    proto.weekday = getSetLocaleDayOfWeek;
    proto.isoWeekday = getSetISODayOfWeek;
    proto.dayOfYear = getSetDayOfYear;
    proto.hour = proto.hours = getSetHour;
    proto.minute = proto.minutes = getSetMinute;
    proto.second = proto.seconds = getSetSecond;
    proto.millisecond = proto.milliseconds = getSetMillisecond;
    proto.utcOffset = getSetOffset;
    proto.utc = setOffsetToUTC;
    proto.local = setOffsetToLocal;
    proto.parseZone = setOffsetToParsedOffset;
    proto.hasAlignedHourOffset = hasAlignedHourOffset;
    proto.isDST = isDaylightSavingTime;
    proto.isLocal = isLocal;
    proto.isUtcOffset = isUtcOffset;
    proto.isUtc = isUtc;
    proto.isUTC = isUtc;
    proto.zoneAbbr = getZoneAbbr;
    proto.zoneName = getZoneName;
    proto.dates = deprecate(
        'dates accessor is deprecated. Use date instead.',
        getSetDayOfMonth
    );
    proto.months = deprecate(
        'months accessor is deprecated. Use month instead',
        getSetMonth
    );
    proto.years = deprecate(
        'years accessor is deprecated. Use year instead',
        getSetYear
    );
    proto.zone = deprecate(
        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
        getSetZone
    );
    proto.isDSTShifted = deprecate(
        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
        isDaylightSavingTimeShifted
    );

    function createUnix(input) {
        return createLocal(input * 1000);
    }

    function createInZone() {
        return createLocal.apply(null, arguments).parseZone();
    }

    function preParsePostFormat(string) {
        return string;
    }

    var proto$1 = Locale.prototype;

    proto$1.calendar = calendar;
    proto$1.longDateFormat = longDateFormat;
    proto$1.invalidDate = invalidDate;
    proto$1.ordinal = ordinal;
    proto$1.preparse = preParsePostFormat;
    proto$1.postformat = preParsePostFormat;
    proto$1.relativeTime = relativeTime;
    proto$1.pastFuture = pastFuture;
    proto$1.set = set;
    proto$1.eras = localeEras;
    proto$1.erasParse = localeErasParse;
    proto$1.erasConvertYear = localeErasConvertYear;
    proto$1.erasAbbrRegex = erasAbbrRegex;
    proto$1.erasNameRegex = erasNameRegex;
    proto$1.erasNarrowRegex = erasNarrowRegex;

    proto$1.months = localeMonths;
    proto$1.monthsShort = localeMonthsShort;
    proto$1.monthsParse = localeMonthsParse;
    proto$1.monthsRegex = monthsRegex;
    proto$1.monthsShortRegex = monthsShortRegex;
    proto$1.week = localeWeek;
    proto$1.firstDayOfYear = localeFirstDayOfYear;
    proto$1.firstDayOfWeek = localeFirstDayOfWeek;

    proto$1.weekdays = localeWeekdays;
    proto$1.weekdaysMin = localeWeekdaysMin;
    proto$1.weekdaysShort = localeWeekdaysShort;
    proto$1.weekdaysParse = localeWeekdaysParse;

    proto$1.weekdaysRegex = weekdaysRegex;
    proto$1.weekdaysShortRegex = weekdaysShortRegex;
    proto$1.weekdaysMinRegex = weekdaysMinRegex;

    proto$1.isPM = localeIsPM;
    proto$1.meridiem = localeMeridiem;

    function get$1(format, index, field, setter) {
        var locale = getLocale(),
            utc = createUTC().set(setter, index);
        return locale[field](utc, format);
    }

    function listMonthsImpl(format, index, field) {
        if (isNumber(format)) {
            index = format;
            format = undefined;
        }

        format = format || '';

        if (index != null) {
            return get$1(format, index, field, 'month');
        }

        var i,
            out = [];
        for (i = 0; i < 12; i++) {
            out[i] = get$1(format, i, field, 'month');
        }
        return out;
    }

    // ()
    // (5)
    // (fmt, 5)
    // (fmt)
    // (true)
    // (true, 5)
    // (true, fmt, 5)
    // (true, fmt)
    function listWeekdaysImpl(localeSorted, format, index, field) {
        if (typeof localeSorted === 'boolean') {
            if (isNumber(format)) {
                index = format;
                format = undefined;
            }

            format = format || '';
        } else {
            format = localeSorted;
            index = format;
            localeSorted = false;

            if (isNumber(format)) {
                index = format;
                format = undefined;
            }

            format = format || '';
        }

        var locale = getLocale(),
            shift = localeSorted ? locale._week.dow : 0,
            i,
            out = [];

        if (index != null) {
            return get$1(format, (index + shift) % 7, field, 'day');
        }

        for (i = 0; i < 7; i++) {
            out[i] = get$1(format, (i + shift) % 7, field, 'day');
        }
        return out;
    }

    function listMonths(format, index) {
        return listMonthsImpl(format, index, 'months');
    }

    function listMonthsShort(format, index) {
        return listMonthsImpl(format, index, 'monthsShort');
    }

    function listWeekdays(localeSorted, format, index) {
        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
    }

    function listWeekdaysShort(localeSorted, format, index) {
        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
    }

    function listWeekdaysMin(localeSorted, format, index) {
        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
    }

    getSetGlobalLocale('en', {
        eras: [
            {
                since: '0001-01-01',
                until: +Infinity,
                offset: 1,
                name: 'Anno Domini',
                narrow: 'AD',
                abbr: 'AD',
            },
            {
                since: '0000-12-31',
                until: -Infinity,
                offset: 1,
                name: 'Before Christ',
                narrow: 'BC',
                abbr: 'BC',
            },
        ],
        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
        ordinal: function (number) {
            var b = number % 10,
                output =
                    toInt((number % 100) / 10) === 1
                        ? 'th'
                        : b === 1
                        ? 'st'
                        : b === 2
                        ? 'nd'
                        : b === 3
                        ? 'rd'
                        : 'th';
            return number + output;
        },
    });

    // Side effect imports

    hooks.lang = deprecate(
        'moment.lang is deprecated. Use moment.locale instead.',
        getSetGlobalLocale
    );
    hooks.langData = deprecate(
        'moment.langData is deprecated. Use moment.localeData instead.',
        getLocale
    );

    var mathAbs = Math.abs;

    function abs() {
        var data = this._data;

        this._milliseconds = mathAbs(this._milliseconds);
        this._days = mathAbs(this._days);
        this._months = mathAbs(this._months);

        data.milliseconds = mathAbs(data.milliseconds);
        data.seconds = mathAbs(data.seconds);
        data.minutes = mathAbs(data.minutes);
        data.hours = mathAbs(data.hours);
        data.months = mathAbs(data.months);
        data.years = mathAbs(data.years);

        return this;
    }

    function addSubtract$1(duration, input, value, direction) {
        var other = createDuration(input, value);

        duration._milliseconds += direction * other._milliseconds;
        duration._days += direction * other._days;
        duration._months += direction * other._months;

        return duration._bubble();
    }

    // supports only 2.0-style add(1, 's') or add(duration)
    function add$1(input, value) {
        return addSubtract$1(this, input, value, 1);
    }

    // supports only 2.0-style subtract(1, 's') or subtract(duration)
    function subtract$1(input, value) {
        return addSubtract$1(this, input, value, -1);
    }

    function absCeil(number) {
        if (number < 0) {
            return Math.floor(number);
        } else {
            return Math.ceil(number);
        }
    }

    function bubble() {
        var milliseconds = this._milliseconds,
            days = this._days,
            months = this._months,
            data = this._data,
            seconds,
            minutes,
            hours,
            years,
            monthsFromDays;

        // if we have a mix of positive and negative values, bubble down first
        // check: https://github.com/moment/moment/issues/2166
        if (
            !(
                (milliseconds >= 0 && days >= 0 && months >= 0) ||
                (milliseconds <= 0 && days <= 0 && months <= 0)
            )
        ) {
            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
            days = 0;
            months = 0;
        }

        // The following code bubbles up values, see the tests for
        // examples of what that means.
        data.milliseconds = milliseconds % 1000;

        seconds = absFloor(milliseconds / 1000);
        data.seconds = seconds % 60;

        minutes = absFloor(seconds / 60);
        data.minutes = minutes % 60;

        hours = absFloor(minutes / 60);
        data.hours = hours % 24;

        days += absFloor(hours / 24);

        // convert days to months
        monthsFromDays = absFloor(daysToMonths(days));
        months += monthsFromDays;
        days -= absCeil(monthsToDays(monthsFromDays));

        // 12 months -> 1 year
        years = absFloor(months / 12);
        months %= 12;

        data.days = days;
        data.months = months;
        data.years = years;

        return this;
    }

    function daysToMonths(days) {
        // 400 years have 146097 days (taking into account leap year rules)
        // 400 years have 12 months === 4800
        return (days * 4800) / 146097;
    }

    function monthsToDays(months) {
        // the reverse of daysToMonths
        return (months * 146097) / 4800;
    }

    function as(units) {
        if (!this.isValid()) {
            return NaN;
        }
        var days,
            months,
            milliseconds = this._milliseconds;

        units = normalizeUnits(units);

        if (units === 'month' || units === 'quarter' || units === 'year') {
            days = this._days + milliseconds / 864e5;
            months = this._months + daysToMonths(days);
            switch (units) {
                case 'month':
                    return months;
                case 'quarter':
                    return months / 3;
                case 'year':
                    return months / 12;
            }
        } else {
            // handle milliseconds separately because of floating point math errors (issue #1867)
            days = this._days + Math.round(monthsToDays(this._months));
            switch (units) {
                case 'week':
                    return days / 7 + milliseconds / 6048e5;
                case 'day':
                    return days + milliseconds / 864e5;
                case 'hour':
                    return days * 24 + milliseconds / 36e5;
                case 'minute':
                    return days * 1440 + milliseconds / 6e4;
                case 'second':
                    return days * 86400 + milliseconds / 1000;
                // Math.floor prevents floating point math errors here
                case 'millisecond':
                    return Math.floor(days * 864e5) + milliseconds;
                default:
                    throw new Error('Unknown unit ' + units);
            }
        }
    }

    // TODO: Use this.as('ms')?
    function valueOf$1() {
        if (!this.isValid()) {
            return NaN;
        }
        return (
            this._milliseconds +
            this._days * 864e5 +
            (this._months % 12) * 2592e6 +
            toInt(this._months / 12) * 31536e6
        );
    }

    function makeAs(alias) {
        return function () {
            return this.as(alias);
        };
    }

    var asMilliseconds = makeAs('ms'),
        asSeconds = makeAs('s'),
        asMinutes = makeAs('m'),
        asHours = makeAs('h'),
        asDays = makeAs('d'),
        asWeeks = makeAs('w'),
        asMonths = makeAs('M'),
        asQuarters = makeAs('Q'),
        asYears = makeAs('y');

    function clone$1() {
        return createDuration(this);
    }

    function get$2(units) {
        units = normalizeUnits(units);
        return this.isValid() ? this[units + 's']() : NaN;
    }

    function makeGetter(name) {
        return function () {
            return this.isValid() ? this._data[name] : NaN;
        };
    }

    var milliseconds = makeGetter('milliseconds'),
        seconds = makeGetter('seconds'),
        minutes = makeGetter('minutes'),
        hours = makeGetter('hours'),
        days = makeGetter('days'),
        months = makeGetter('months'),
        years = makeGetter('years');

    function weeks() {
        return absFloor(this.days() / 7);
    }

    var round = Math.round,
        thresholds = {
            ss: 44, // a few seconds to seconds
            s: 45, // seconds to minute
            m: 45, // minutes to hour
            h: 22, // hours to day
            d: 26, // days to month/week
            w: null, // weeks to month
            M: 11, // months to year
        };

    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
    }

    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
        var duration = createDuration(posNegDuration).abs(),
            seconds = round(duration.as('s')),
            minutes = round(duration.as('m')),
            hours = round(duration.as('h')),
            days = round(duration.as('d')),
            months = round(duration.as('M')),
            weeks = round(duration.as('w')),
            years = round(duration.as('y')),
            a =
                (seconds <= thresholds.ss && ['s', seconds]) ||
                (seconds < thresholds.s && ['ss', seconds]) ||
                (minutes <= 1 && ['m']) ||
                (minutes < thresholds.m && ['mm', minutes]) ||
                (hours <= 1 && ['h']) ||
                (hours < thresholds.h && ['hh', hours]) ||
                (days <= 1 && ['d']) ||
                (days < thresholds.d && ['dd', days]);

        if (thresholds.w != null) {
            a =
                a ||
                (weeks <= 1 && ['w']) ||
                (weeks < thresholds.w && ['ww', weeks]);
        }
        a = a ||
            (months <= 1 && ['M']) ||
            (months < thresholds.M && ['MM', months]) ||
            (years <= 1 && ['y']) || ['yy', years];

        a[2] = withoutSuffix;
        a[3] = +posNegDuration > 0;
        a[4] = locale;
        return substituteTimeAgo.apply(null, a);
    }

    // This function allows you to set the rounding function for relative time strings
    function getSetRelativeTimeRounding(roundingFunction) {
        if (roundingFunction === undefined) {
            return round;
        }
        if (typeof roundingFunction === 'function') {
            round = roundingFunction;
            return true;
        }
        return false;
    }

    // This function allows you to set a threshold for relative time strings
    function getSetRelativeTimeThreshold(threshold, limit) {
        if (thresholds[threshold] === undefined) {
            return false;
        }
        if (limit === undefined) {
            return thresholds[threshold];
        }
        thresholds[threshold] = limit;
        if (threshold === 's') {
            thresholds.ss = limit - 1;
        }
        return true;
    }

    function humanize(argWithSuffix, argThresholds) {
        if (!this.isValid()) {
            return this.localeData().invalidDate();
        }

        var withSuffix = false,
            th = thresholds,
            locale,
            output;

        if (typeof argWithSuffix === 'object') {
            argThresholds = argWithSuffix;
            argWithSuffix = false;
        }
        if (typeof argWithSuffix === 'boolean') {
            withSuffix = argWithSuffix;
        }
        if (typeof argThresholds === 'object') {
            th = Object.assign({}, thresholds, argThresholds);
            if (argThresholds.s != null && argThresholds.ss == null) {
                th.ss = argThresholds.s - 1;
            }
        }

        locale = this.localeData();
        output = relativeTime$1(this, !withSuffix, th, locale);

        if (withSuffix) {
            output = locale.pastFuture(+this, output);
        }

        return locale.postformat(output);
    }

    var abs$1 = Math.abs;

    function sign(x) {
        return (x > 0) - (x < 0) || +x;
    }

    function toISOString$1() {
        // for ISO strings we do not use the normal bubbling rules:
        //  * milliseconds bubble up until they become hours
        //  * days do not bubble at all
        //  * months bubble up until they become years
        // This is because there is no context-free conversion between hours and days
        // (think of clock changes)
        // and also not between days and months (28-31 days per month)
        if (!this.isValid()) {
            return this.localeData().invalidDate();
        }

        var seconds = abs$1(this._milliseconds) / 1000,
            days = abs$1(this._days),
            months = abs$1(this._months),
            minutes,
            hours,
            years,
            s,
            total = this.asSeconds(),
            totalSign,
            ymSign,
            daysSign,
            hmsSign;

        if (!total) {
            // this is the same as C#'s (Noda) and python (isodate)...
            // but not other JS (goog.date)
            return 'P0D';
        }

        // 3600 seconds -> 60 minutes -> 1 hour
        minutes = absFloor(seconds / 60);
        hours = absFloor(minutes / 60);
        seconds %= 60;
        minutes %= 60;

        // 12 months -> 1 year
        years = absFloor(months / 12);
        months %= 12;

        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
        s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';

        totalSign = total < 0 ? '-' : '';
        ymSign = sign(this._months) !== sign(total) ? '-' : '';
        daysSign = sign(this._days) !== sign(total) ? '-' : '';
        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';

        return (
            totalSign +
            'P' +
            (years ? ymSign + years + 'Y' : '') +
            (months ? ymSign + months + 'M' : '') +
            (days ? daysSign + days + 'D' : '') +
            (hours || minutes || seconds ? 'T' : '') +
            (hours ? hmsSign + hours + 'H' : '') +
            (minutes ? hmsSign + minutes + 'M' : '') +
            (seconds ? hmsSign + s + 'S' : '')
        );
    }

    var proto$2 = Duration.prototype;

    proto$2.isValid = isValid$1;
    proto$2.abs = abs;
    proto$2.add = add$1;
    proto$2.subtract = subtract$1;
    proto$2.as = as;
    proto$2.asMilliseconds = asMilliseconds;
    proto$2.asSeconds = asSeconds;
    proto$2.asMinutes = asMinutes;
    proto$2.asHours = asHours;
    proto$2.asDays = asDays;
    proto$2.asWeeks = asWeeks;
    proto$2.asMonths = asMonths;
    proto$2.asQuarters = asQuarters;
    proto$2.asYears = asYears;
    proto$2.valueOf = valueOf$1;
    proto$2._bubble = bubble;
    proto$2.clone = clone$1;
    proto$2.get = get$2;
    proto$2.milliseconds = milliseconds;
    proto$2.seconds = seconds;
    proto$2.minutes = minutes;
    proto$2.hours = hours;
    proto$2.days = days;
    proto$2.weeks = weeks;
    proto$2.months = months;
    proto$2.years = years;
    proto$2.humanize = humanize;
    proto$2.toISOString = toISOString$1;
    proto$2.toString = toISOString$1;
    proto$2.toJSON = toISOString$1;
    proto$2.locale = locale;
    proto$2.localeData = localeData;

    proto$2.toIsoString = deprecate(
        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
        toISOString$1
    );
    proto$2.lang = lang;

    // FORMATTING

    addFormatToken('X', 0, 0, 'unix');
    addFormatToken('x', 0, 0, 'valueOf');

    // PARSING

    addRegexToken('x', matchSigned);
    addRegexToken('X', matchTimestamp);
    addParseToken('X', function (input, array, config) {
        config._d = new Date(parseFloat(input) * 1000);
    });
    addParseToken('x', function (input, array, config) {
        config._d = new Date(toInt(input));
    });

    //! moment.js

    hooks.version = '2.29.4';

    setHookCallback(createLocal);

    hooks.fn = proto;
    hooks.min = min;
    hooks.max = max;
    hooks.now = now;
    hooks.utc = createUTC;
    hooks.unix = createUnix;
    hooks.months = listMonths;
    hooks.isDate = isDate;
    hooks.locale = getSetGlobalLocale;
    hooks.invalid = createInvalid;
    hooks.duration = createDuration;
    hooks.isMoment = isMoment;
    hooks.weekdays = listWeekdays;
    hooks.parseZone = createInZone;
    hooks.localeData = getLocale;
    hooks.isDuration = isDuration;
    hooks.monthsShort = listMonthsShort;
    hooks.weekdaysMin = listWeekdaysMin;
    hooks.defineLocale = defineLocale;
    hooks.updateLocale = updateLocale;
    hooks.locales = listLocales;
    hooks.weekdaysShort = listWeekdaysShort;
    hooks.normalizeUnits = normalizeUnits;
    hooks.relativeTimeRounding = getSetRelativeTimeRounding;
    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
    hooks.calendarFormat = getCalendarFormat;
    hooks.prototype = proto;

    // currently HTML5 input type only supports 24-hour formats
    hooks.HTML5_FMT = {
        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
        DATE: 'YYYY-MM-DD', // <input type="date" />
        TIME: 'HH:mm', // <input type="time" />
        TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
        TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
        WEEK: 'GGGG-[W]WW', // <input type="week" />
        MONTH: 'YYYY-MM', // <input type="month" />
    };

    return hooks;

})));

/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(453)(module)))

/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.version = {
    lib: '2.10123.0',
    product: '2.10123.0',
    supportedApiVersion: 2
};


/***/ }),
/* 105 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var detector = __webpack_require__(148);
var cookieutils_1 = __webpack_require__(311);
exports.preferredStorage = null;
function getAvailableStorage() {
    if (exports.preferredStorage) {
        return exports.preferredStorage;
    }
    if (detector.hasLocalStorage()) {
        return localStorage;
    }
    if (detector.hasCookieStorage()) {
        return new CookieStorage();
    }
    if (detector.hasSessionStorage()) {
        return sessionStorage;
    }
    return new NullStorage();
}
exports.getAvailableStorage = getAvailableStorage;
var CookieStorage = (function () {
    function CookieStorage() {
    }
    CookieStorage.prototype.getItem = function (key) {
        return cookieutils_1.Cookie.get(key);
    };
    CookieStorage.prototype.removeItem = function (key) {
        cookieutils_1.Cookie.erase(key);
    };
    CookieStorage.prototype.setItem = function (key, data) {
        cookieutils_1.Cookie.set(key, data);
    };
    return CookieStorage;
}());
exports.CookieStorage = CookieStorage;
var NullStorage = (function () {
    function NullStorage() {
    }
    NullStorage.prototype.getItem = function (key) { return null; };
    NullStorage.prototype.removeItem = function (key) { };
    NullStorage.prototype.setItem = function (key, data) { };
    return NullStorage;
}());
exports.NullStorage = NullStorage;


/***/ }),
/* 106 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var DebugEvents = /** @class */ (function () {
    function DebugEvents() {
    }
    DebugEvents.showDebugPanel = 'showDebugPanel';
    return DebugEvents;
}());
exports.DebugEvents = DebugEvents;


/***/ }),
/* 107 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var NoopAnalyticsClient = /** @class */ (function () {
    function NoopAnalyticsClient() {
        this.isContextual = false;
        this.endpoint = null;
    }
    NoopAnalyticsClient.prototype.isActivated = function () {
        return false;
    };
    NoopAnalyticsClient.prototype.getCurrentEventCause = function () {
        return this.currentEventCause;
    };
    NoopAnalyticsClient.prototype.getCurrentEventMeta = function () {
        return this.currentEventMeta;
    };
    NoopAnalyticsClient.prototype.logSearchEvent = function (actionCause, meta) {
        this.setNoopCauseAndMeta(actionCause.name, meta);
    };
    NoopAnalyticsClient.prototype.logSearchAsYouType = function (actionCause, meta) {
        this.setNoopCauseAndMeta(actionCause.name, meta);
    };
    NoopAnalyticsClient.prototype.logClickEvent = function (actionCause, meta, result, element) {
        this.setNoopCauseAndMeta(actionCause.name, meta);
        return Promise.resolve(null);
    };
    NoopAnalyticsClient.prototype.logCustomEvent = function (actionCause, meta, element) {
        this.setNoopCauseAndMeta(actionCause.name, meta);
        return Promise.resolve(null);
    };
    NoopAnalyticsClient.prototype.getTopQueries = function (params) {
        return new Promise(function (resolve, reject) {
            resolve([]);
        });
    };
    NoopAnalyticsClient.prototype.getCurrentVisitIdPromise = function () {
        return new Promise(function (resolve, reject) {
            resolve(null);
        });
    };
    NoopAnalyticsClient.prototype.getCurrentVisitId = function () {
        return null;
    };
    NoopAnalyticsClient.prototype.sendAllPendingEvents = function () { };
    NoopAnalyticsClient.prototype.cancelAllPendingEvents = function () { };
    NoopAnalyticsClient.prototype.warnAboutSearchEvent = function () { };
    NoopAnalyticsClient.prototype.getPendingSearchEvent = function () {
        return null;
    };
    NoopAnalyticsClient.prototype.setOriginContext = function (originContext) { };
    NoopAnalyticsClient.prototype.getOriginContext = function () {
        return '';
    };
    NoopAnalyticsClient.prototype.getUserDisplayName = function () {
        return '';
    };
    NoopAnalyticsClient.prototype.setNoopCauseAndMeta = function (cause, meta) {
        this.currentEventCause = cause;
        this.currentEventMeta = meta;
    };
    return NoopAnalyticsClient;
}());
exports.NoopAnalyticsClient = NoopAnalyticsClient;


/***/ }),
/* 108 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(27);
var Assert_1 = __webpack_require__(5);
var TemplateFromAScriptTag_1 = __webpack_require__(159);
var HtmlTemplate = /** @class */ (function (_super) {
    __extends(HtmlTemplate, _super);
    function HtmlTemplate(element) {
        var _this = _super.call(this, function () { return element.innerHTML; }) || this;
        _this.element = element;
        _this.templateFromAScriptTag = new TemplateFromAScriptTag_1.TemplateFromAScriptTag(_this, _this.element);
        return _this;
    }
    HtmlTemplate.prototype.toHtmlElement = function () {
        var script = this.templateFromAScriptTag.toHtmlElement();
        // We don't set the type attribute for 2 reasons:
        // 1) LockerService doesn't like when we set it.
        // 2) The HTML Template is the default one.
        return script;
    };
    HtmlTemplate.prototype.getType = function () {
        return 'HtmlTemplate';
    };
    HtmlTemplate.create = function (element) {
        Assert_1.Assert.exists(element);
        return new HtmlTemplate(element);
    };
    HtmlTemplate.fromString = function (template, properties) {
        var script = TemplateFromAScriptTag_1.TemplateFromAScriptTag.fromString(template, properties);
        // We don't set the type attribute for 2 reasons:
        // 1) LockerService doesn't like when we set it.
        // 2) The HTML Template is the default one.
        return new HtmlTemplate(script);
    };
    HtmlTemplate.prototype.getTemplateInfo = function () {
        return this.element;
    };
    HtmlTemplate.mimeTypes = ['text/html', 'text/HTML'];
    return HtmlTemplate;
}(Template_1.Template));
exports.HtmlTemplate = HtmlTemplate;


/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(80);
var IE8_DOM_DEFINE = __webpack_require__(401);
var toPrimitive = __webpack_require__(402);
var dP = Object.defineProperty;

exports.f = __webpack_require__(81) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return dP(O, P, Attributes);
  } catch (e) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),
/* 110 */
/***/ (function(module, exports) {

module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};


/***/ }),
/* 111 */
/***/ (function(module, exports) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (e) {
    return true;
  }
};


/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {

// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(406);
var defined = __webpack_require__(83);
module.exports = function (it) {
  return IObject(defined(it));
};


/***/ }),
/* 113 */
/***/ (function(module, exports) {

var toString = {}.toString;

module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};


/***/ }),
/* 114 */
/***/ (function(module, exports) {

// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};


/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {

var shared = __webpack_require__(164)('keys');
var uid = __webpack_require__(166);
module.exports = function (key) {
  return shared[key] || (shared[key] = uid(key));
};


/***/ }),
/* 116 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(418);

/***/ }),
/* 117 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var QueryEvents_1 = __webpack_require__(11);
var Assert_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(1);
var SearchInterface_1 = __webpack_require__(19);
var Component_1 = __webpack_require__(7);
var QueryController_1 = __webpack_require__(44);
var Defer_1 = __webpack_require__(31);
var APIAnalyticsBuilder_1 = __webpack_require__(172);
var AnalyticsEvents_1 = __webpack_require__(58);
var AnalyticsActionListMeta_1 = __webpack_require__(10);
var QueryStateModel_1 = __webpack_require__(13);
var underscore_1 = __webpack_require__(0);
var Logger_1 = __webpack_require__(9);
var PendingSearchEvent = /** @class */ (function () {
    function PendingSearchEvent(root, endpoint, templateSearchEvent, sendToCloud) {
        var _this = this;
        this.root = root;
        this.endpoint = endpoint;
        this.templateSearchEvent = templateSearchEvent;
        this.sendToCloud = sendToCloud;
        this.searchPromises = [];
        this.results = [];
        this.cancelled = false;
        this.finished = false;
        this.searchEvents = [];
        Assert_1.Assert.exists(root);
        Assert_1.Assert.exists(endpoint);
        Assert_1.Assert.exists(templateSearchEvent);
        this.handler = function (evt, arg) {
            _this.handleDuringQuery(evt, arg);
        };
        Dom_1.$$(root).on(QueryEvents_1.QueryEvents.duringQuery, this.handler);
    }
    PendingSearchEvent.prototype.getEventCause = function () {
        return this.templateSearchEvent.actionCause;
    };
    PendingSearchEvent.prototype.getEventMeta = function () {
        return this.templateSearchEvent.customData;
    };
    PendingSearchEvent.prototype.addFacetState = function (state) {
        if (!this.facetState) {
            this.facetState = [];
        }
        (_a = this.facetState).push.apply(_a, state);
        var _a;
    };
    PendingSearchEvent.prototype.cancel = function () {
        this.stopRecording();
        this.cancelled = true;
    };
    PendingSearchEvent.prototype.stopRecording = function () {
        if (this.handler) {
            Dom_1.$$(this.root).off(QueryEvents_1.QueryEvents.duringQuery, this.handler);
            Dom_1.$$(this.root).off(QueryEvents_1.QueryEvents.duringFetchMoreQuery, this.handler);
            this.handler = null;
        }
    };
    PendingSearchEvent.prototype.handleDuringQuery = function (evt, args, queryBoxContentToUse) {
        Assert_1.Assert.check(!this.finished);
        Assert_1.Assert.check(!this.cancelled);
        // When synchronizing multiple search interfaces under a single search event
        // (think Salesforce boxes), we need to collect all search events and send them
        // in one single batch. So we gather all events until we idle out and then we
        // monitor those before sending the data.
        this.searchPromises.push(args.promise);
        var eventTarget = evt.target;
        var searchInterface = Component_1.Component.get(eventTarget, SearchInterface_1.SearchInterface);
        Assert_1.Assert.exists(searchInterface);
        // We try to grab ahead of time the content of the search box before the query returns
        // This is because it's possible that the content of the search box gets modified when the query returns (for example : DidYouMean)
        if (!queryBoxContentToUse) {
            queryBoxContentToUse = searchInterface.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q);
        }
        var queryController = Component_1.Component.get(eventTarget, QueryController_1.QueryController);
        Assert_1.Assert.exists(queryController);
        this.updateSearchEventsAndQueryResults(args, searchInterface, queryBoxContentToUse);
    };
    PendingSearchEvent.prototype.updateSearchEventsAndQueryResults = function (args, searchInterface, queryBoxContentToUse) {
        return __awaiter(this, void 0, void 0, function () {
            var queryResults, isRecommendationPanelAction, searchEvent, e_1, index;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _a.trys.push([0, 2, , 3]);
                        return [4 /*yield*/, args.promise];
                    case 1:
                        queryResults = _a.sent();
                        Assert_1.Assert.exists(queryResults);
                        Assert_1.Assert.check(!this.finished);
                        isRecommendationPanelAction = this.templateSearchEvent.actionCause === AnalyticsActionListMeta_1.analyticsActionCauseList.recommendation.name;
                        if (queryResults._reusedSearchUid !== true || isRecommendationPanelAction) {
                            searchEvent = __assign({}, this.templateSearchEvent);
                            this.fillSearchEvent(searchEvent, searchInterface, args.query, queryResults, queryBoxContentToUse);
                            this.searchEvents.push(searchEvent);
                            this.results.push(queryResults);
                        }
                        return [3 /*break*/, 3];
                    case 2:
                        e_1 = _a.sent();
                        new Logger_1.Logger(this).error(e_1);
                        return [3 /*break*/, 3];
                    case 3:
                        index = underscore_1.indexOf(this.searchPromises, args.promise);
                        this.searchPromises.splice(index, 1);
                        if (!this.searchPromises.length) {
                            this.flush();
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    PendingSearchEvent.prototype.flush = function () {
        var _this = this;
        if (!this.cancelled) {
            this.stopRecording();
            this.finished = true;
            Assert_1.Assert.check(this.searchEvents.length == this.results.length);
            Defer_1.Defer.defer(function () {
                if (_this.sendToCloud) {
                    _this.endpoint.sendSearchEvents(_this.searchEvents);
                }
                var apiSearchEvents = underscore_1.map(_this.searchEvents, function (searchEvent) {
                    return APIAnalyticsBuilder_1.APIAnalyticsBuilder.convertSearchEventToAPI(searchEvent);
                });
                Dom_1.$$(_this.root).trigger(AnalyticsEvents_1.AnalyticsEvents.searchEvent, {
                    searchEvents: apiSearchEvents
                });
                if (_this.searchEvents.length) {
                    _this.searchEvents.forEach(function (searchEvent) {
                        Dom_1.$$(_this.root).trigger(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, {
                            event: 'CoveoSearchEvent',
                            coveoAnalyticsEventData: searchEvent
                        });
                    });
                }
            });
        }
    };
    PendingSearchEvent.prototype.fillSearchEvent = function (searchEvent, searchInterface, query, queryResults, queryBoxContentToUse) {
        Assert_1.Assert.exists(searchEvent);
        Assert_1.Assert.exists(searchInterface);
        Assert_1.Assert.exists(query);
        Assert_1.Assert.exists(queryResults);
        var currentQuery = searchInterface.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q);
        searchEvent.queryPipeline = queryResults.pipeline;
        searchEvent.splitTestRunName = searchEvent.splitTestRunName || queryResults.splitTestRun;
        searchEvent.splitTestRunVersion =
            searchEvent.splitTestRunVersion || (queryResults.splitTestRun != undefined ? queryResults.pipeline : undefined);
        searchEvent.originLevel2 = searchEvent.originLevel2 || searchInterface.queryStateModel.get('t') || 'default';
        searchEvent.queryText = queryBoxContentToUse || currentQuery || query.q || ''; // do not log the query sent to the server if possible; it may contain added syntax depending on options
        searchEvent.advancedQuery = query.aq || '';
        searchEvent.didYouMean = query.enableDidYouMean;
        searchEvent.numberOfResults = queryResults.totalCount;
        searchEvent.responseTime = queryResults.duration;
        searchEvent.pageNumber = query.firstResult / query.numberOfResults;
        searchEvent.resultsPerPage = query.numberOfResults;
        searchEvent.searchQueryUid = queryResults.searchUid;
        searchEvent.queryPipeline = queryResults.pipeline;
        searchEvent.facetState = this.facetState;
        // The context_${key} format is important for the Analytics backend
        // This is what they use to recognize a custom data that will be used internally by other coveo's service.
        // In this case, Coveo Machine Learning will be the consumer of this information.
        if (query.context != undefined) {
            underscore_1.each(query.context, function (value, key) { return (searchEvent.customData["context_" + key] = value); });
        }
        if (queryResults.refinedKeywords != undefined && queryResults.refinedKeywords.length != 0) {
            searchEvent.customData['refinedKeywords'] = queryResults.refinedKeywords;
        }
    };
    return PendingSearchEvent;
}());
exports.PendingSearchEvent = PendingSearchEvent;


/***/ }),
/* 118 */,
/* 119 */,
/* 120 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Options_1 = __webpack_require__(78);
var HighlightUtils_1 = __webpack_require__(69);
var StringUtils_1 = __webpack_require__(22);
var Utils_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(1);
var _ = __webpack_require__(0);
// \u2011: http://graphemica.com/%E2%80%91
// Used to split terms and phrases. Should match characters that can separate words.
var wordBoundary = "[\\.\\-\\u2011\\s~=,.\\|\\/:'`’;_()!?&+]";
var regexStart = '(' + wordBoundary + '|^)(';
var DefaultStreamHighlightOptions = /** @class */ (function (_super) {
    __extends(DefaultStreamHighlightOptions, _super);
    function DefaultStreamHighlightOptions(cssClass, shorten, regexFlags) {
        if (cssClass === void 0) { cssClass = 'coveo-highlight'; }
        if (shorten === void 0) { shorten = 0; }
        if (regexFlags === void 0) { regexFlags = 'gi'; }
        var _this = _super.call(this) || this;
        _this.cssClass = cssClass;
        _this.shorten = shorten;
        _this.regexFlags = regexFlags;
        return _this;
    }
    return DefaultStreamHighlightOptions;
}(Options_1.Options));
exports.DefaultStreamHighlightOptions = DefaultStreamHighlightOptions;
var StreamHighlightUtils = /** @class */ (function () {
    function StreamHighlightUtils() {
    }
    StreamHighlightUtils.highlightStreamHTML = function (stream, termsToHighlight, phrasesToHighlight, options) {
        var opts = new DefaultStreamHighlightOptions().merge(options);
        var container = createStreamHTMLContainer(stream);
        var allElements = Dom_1.$$(container).findAll('*');
        if (allElements.length > 0) {
            _.each(allElements, function (elem, i) {
                var text = Dom_1.$$(elem).text();
                elem.innerHTML = HighlightUtils_1.HighlightUtils.highlightString(text, getRestHighlightsForAllTerms(text, termsToHighlight, phrasesToHighlight, opts), [], opts.cssClass);
            });
        }
        else {
            return StreamHighlightUtils.highlightStreamText(stream, termsToHighlight, phrasesToHighlight, options);
        }
        return container.innerHTML;
    };
    StreamHighlightUtils.highlightStreamText = function (stream, termsToHighlight, phrasesToHighlight, options) {
        var opts = new DefaultStreamHighlightOptions().merge(options);
        return HighlightUtils_1.HighlightUtils.highlightString(stream, getRestHighlightsForAllTerms(stream, termsToHighlight, phrasesToHighlight, opts), [], opts.cssClass);
    };
    return StreamHighlightUtils;
}());
exports.StreamHighlightUtils = StreamHighlightUtils;
function getRestHighlightsForAllTerms(toHighlight, termsToHighlight, phrasesToHighlight, opts) {
    var indexes = [];
    var termsFromPhrases = _.chain(phrasesToHighlight).values().map(_.keys).flatten().value();
    _.each(termsToHighlight, function (terms, term) {
        var uniqueTermsToHighlight = _.chain([term])
            .concat(terms)
            .compact()
            .difference(termsFromPhrases)
            .map(Utils_1.Utils.escapeRegexCharacter)
            .sortBy('length')
            .value();
        if (uniqueTermsToHighlight.length === 0) {
            return;
        }
        var regex = "" + regexStart + uniqueTermsToHighlight.join('|') + ")(?=(?:" + wordBoundary + "|$)+)";
        var indexesFound = StringUtils_1.StringUtils.getHighlights(toHighlight, new RegExp(regex, opts.regexFlags), term);
        if (indexesFound != undefined && Utils_1.Utils.isNonEmptyArray(indexesFound)) {
            indexes.push(indexesFound);
        }
    });
    _.each(phrasesToHighlight, function (phrase, origPhrase) {
        var split = origPhrase.split(' ');
        var regex = regexStart;
        _.each(split, function (origWord, i) {
            regex += '(?:' + [origWord].concat(phrase[origWord]).join('|') + ')';
            if (i == split.length - 1) {
                regex += '(?=';
            }
            regex += wordBoundary;
            if (i == split.length - 1) {
                regex += '|$)';
            }
            if (i != split.length - 1) {
                regex += '+';
            }
        });
        regex += ')';
        var indexesFound = StringUtils_1.StringUtils.getHighlights(toHighlight, new RegExp(regex, opts.regexFlags), origPhrase);
        if (indexesFound != undefined && Utils_1.Utils.isNonEmptyArray(indexesFound)) {
            indexes.push(indexesFound);
        }
    });
    return _.chain(indexes)
        .flatten()
        .compact()
        .uniq(function (highlight) {
        return highlight.offset;
    })
        .sortBy(function (highlight) {
        return highlight.offset;
    })
        .map(function (highlight) {
        var keysFromTerms = _.keys(termsToHighlight);
        var keysFromPhrases = _.keys(phrasesToHighlight);
        var keys = keysFromTerms.concat(keysFromPhrases);
        var group = _.indexOf(keys, highlight.dataHighlightGroupTerm) + 1;
        return _.extend(highlight, { dataHighlightGroup: group });
    })
        .value();
}
exports.getRestHighlightsForAllTerms = getRestHighlightsForAllTerms;
function createStreamHTMLContainer(stream) {
    var container = Dom_1.$$('div').el;
    container.innerHTML = stream;
    return container;
}


/***/ }),
/* 121 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(4);
var Strings_1 = __webpack_require__(6);
var Assert_1 = __webpack_require__(5);
var underscore_1 = __webpack_require__(0);
// On-demand mapping of file types to captions. Used by facets, but I don't
// really like this. Maybe a dedicated filetype facet would be better? Hmm...
var fileTypeCaptions;
var FileTypes = /** @class */ (function () {
    function FileTypes() {
    }
    FileTypes.get = function (result) {
        var objecttype = Utils_1.Utils.getFieldValue(result, 'objecttype');
        var filetype = Utils_1.Utils.getFieldValue(result, 'filetype');
        // When @objecttype is File, Item, Document, or ContentVersion we fallback on @filetype for icons and such
        if (Utils_1.Utils.isNonEmptyString(objecttype) && !objecttype.match(/^(file|document|contentversion|item)$/i)) {
            return FileTypes.getObjectType(objecttype);
        }
        else if (Utils_1.Utils.isNonEmptyString(filetype)) {
            return FileTypes.getFileType(filetype);
        }
        else {
            return {
                // This will render a default icon. Really it should not happen.
                icon: 'coveo-icon filetype',
                caption: Strings_1.l('Unknown')
            };
        }
    };
    FileTypes.getObjectType = function (objecttype, fallbackOnLocalization) {
        if (fallbackOnLocalization === void 0) { fallbackOnLocalization = true; }
        // We must use lowercase filetypes because that's how the CSS classes
        // are generated (they are case sensitive, alas).
        var loweredCaseObjecttype = objecttype.toLowerCase();
        var variableValue = "objecttype_" + loweredCaseObjecttype;
        // Most object types have a set of localized strings in the main dictionary
        var localizedString = Strings_1.l(variableValue);
        // Some strings are sent as `objecttype_[...]` to specify a dictionary to use. If there's no match, try using
        // the main dictionary by using the original value.
        if (localizedString.toLowerCase() == variableValue.toLowerCase()) {
            localizedString = fallbackOnLocalization ? Strings_1.l(objecttype) : objecttype;
        }
        return this.safelyBuildFileTypeInfo('objecttype', loweredCaseObjecttype, localizedString);
    };
    FileTypes.getFileType = function (filetype, fallbackOnLocalization) {
        if (fallbackOnLocalization === void 0) { fallbackOnLocalization = true; }
        // We must use lowercase filetypes because that's how the CSS classes
        // are generated (they are case sensitive, alas).
        var loweredCaseFiletype = filetype.toLowerCase();
        // Sometimes, filetype begins with a period (typically means the index has
        // no idea and uses the file extension as a filetype).
        if (loweredCaseFiletype[0] == '.') {
            loweredCaseFiletype = loweredCaseFiletype.substring(1);
        }
        var variableValue = "filetype_" + loweredCaseFiletype;
        // Most filetypes have a set of localized strings in the main dictionary
        var localizedString = Strings_1.l(variableValue);
        if (localizedString.toLowerCase() == variableValue.toLowerCase()) {
            // Some strings are sent as `filetype_[...]` to specify a dictionary to use. If there's no match, try using
            // The main dictionary by using the original value.
            localizedString = fallbackOnLocalization ? Strings_1.l(filetype) : filetype;
        }
        return this.safelyBuildFileTypeInfo('filetype', loweredCaseFiletype, localizedString);
    };
    FileTypes.getFileTypeCaptions = function () {
        if (fileTypeCaptions == undefined) {
            fileTypeCaptions = {};
            var strings = String['locales'][String['locale'].toLowerCase()];
            Assert_1.Assert.isNotUndefined(strings);
            underscore_1.keys(strings).forEach(function (key) {
                if (key.indexOf('filetype_') == 0) {
                    fileTypeCaptions[key.substr('filetype_'.length)] = key.toLocaleString();
                }
                else if (key.indexOf('objecttype_') == 0) {
                    fileTypeCaptions[key.substr('objecttype_'.length)] = key.toLocaleString();
                }
            });
        }
        return fileTypeCaptions;
    };
    FileTypes.safelyBuildFileTypeInfo = function (fieldname, iconClass, caption) {
        return {
            icon: "coveo-icon " + fieldname + " " + underscore_1.escape(iconClass.replace(' ', '-')),
            caption: underscore_1.escape(caption)
        };
    };
    return FileTypes;
}());
exports.FileTypes = FileTypes;


/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var UnderscoreTemplate_1 = __webpack_require__(59);
var Utils_1 = __webpack_require__(4);
/**
 * Allow to register and return template helpers (essentially: Utility functions that can be executed in the context of a template to render complex elements).
 */
var TemplateHelpers = /** @class */ (function () {
    function TemplateHelpers() {
    }
    TemplateHelpers.registerFieldHelper = function (name, helper) {
        TemplateHelpers.fieldHelpers.push(name);
        TemplateHelpers.registerTemplateHelper(name, helper);
    };
    /**
     * Register a new helper in the framework, that will be available inside all templates execution context.
     * @param name
     * @param helper
     */
    TemplateHelpers.registerTemplateHelper = function (name, helper) {
        Assert_1.Assert.isNonEmptyString(name);
        Assert_1.Assert.exists(helper);
        TemplateHelpers.registerTemplateHelperInUnderscore(name, helper);
        TemplateHelpers.helpers[name] = helper;
    };
    /**
     * Return a template helper function
     * @param name
     * @returns {ITemplateHelperFunction}
     */
    TemplateHelpers.getHelper = function (name) {
        return Utils_1.Utils.getCaseInsensitiveProperty(TemplateHelpers.helpers, name);
    };
    /**
     * Get all available helpers
     */
    TemplateHelpers.getHelpers = function () {
        return TemplateHelpers.helpers;
    };
    TemplateHelpers.registerTemplateHelperInUnderscore = function (name, helper) {
        Assert_1.Assert.isNonEmptyString(name);
        Assert_1.Assert.exists(helper);
        UnderscoreTemplate_1.UnderscoreTemplate.registerTemplateHelper(name, helper);
    };
    TemplateHelpers.helpers = {};
    TemplateHelpers.fieldHelpers = [];
    return TemplateHelpers;
}());
exports.TemplateHelpers = TemplateHelpers;


/***/ }),
/* 123 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Template_1 = __webpack_require__(27);
var UnderscoreTemplate_1 = __webpack_require__(59);
var TemplateCache_1 = __webpack_require__(68);
var Assert_1 = __webpack_require__(5);
var Dom_1 = __webpack_require__(1);
var _ = __webpack_require__(0);
var Initialization_1 = __webpack_require__(2);
/*
 * This renders the appropriate result template, found in TemplateCache,
 * according to its condition.
 *
 * For example, a result with a filetype of `YoutubeVideo` will get rendered
 * with the `YoutubeVideo` template, because the latter is registered with a
 * `condition` of `raw.filetype == 'YoutubeVideo'`.
 */
var DefaultResultTemplate = /** @class */ (function (_super) {
    __extends(DefaultResultTemplate, _super);
    function DefaultResultTemplate() {
        var _this = _super.call(this) || this;
        // For default result template, register everything since it's not possible to "scan" them before they are rendered.
        _this.addFields(Initialization_1.Initialization.getRegisteredFieldsForQuery());
        return _this;
    }
    DefaultResultTemplate.prototype.instantiateToString = function (object, instantiateOptions) {
        if (instantiateOptions === void 0) { instantiateOptions = {}; }
        Assert_1.Assert.exists(object);
        var mergedOptions = new Template_1.DefaultInstantiateTemplateOptions().merge(instantiateOptions);
        object = _.extend({}, object, UnderscoreTemplate_1.UnderscoreTemplate.templateHelpers);
        var templates = _.chain(TemplateCache_1.TemplateCache.getDefaultTemplates())
            .map(function (name) { return TemplateCache_1.TemplateCache.getTemplate(name); })
            .value();
        // Put templates with conditions first
        var sortedTemplates = _.chain(templates)
            .sortBy(function (template) { return template.condition == null; })
            .sortBy(function (template) { return template.fieldsToMatch == null; })
            .value();
        for (var i = 0; i < sortedTemplates.length; i++) {
            var result = sortedTemplates[i].instantiateToString(object, mergedOptions);
            if (result != null) {
                return result;
            }
        }
        return this.getFallbackTemplate();
    };
    DefaultResultTemplate.prototype.getFields = function () {
        var defaultTemplates = _.map(TemplateCache_1.TemplateCache.getDefaultTemplates(), function (name) { return TemplateCache_1.TemplateCache.getTemplate(name); });
        return _.flatten(_.map(defaultTemplates, function (template) { return template.getFields(); }));
    };
    DefaultResultTemplate.prototype.getType = function () {
        return 'DefaultResultTemplate';
    };
    DefaultResultTemplate.prototype.getFallbackTemplate = function () {
        var titleContainer = Dom_1.$$('div', {
            className: 'coveo-title',
            role: 'heading',
            ariaLevel: 2
        });
        var resultLink = Dom_1.$$('a', { className: 'CoveoResultLink' });
        titleContainer.append(resultLink.el);
        var excerpt = Dom_1.$$('div', {
            className: 'CoveoExcerpt'
        });
        var resultContainer = Dom_1.$$('div');
        resultContainer.append(titleContainer.el);
        resultContainer.append(excerpt.el);
        return resultContainer.el.outerHTML;
    };
    return DefaultResultTemplate;
}(Template_1.Template));
exports.DefaultResultTemplate = DefaultResultTemplate;


/***/ }),
/* 124 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var EventsUtils_1 = __webpack_require__(138);
var _ = __webpack_require__(0);
var AccessibleButton_1 = __webpack_require__(15);
var KeyboardUtils_1 = __webpack_require__(25);
var InitializationEvents_1 = __webpack_require__(17);
var Assert_1 = __webpack_require__(5);
var Strings_1 = __webpack_require__(6);
var ResponsiveDropdownEvent;
(function (ResponsiveDropdownEvent) {
    ResponsiveDropdownEvent["OPEN"] = "responsiveDropdownOpen";
    ResponsiveDropdownEvent["CLOSE"] = "responsiveDropdownClose";
})(ResponsiveDropdownEvent = exports.ResponsiveDropdownEvent || (exports.ResponsiveDropdownEvent = {}));
var ResponsiveDropdown = /** @class */ (function () {
    function ResponsiveDropdown(dropdownContent, dropdownHeader, coveoRoot) {
        var _this = this;
        this.dropdownContent = dropdownContent;
        this.dropdownHeader = dropdownHeader;
        this.coveoRoot = coveoRoot;
        this.isOpened = false;
        this.onOpenHandlers = [];
        this.onCloseHandlers = [];
        this.popupBackgroundIsEnabled = true;
        this.scrollableContainerToLock = null;
        this.closeIfOpened = function () {
            _this.isOpened && _this.close();
        };
        Assert_1.Assert.exists(dropdownContent);
        Assert_1.Assert.exists(dropdownHeader);
        Assert_1.Assert.exists(coveoRoot);
        this.popupBackground = this.buildPopupBackground();
        this.bindOnClickDropdownHeaderEvent();
        this.saveContentPosition();
        this.bindOnKeyboardEscapeEvent();
        this.bindNukeEvents();
    }
    Object.defineProperty(ResponsiveDropdown.prototype, "scrollLocked", {
        set: function (lock) {
            if (!this.scrollableContainerToLock) {
                return;
            }
            this.scrollableContainerToLock.style.overflow = lock ? 'hidden' : '';
        },
        enumerable: true,
        configurable: true
    });
    ResponsiveDropdown.prototype.registerOnOpenHandler = function (handler, context) {
        Assert_1.Assert.exists(handler);
        this.onOpenHandlers.push({ handler: handler, context: context });
    };
    ResponsiveDropdown.prototype.registerOnCloseHandler = function (handler, context) {
        Assert_1.Assert.exists(handler);
        this.onCloseHandlers.push({ handler: handler, context: context });
    };
    ResponsiveDropdown.prototype.cleanUp = function () {
        this.close();
        this.dropdownHeader.cleanUp();
        this.dropdownContent.cleanUp();
        this.restoreContentPosition();
    };
    ResponsiveDropdown.prototype.open = function () {
        this.isOpened = true;
        this.dropdownHeader.open();
        this.dropdownContent.positionDropdown();
        _.each(this.onOpenHandlers, function (handlerCall) {
            handlerCall.handler.apply(handlerCall.context);
        });
        this.showPopupBackground();
        this.lockScroll();
        Dom_1.$$(this.dropdownHeader.element).trigger(ResponsiveDropdownEvent.OPEN);
    };
    ResponsiveDropdown.prototype.close = function () {
        this.isOpened = false;
        _.each(this.onCloseHandlers, function (handlerCall) {
            handlerCall.handler.apply(handlerCall.context);
        });
        this.dropdownHeader.close();
        this.dropdownContent.hideDropdown();
        this.hidePopupBackground();
        this.unlockScroll();
        Dom_1.$$(this.dropdownHeader.element).trigger(ResponsiveDropdownEvent.CLOSE);
    };
    ResponsiveDropdown.prototype.disablePopupBackground = function () {
        this.popupBackgroundIsEnabled = false;
    };
    ResponsiveDropdown.prototype.enableScrollLocking = function (scrollableContainer) {
        this.scrollableContainerToLock = scrollableContainer;
    };
    ResponsiveDropdown.prototype.bindOnClickDropdownHeaderEvent = function () {
        var _this = this;
        new AccessibleButton_1.AccessibleButton()
            .withElement(this.dropdownHeader.element)
            .withSelectAction(function () { return (_this.isOpened ? _this.close() : _this.open()); })
            .withLabel(Strings_1.l(this.isOpened ? 'CloseFiltersDropdown' : 'OpenFiltersDropdown'))
            .build();
    };
    ResponsiveDropdown.prototype.bindOnKeyboardEscapeEvent = function () {
        Dom_1.$$(document.documentElement).on('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ESCAPE, this.closeIfOpened));
    };
    ResponsiveDropdown.prototype.unbindOnKeyboardEscapeEvent = function () {
        Dom_1.$$(document.documentElement).off('keyup', KeyboardUtils_1.KeyboardUtils.keypressAction(KeyboardUtils_1.KEYBOARD.ESCAPE, this.closeIfOpened));
    };
    ResponsiveDropdown.prototype.bindNukeEvents = function () {
        var _this = this;
        Dom_1.$$(this.coveoRoot).on(InitializationEvents_1.InitializationEvents.nuke, function () {
            _this.unbindOnKeyboardEscapeEvent();
        });
    };
    ResponsiveDropdown.prototype.showPopupBackground = function () {
        if (this.popupBackgroundIsEnabled) {
            this.coveoRoot.el.appendChild(this.popupBackground.el);
            window.getComputedStyle(this.popupBackground.el).opacity;
            this.popupBackground.el.style.opacity = ResponsiveDropdown.TRANSPARENT_BACKGROUND_OPACITY;
            this.popupBackground.addClass(ResponsiveDropdown.DROPDOWN_BACKGROUND_ACTIVE_CSS_CLASS_NAME);
        }
    };
    ResponsiveDropdown.prototype.lockScroll = function () {
        this.scrollLocked = true;
    };
    ResponsiveDropdown.prototype.unlockScroll = function () {
        this.scrollLocked = false;
    };
    ResponsiveDropdown.prototype.hidePopupBackground = function () {
        if (this.popupBackgroundIsEnabled) {
            // forces the browser to reflow the element, so that the transition is applied.
            window.getComputedStyle(this.popupBackground.el).opacity;
            this.popupBackground.el.style.opacity = '0';
            this.popupBackground.removeClass(ResponsiveDropdown.DROPDOWN_BACKGROUND_ACTIVE_CSS_CLASS_NAME);
        }
    };
    ResponsiveDropdown.prototype.buildPopupBackground = function () {
        var _this = this;
        var popupBackground = Dom_1.$$('div', { className: ResponsiveDropdown.DROPDOWN_BACKGROUND_CSS_CLASS_NAME });
        EventsUtils_1.EventsUtils.addPrefixedEvent(popupBackground.el, 'TransitionEnd', function () {
            if (popupBackground.el.style.opacity == '0') {
                popupBackground.detach();
            }
        });
        popupBackground.on('click', function () { return _this.close(); });
        return popupBackground;
    };
    ResponsiveDropdown.prototype.saveContentPosition = function () {
        var dropdownContentPreviousSibling = this.dropdownContent.element.el.previousSibling;
        var dropdownContentParent = this.dropdownContent.element.el.parentElement;
        this.previousSibling = dropdownContentPreviousSibling ? Dom_1.$$(dropdownContentPreviousSibling) : null;
        this.parent = Dom_1.$$(dropdownContentParent);
    };
    ResponsiveDropdown.prototype.restoreContentPosition = function () {
        if (this.previousSibling) {
            this.dropdownContent.element.insertAfter(this.previousSibling.el);
        }
        else {
            this.parent.prepend(this.dropdownContent.element.el);
        }
    };
    ResponsiveDropdown.TRANSPARENT_BACKGROUND_OPACITY = '0.9';
    ResponsiveDropdown.DROPDOWN_BACKGROUND_CSS_CLASS_NAME = 'coveo-dropdown-background';
    ResponsiveDropdown.DROPDOWN_BACKGROUND_ACTIVE_CSS_CLASS_NAME = 'coveo-dropdown-background-active';
    return ResponsiveDropdown;
}());
exports.ResponsiveDropdown = ResponsiveDropdown;


/***/ }),
/* 125 */,
/* 126 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsActionListMeta_1 = __webpack_require__(10);
function logSearchBoxSubmitEvent(client) {
    client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit, {});
}
exports.logSearchBoxSubmitEvent = logSearchBoxSubmitEvent;
function logSortEvent(client, resultsSortBy) {
    client.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.resultsSort, {
        resultsSortBy: resultsSortBy
    });
}
exports.logSortEvent = logSortEvent;


/***/ }),
/* 127 */,
/* 128 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var PendingSearchEvent_1 = __webpack_require__(117);
var Dom_1 = __webpack_require__(1);
var InitializationEvents_1 = __webpack_require__(17);
var SearchInterface_1 = __webpack_require__(19);
var Component_1 = __webpack_require__(7);
var QueryStateModel_1 = __webpack_require__(13);
var _ = __webpack_require__(0);
var PendingSearchAsYouTypeSearchEvent = /** @class */ (function (_super) {
    __extends(PendingSearchAsYouTypeSearchEvent, _super);
    function PendingSearchAsYouTypeSearchEvent(root, endpoint, templateSearchEvent, sendToCloud) {
        var _this = _super.call(this, root, endpoint, templateSearchEvent, sendToCloud) || this;
        _this.root = root;
        _this.endpoint = endpoint;
        _this.templateSearchEvent = templateSearchEvent;
        _this.sendToCloud = sendToCloud;
        _this.delayBeforeSending = 5000;
        _this.queryContent = '';
        _this.beforeUnloadHandler = function () {
            _this.onWindowUnload();
        };
        window.addEventListener('beforeunload', _this.beforeUnloadHandler);
        Dom_1.$$(root).on(InitializationEvents_1.InitializationEvents.nuke, function () { return _this.handleNuke(); });
        return _this;
    }
    PendingSearchAsYouTypeSearchEvent.prototype.handleDuringQuery = function (e, args) {
        var _this = this;
        var event = _.clone(e);
        // We need to "snapshot" the current query before the delay is applied
        // Otherwise, this means that after 5 second, the original query is possibly modified
        // For example, DidYouMean would be wrong in that case.
        var eventTarget = e.target;
        var searchInterface = Component_1.Component.get(eventTarget, SearchInterface_1.SearchInterface);
        this.modifyQueryContent(searchInterface.queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.q));
        this.beforeResolve = new Promise(function (resolve) {
            _this.toSendRightNow = function () {
                if (!_this.isCancelledOrFinished()) {
                    resolve(_this);
                    _super.prototype.handleDuringQuery.call(_this, event, args, _this.queryContent);
                }
            };
            _.delay(function () {
                _this.toSendRightNow();
            }, _this.delayBeforeSending);
        });
    };
    PendingSearchAsYouTypeSearchEvent.prototype.sendRightNow = function () {
        if (this.toSendRightNow) {
            this.toSendRightNow();
        }
    };
    PendingSearchAsYouTypeSearchEvent.prototype.modifyCustomData = function (key, newData) {
        _.each(this.searchEvents, function (searchEvent) {
            searchEvent.customData[key] = newData;
        });
        if (!this.templateSearchEvent.customData) {
            this.templateSearchEvent.customData = {};
        }
        this.templateSearchEvent.customData[key] = newData;
    };
    PendingSearchAsYouTypeSearchEvent.prototype.modifyEventCause = function (newCause) {
        _.each(this.searchEvents, function (searchEvent) {
            searchEvent.actionCause = newCause.name;
            searchEvent.actionType = newCause.type;
        });
        this.templateSearchEvent.actionCause = newCause.name;
        this.templateSearchEvent.actionType = newCause.type;
    };
    PendingSearchAsYouTypeSearchEvent.prototype.modifyQueryContent = function (query) {
        this.queryContent = query;
    };
    PendingSearchAsYouTypeSearchEvent.prototype.stopRecording = function () {
        _super.prototype.stopRecording.call(this);
        if (this.beforeUnloadHandler) {
            window.removeEventListener('beforeunload', this.beforeUnloadHandler);
            this.beforeUnloadHandler = undefined;
        }
    };
    PendingSearchAsYouTypeSearchEvent.prototype.handleNuke = function () {
        window.removeEventListener('beforeunload', this.beforeUnloadHandler);
    };
    PendingSearchAsYouTypeSearchEvent.prototype.onWindowUnload = function () {
        if (!this.isCancelledOrFinished()) {
            this.sendRightNow();
        }
    };
    PendingSearchAsYouTypeSearchEvent.prototype.isCancelledOrFinished = function () {
        if (!this.cancelled) {
            if (this.finished) {
                this.cancel();
                return true;
            }
            else {
                return false;
            }
        }
        else {
            return true;
        }
    };
    return PendingSearchAsYouTypeSearchEvent;
}(PendingSearchEvent_1.PendingSearchEvent));
exports.PendingSearchAsYouTypeSearchEvent = PendingSearchAsYouTypeSearchEvent;


/***/ }),
/* 129 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(4);
var Core_1 = __webpack_require__(20);
var underscore_1 = __webpack_require__(0);
/**
 * Set of utilities to determine where to load the lazy chunks from.
 * You should add the `coveo-script` class on the script tag that includes the Coveo framework to make sure the framework can always
 * auto-detect the path to load the lazy chunks from. More details [here]{@link https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues}
 */
var PublicPathUtils = /** @class */ (function () {
    function PublicPathUtils() {
    }
    // Dynamically set the public path to load the chunks relative to the Coveo script
    // Fallback on last parsed script if document.currentScript is not available.
    PublicPathUtils.detectPublicPath = function () {
        if (!this.pathHasBeenConfigured) {
            __webpack_require__.p = PublicPathUtils.getDynamicPublicPath();
        }
    };
    /**
     * Helper function to resolve the public path used to load the chunks relative to the Coveo script.
     * You should add the `coveo-script` class on the script tag that includes the Coveo framework
     * to make sure the framework can always auto-detect the path to load the lazy chunks from.
     * More details [here]{@link https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues}
     */
    PublicPathUtils.getDynamicPublicPath = function () {
        var currentScript = this.getCurrentScript();
        var coveoScript = this.getCoveoScript();
        if (!this.isScript(coveoScript)) {
            new Core_1.Logger(this)
                .warn("You should add the class coveo-script on the script tag that includes the Coveo framework. Not doing so may cause the framework to not be able to auto-detect the path to load the lazy chunks in certain environments.\n        More details [here](https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues).");
        }
        if (!Utils_1.Utils.isNullOrUndefined(currentScript)) {
            return this.parseScriptDirectoryPath(currentScript);
        }
        else if (this.isScript(coveoScript)) {
            return this.parseScriptDirectoryPath(coveoScript);
        }
        else {
            var scripts = document.getElementsByTagName('script');
            if (scripts.length === 0) {
                return '/';
            }
            return this.parseScriptDirectoryPath(scripts[scripts.length - 1]);
        }
    };
    /**
     * @deprecated Instead of using this method, you should add the `coveo-script` class on the script tag that includes the Coveo framework.
     * @param path
     */
    PublicPathUtils.configureResourceRoot = function (path) {
        this.pathHasBeenConfigured = true;
        __webpack_require__.p = path;
    };
    PublicPathUtils.reset = function () {
        this.pathHasBeenConfigured = false;
    };
    PublicPathUtils.getCurrentScript = function () {
        return document.currentScript;
    };
    PublicPathUtils.getCoveoScript = function () {
        var _this = this;
        return underscore_1.find(document.querySelectorAll('.coveo-script'), function (el) { return _this.isScript(el); });
    };
    PublicPathUtils.parseScriptDirectoryPath = function (script) {
        return script.src.replace(/\/[\w\.-]*\.js((#|\?)(.*)){0,1}$/, '/');
    };
    PublicPathUtils.isScript = function (el) {
        return el && Core_1.$$(el).is('script');
    };
    PublicPathUtils.pathHasBeenConfigured = false;
    return PublicPathUtils;
}());
exports.PublicPathUtils = PublicPathUtils;


/***/ }),
/* 130 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(7);
var ComponentOptions_1 = __webpack_require__(8);
var AnalyticsEndpoint_1 = __webpack_require__(154);
var SearchEndpoint_1 = __webpack_require__(53);
var Assert_1 = __webpack_require__(5);
var QueryEvents_1 = __webpack_require__(11);
var ComponentOptionsModel_1 = __webpack_require__(28);
var Dom_1 = __webpack_require__(1);
var Model_1 = __webpack_require__(18);
var Utils_1 = __webpack_require__(4);
var NoopAnalyticsClient_1 = __webpack_require__(107);
var LiveAnalyticsClient_1 = __webpack_require__(171);
var MultiAnalyticsClient_1 = __webpack_require__(456);
var AnalyticsActionListMeta_1 = __webpack_require__(10);
var RecommendationAnalyticsClient_1 = __webpack_require__(210);
var _ = __webpack_require__(0);
var GlobalExports_1 = __webpack_require__(3);
var PendingSearchEvent_1 = __webpack_require__(117);
var PendingSearchAsYouTypeSearchEvent_1 = __webpack_require__(128);
var AccessToken_1 = __webpack_require__(149);
var AnalyticsEvents_1 = __webpack_require__(58);
var QueryUtils_1 = __webpack_require__(21);
var AnalyticsInformation_1 = __webpack_require__(50);
var InitializationEvents_1 = __webpack_require__(17);
/**
 * The `Analytics` component can log user actions performed in the search interface and send them to a REST web service
 * exposed through the Coveo Cloud Platform.
 *
 * You can use analytics data to evaluate how users are interacting with your search interface, improve relevance and
 * produce analytics dashboards within the Coveo Cloud Platform.
 *
 * See [JavaScript Search Framework Usage Analytics](https://docs.coveo.com/en/365) for an introduction.
 *
 * See also [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events) for more advanced use cases.
 */
var Analytics = /** @class */ (function (_super) {
    __extends(Analytics, _super);
    /**
     * Creates a new `Analytics` component. Creates the [`AnalyticsClient`]{@link IAnalyticsClient}.
     * @param element The HTMLElement on which the component will be instantiated.
     * @param options The options for the `Analytics` component.
     * @param bindings The bindings that the component requires to function normally. If not set, these will be
     * automatically resolved (with a slower execution time).
     */
    function Analytics(element, options, bindings) {
        if (options === void 0) { options = {}; }
        var _this = _super.call(this, element, Analytics.ID, bindings) || this;
        _this.element = element;
        _this.options = options;
        _this.bindings = bindings;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Analytics, options);
        _this.setupAccessToken();
        if (_this.accessToken == null) {
            _this.logger.error("Analytics component could not resolve any access token");
            _this.logger.error("Either provide a analytics token : data-option-token=\"an-authentication-token\" on the Analytics element, or configure a default SearchEndpoint", _this.element);
            return _this;
        }
        else {
            _this.options.token = _this.accessToken.token;
            _this.accessToken.subscribeToRenewal(function (newToken) {
                _this.options.token = newToken;
                _this.client.endpoint.endpointCaller.options.accessToken = newToken;
            });
        }
        _this.initializeAnalyticsClient();
        Assert_1.Assert.exists(_this.client);
        Dom_1.$$(_this.root).on(QueryEvents_1.QueryEvents.buildingQuery, function (e, data) { return _this.handleBuildingQuery(data); });
        _this.bind.onRootElement(QueryEvents_1.QueryEvents.queryError, function (data) { return _this.handleQueryError(data); });
        _this.bind.onRootElement(InitializationEvents_1.InitializationEvents.afterComponentsInitialization, function () { return _this.handleDoNotTrack(); });
        if (_this.options.autoPushToGtmDataLayer && _this.isGtmDataLayerInitialized) {
            _this.bind.onRootElement(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, function (data) { return _this.pushToGtmDataLayer(data); });
        }
        // Analytics component is a bit special: It can be higher in the dom tree than the search interface
        // Need to resolve down to find the componentOptionsModel if we need to.
        if (!_this.componentOptionsModel) {
            var cmpOptionElement = Dom_1.$$(element).find('.' + Component_1.Component.computeCssClassName(ComponentOptionsModel_1.ComponentOptionsModel));
            if (cmpOptionElement) {
                _this.componentOptionsModel = cmpOptionElement[Component_1.Component.computeCssClassName(ComponentOptionsModel_1.ComponentOptionsModel)];
            }
        }
        if (_this.componentOptionsModel) {
            _this.componentOptionsModel.set(ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.searchHub, _this.options.searchHub);
            var event_1 = _this.componentOptionsModel.getEventName(Model_1.Model.eventTypes.changeOne + ComponentOptionsModel_1.ComponentOptionsModel.attributesEnum.searchHub);
            Dom_1.$$(_this.root).on(event_1, function (e, args) { return _this.handleSearchHubChanged(args); });
        }
        _this.createClientId();
        return _this;
    }
    Analytics.doExport = function () {
        GlobalExports_1.exportGlobally({
            PendingSearchEvent: PendingSearchEvent_1.PendingSearchEvent,
            PendingSearchAsYouTypeSearchEvent: PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent,
            analyticsActionCauseList: AnalyticsActionListMeta_1.analyticsActionCauseList,
            NoopAnalyticsClient: NoopAnalyticsClient_1.NoopAnalyticsClient,
            LiveAnalyticsClient: LiveAnalyticsClient_1.LiveAnalyticsClient,
            MultiAnalyticsClient: MultiAnalyticsClient_1.MultiAnalyticsClient,
            Analytics: Analytics
        });
    };
    /**
     * Logs a `Search` usage analytics event.
     *
     * A `Search` event is actually sent to the Coveo Usage Analytics service only after the query successfully returns
     * (not immediately after calling this method). Therefore, it is important to call this method **before** executing
     * the query. Otherwise, the `Search` event will not be logged, and you will get a warning message in the console.
     *
     * **Note:**
     *
     * > When logging custom `Search` events, you should use the `Coveo.logSearchEvent` top-level function rather than
     * > calling this method directly from the `Analytics` component instance. See
     * > [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events).
     *
     * @param actionCause The cause of the event.
     * @param meta The metadata you want to use to create custom dimensions. Metadata can contain as many key-value
     * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
     * service automatically converts white spaces to underscores, and uppercase characters to lowercase characters in key
     * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
     * ( `{}` ).
     */
    Analytics.prototype.logSearchEvent = function (actionCause, meta) {
        this.client.logSearchEvent(actionCause, meta);
    };
    /**
     * Logs a `SearchAsYouType` usage analytics event.
     *
     * This method is very similar to the [`logSearchEvent`]{@link Analytics.logSearchEvent} method, except that
     * `logSearchAsYouType` should, by definition, be called more frequently. Consequently, in order to avoid logging
     * every single partial query, the `PendingSearchAsYouTypeEvent` takes care of logging only the "relevant" last event:
     * an event that occurs after 5 seconds have elapsed without any event being logged, or an event that occurs after
     * another part of the interface triggers a search event.
     *
     * It is important to call this method **before** executing the query. Otherwise, no `SearchAsYouType` event will be
     * logged, and you will get a warning message in the console.
     *
     * **Note:**
     *
     * > When logging custom `SearchAsYouType` events, you should use the `Coveo.logSearchAsYouTypeEvent` top-level
     * > function rather than calling this method directly from the `Analytics` component instance. See
     * > [Logging Your Own Search Events](https://docs.coveo.com/en/2726/#logging-your-own-search-events).
     *
     * @param actionCause The cause of the event.
     * @param meta The metadata which you want to use to create custom dimensions. Metadata can contain as many key-value
     * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
     * service automatically converts white spaces to underscores and uppercase characters to lowercase characters in key
     * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
     * ( `{}` ).
     */
    Analytics.prototype.logSearchAsYouType = function (actionCause, meta) {
        this.client.logSearchAsYouType(actionCause, meta);
    };
    /**
     * Logs a `Custom` usage analytics event on the service.
     *
     * You can use `Custom` events to create custom reports, or to track events which are neither queries (see
     * [`logSearchEvent`]{@link Analytics.logSearchEvent} and
     * [`logSearchAsYouType`]{@link Analytics.logSearchAsYouType}), nor item views (see
     * [`logClickEvent`]{@link Analytics.logClickEvent}).
     *
     * **Note:**
     * > When logging `Custom` events, you should use the `Coveo.logClickEvent` top-level function rather than calling
     * > this method directly from the `Analytics` component instance. See
     * > [Logging Your Own Custom Events](https://docs.coveo.com/en/2726/#logging-your-own-custom-events).
     *
     * @param actionCause The cause of the event.
     * @param meta The metadata which you want to use to create custom dimensions. Metadata can contain as many key-value
     * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
     * service automatically converts white spaces to underscores and uppercase characters to lowercase characters in key
     * names. Each value must be a simple string. If you do not need to log metadata, you can simply pass an empty JSON
     * ( `{}` ).
     * @param element The HTMLElement that the user has interacted with for this custom event. Default value is the
     * element on which the `Analytics` component is bound.
     * @param result The IQueryResult that the custom event is linked to, if any.
     */
    Analytics.prototype.logCustomEvent = function (actionCause, meta, element, result) {
        if (element === void 0) { element = this.element; }
        this.client.logCustomEvent(actionCause, meta, element, result);
    };
    /**
     * Logs a `Click` usage analytics event.
     *
     * A `Click` event corresponds to an item view (e.g., clicking on a {@link ResultLink} or opening a
     * {@link Quickview}).
     *
     * `Click` events are immediately sent to the Coveo Usage Analytics service.
     *
     * **Note:**
     * > When logging custom `Click` events, you should use the `Coveo.logClickEvent` top-level function rather than
     * > calling this method directly from the `Analytics` component instance. See
     * > [Logging Your Own Click Events](https://docs.coveo.com/en/2726/#logging-your-own-click-events).
     *
     * @param actionCause The cause of the event.
     * @param meta The metadata which you want to use to create custom dimensions. Metadata can contain as many key-value
     * pairs as you need. Each key must contain only alphanumeric characters and underscores. The Coveo Usage Analytics
     * service automatically converts uppercase characters to lowercase characters in key names. Each value must be a
     * simple string. You do not have to pass an {@link IAnalyticsDocumentViewMeta} as meta when logging a `Click` event.
     * You can actually send any arbitrary meta. If you do not need to log metadata, you can simply pass an empty JSON
     * ( `{}` ).
     * @param result The result that was clicked.
     * @param element The HTMLElement that the user has clicked in the interface. Default value is the element on which
     * the `Analytics` component is bound.
     */
    Analytics.prototype.logClickEvent = function (actionCause, meta, result, element) {
        if (element === void 0) { element = this.element; }
        this.client.logClickEvent(actionCause, meta, result, element);
    };
    /**
     * Sets the Origin Context dimension on the analytic events.
     *
     * You can use this dimension to specify the context of your application.
     * Suggested values are "Search", "InternalSearch" and "CommunitySearch"
     *
     * Default value is `Search`.
     *
     * @param originContext The origin context value
     */
    Analytics.prototype.setOriginContext = function (originContext) {
        this.client.setOriginContext(originContext);
    };
    /**
     * Get the Origin Context dimension on the analytic events.
     *
     */
    Analytics.prototype.getOriginContext = function () {
        return this.client.getOriginContext();
    };
    /**
     * Get the Origin Context dimension on the analytic events.
     *
     */
    Analytics.prototype.getUserDisplayName = function () {
        return this.client.getUserDisplayName();
    };
    /**
     * Re-enables the component if it was previously disabled.
     */
    Analytics.prototype.enable = function () {
        if (!this.disabled) {
            return this.logger.warn('The Analytics component is already enabled.');
        }
        _super.prototype.enable.call(this);
        this.initializeAnalyticsClient();
        this.updateSearchInterfaceUAClient();
        this.resolveQueryController().enableHistory();
    };
    /**
     * Removes all session information stored in the browser (e.g., analytics visitor cookies, action history, etc.)
     *
     * @availablesince [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/)
     */
    Analytics.prototype.clearLocalData = function () {
        if (this.disabled || this.client instanceof NoopAnalyticsClient_1.NoopAnalyticsClient) {
            return this.logger.warn('Could not clear local data while analytics are disabled.');
        }
        new AnalyticsInformation_1.AnalyticsInformation().clear();
        this.resolveQueryController().resetHistory();
    };
    /**
     * Disables the component and clears local data by running [`clearLocalData`]{@link Analytics.clearLocalData}.
     */
    Analytics.prototype.disable = function () {
        if (this.disabled) {
            return this.logger.warn('The Analytics component is already disabled.');
        }
        this.clearLocalData();
        this.client.cancelAllPendingEvents();
        this.client = new NoopAnalyticsClient_1.NoopAnalyticsClient();
        this.updateSearchInterfaceUAClient();
        this.resolveQueryController().disableHistory();
        _super.prototype.disable.call(this);
    };
    Analytics.prototype.updateSearchInterfaceUAClient = function () {
        this.searchInterface.usageAnalytics = this.client;
    };
    /**
     * Attempts to push data representing a single Coveo usage analytics event to the Google Tag Manager data layer.
     *
     * **Note:**
     * If the [`autoPushToGtmDataLayer`]{@link Analytics.options.autoPushToGtmDataLayer} option is set to `true` and the GTM data layer has been properly initialized in the page, this method is called automatically whenever an event is about to be logged to the Coveo Cloud usage analytics service.
     *
     * See also the [`gtmDataLayerName`]{@link Analytics.options.gtmDataLayerName} option.
     *
     * @param data The data to push.
     */
    Analytics.prototype.pushToGtmDataLayer = function (data) {
        var dataLayerName = this.options.gtmDataLayerName;
        try {
            window[dataLayerName].push(data);
        }
        catch (error) {
            this.logger.error("Unexpected error when pushing to Google Tag Manager data layer '" + dataLayerName + "': '" + error + "'.");
        }
    };
    Analytics.prototype.initializeAnalyticsEndpoint = function () {
        return new AnalyticsEndpoint_1.AnalyticsEndpoint({
            accessToken: this.accessToken,
            serviceUrl: this.options.endpoint,
            organization: this.options.organization
        });
    };
    Analytics.prototype.createClientId = function () {
        var info = new AnalyticsInformation_1.AnalyticsInformation();
        if (!info.clientId) {
            info.clientId = QueryUtils_1.QueryUtils.createGuid();
        }
    };
    Analytics.prototype.initializeAnalyticsClient = function () {
        if (Utils_1.Utils.isNonEmptyString(this.options.endpoint)) {
            var endpoint = this.initializeAnalyticsEndpoint();
            var elementToInitializeClient = void 0;
            if (this.root && this.element) {
                if (this.root.contains(this.element)) {
                    elementToInitializeClient = this.root;
                }
                else {
                    elementToInitializeClient = this.element;
                }
            }
            var isRecommendation = Dom_1.$$(this.root).hasClass(Component_1.Component.computeCssClassNameForType("Recommendation"));
            this.instantiateAnalyticsClient(endpoint, elementToInitializeClient, isRecommendation);
        }
        else {
            this.client = new NoopAnalyticsClient_1.NoopAnalyticsClient();
        }
    };
    Analytics.prototype.instantiateAnalyticsClient = function (endpoint, elementToInitializeClient, isRecommendation) {
        if (isRecommendation) {
            this.client = new RecommendationAnalyticsClient_1.RecommendationAnalyticsClient(endpoint, elementToInitializeClient, this.options.user, this.options.userDisplayName, this.options.anonymous, this.options.splitTestRunName, this.options.splitTestRunVersion, this.options.searchHub, this.options.sendToCloud, this.getBindings());
        }
        else {
            this.client = new LiveAnalyticsClient_1.LiveAnalyticsClient(endpoint, elementToInitializeClient, this.options.user, this.options.userDisplayName, this.options.anonymous, this.options.splitTestRunName, this.options.splitTestRunVersion, this.options.searchHub, this.options.sendToCloud, this.getBindings());
        }
    };
    Analytics.prototype.setupAccessToken = function () {
        this.trySetupAccessTokenFromOptions();
        if (this.accessToken == null) {
            this.trySetupAccessTokenFromDefaultSearchEndpoint();
        }
    };
    Analytics.prototype.trySetupAccessTokenFromOptions = function () {
        if (this.options.token != null) {
            this.accessToken = new AccessToken_1.AccessToken(this.options.token, this.options.renewAccessToken);
        }
    };
    Analytics.prototype.trySetupAccessTokenFromDefaultSearchEndpoint = function () {
        if (this.defaultEndpoint) {
            this.accessToken = this.defaultEndpoint.accessToken;
            this.options.token = this.defaultEndpoint.accessToken.token;
        }
        if (!this.options.organization && this.defaultEndpoint) {
            this.options.organization = this.defaultEndpoint.options.queryStringArguments['organizationId'];
        }
    };
    Object.defineProperty(Analytics.prototype, "defaultEndpoint", {
        get: function () {
            return this.searchInterface.options.endpoint || SearchEndpoint_1.SearchEndpoint.defaultEndpoint;
        },
        enumerable: true,
        configurable: true
    });
    Analytics.prototype.handleBuildingQuery = function (data) {
        Assert_1.Assert.exists(data);
        data.queryBuilder.searchHub = this.options.searchHub;
    };
    Analytics.prototype.handleSearchHubChanged = function (data) {
        this.options.searchHub = data.value;
    };
    Analytics.prototype.handleQueryError = function (data) {
        Assert_1.Assert.exists(data);
        this.client.logCustomEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.queryError, {
            query: data.query.q,
            aq: data.query.aq,
            cq: data.query.cq,
            dq: data.query.dq,
            errorType: data.error.type,
            errorMessage: data.error.message
        }, this.element);
    };
    Object.defineProperty(Analytics.prototype, "isGtmDataLayerInitialized", {
        get: function () {
            var dataLayerName = this.options.gtmDataLayerName;
            if (!dataLayerName) {
                return false;
            }
            if (!window[dataLayerName]) {
                this.logger.warn("Cannot automatically push to Google Tag Manager data layer: '" + dataLayerName + "' is undefined.");
                return false;
            }
            return true;
        },
        enumerable: true,
        configurable: true
    });
    Analytics.create = function (element, options, bindings) {
        var selector = Component_1.Component.computeSelectorForType(Analytics.ID);
        var found = [];
        found = found.concat(Dom_1.$$(element).findAll(selector));
        if (!Dom_1.$$(element).hasClass(Component_1.Component.computeCssClassNameForType('Recommendation'))) {
            found = this.ignoreElementsInsideRecommendationInterface(found);
        }
        found.push(Dom_1.$$(element).closest(Component_1.Component.computeCssClassName(Analytics)));
        if (Dom_1.$$(element).is(selector)) {
            found.push(element);
        }
        found = _.compact(found);
        if (found.length == 1) {
            return Analytics.getClient(found[0], options, bindings);
        }
        else if (found.length > 1) {
            return new MultiAnalyticsClient_1.MultiAnalyticsClient(_.map(found, function (el) { return Analytics.getClient(el, options, bindings); }));
        }
        else {
            return new NoopAnalyticsClient_1.NoopAnalyticsClient();
        }
    };
    Analytics.ignoreElementsInsideRecommendationInterface = function (found) {
        return _.filter(found, function (element) {
            return Dom_1.$$(element).closest(Component_1.Component.computeCssClassNameForType('Recommendation')) === undefined;
        });
    };
    Analytics.getClient = function (element, options, bindings) {
        // This check if an element is already initialized as an analytics component.
        // If that's the case, return the client on that element.
        // Otherwise, init and return.
        var foundOnElement = Component_1.Component.get(element, Analytics, true);
        if (foundOnElement instanceof Analytics) {
            return foundOnElement.client;
        }
        else {
            return new Analytics(element, options, bindings).client;
        }
    };
    Analytics.prototype.handleDoNotTrack = function () {
        if (this.doNotTrack()) {
            this.logger.warn('Coveo Analytics tracking disabled due to doNotTrack');
            this.disable();
        }
    };
    Analytics.prototype.doNotTrack = function () {
        var doNotTrack = [true, 'yes', '1', 1].indexOf(navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack);
        var globalPrivacyControl = navigator.globalPrivacyControl;
        return doNotTrack !== -1 || globalPrivacyControl;
    };
    Analytics.ID = 'Analytics';
    // NOTE: The default values for some of those options (`organization`, `endpoint`, `searchHub`) can be
    // overridden by generated code when using hosted search pages.
    /**
     * Options for the component
     * @componentOptions
     */
    Analytics.options = {
        /**
         * Specifies the name of the user for the usage analytics logs.
         *
         * Default value is `undefined`
         */
        user: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the user display name for the usage analytics logs.
         *
         * Default value is `undefined`
         */
        userDisplayName: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the token to use to access the usage analytics endpoint.
         *
         * Default value is `undefined`, and the component uses the search token.
         */
        token: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the URL of the Usage Analytics service. You do not have to specify a value for this option, unless
         * the location of the service you use differs from the default Coveo Cloud Usage Analytics endpoint.
         *
         * By default, the value is `https://analytics.cloud.coveo.com/rest/ua`, or
         * `https://analytics-<REGION_ABBREVIATION>.cloud.coveo.com/rest/ua` if you have
         * [configured your search endpoint]{@link SearchEndpoint.configureCloudV2Endpoint} to implement
         * data residency outside of the United States.
         */
        endpoint: ComponentOptions_1.ComponentOptions.buildStringOption({
            postProcessing: function (value) {
                if (!value) {
                    return AnalyticsEndpoint_1.AnalyticsEndpoint.getURLFromSearchEndpoint(SearchEndpoint_1.SearchEndpoint.defaultEndpoint);
                }
                var isLegacy = value.indexOf('usageanalytics') !== -1;
                if (isLegacy) {
                    var basePlatform = value.split('/rest')[0];
                    return basePlatform + '/rest';
                }
                return value;
            }
        }),
        /**
         * Specifies whether to convert search user identities to unique hash when logging analytics data, so that
         * analytics reviewers and managers will not be able to clearly identify which user is performing which query.
         *
         * When you set this option to `true`, the Coveo Usage Analytics service can still properly differentiate sessions
         * made by anonymous users from sessions made by users authenticated in some way on the site containing the search
         * page.
         *
         * Default value is `false`.
         */
        anonymous: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * Sets the Search Hub dimension on the search events.
         *
         * The Search Hub dimension is typically a name that refers to a specific search page. For example, you could use
         * the `CommunitySite` value to refer to a search page on a public community site.
         *
         * **Note:**
         * > If you wish to use the search hub dimension for security reasons (e.g., to provide different query suggestions
         * > for internal and external users), you should specify the search hub when generating the search token for the
         * > end user (in safe, server-side code), rather than setting it with this option (see
         * > [Search Token Authentication](https://docs.coveo.com/en/56/)).
         *
         * Default value is `default`.
         */
        searchHub: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'default' }),
        /**
         * Specifies the name of the split test run that the search page is part of.
         *
         * You can use this dimension to perform A/B testing using different search page layouts and features inside the
         * Coveo Query pipeline.
         *
         * Default value is `undefined` and no split test run name is reported to the Coveo Usage Analytics service.
         */
        splitTestRunName: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Specifies the version name for the page when a split test run is active.
         *
         * When reporting on A/B testing analytics data, this value specifies the test run version name that was
         * presented to the user.
         *
         * Default value is `undefined`
         */
        splitTestRunVersion: ComponentOptions_1.ComponentOptions.buildStringOption(),
        sendToCloud: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: true }),
        /**
         * Specifies the organization bound to the access token. This is necessary when using an access token, because a
         * single access token can be associated to more than one organization.
         *
         * Default value is `undefined`, and the value of this parameter will fallback to the organization used for the
         * search endpoint.
         */
        organization: ComponentOptions_1.ComponentOptions.buildStringOption(),
        /**
         * Whether to automatically attempt to push Coveo usage analytics events to the Google Tag Manager [data layer](https://developers.google.com/tag-manager/devguide#datalayer).
         *
         * See also [`gtmDataLayerName`]{@link Analytics.options.gtmDataLayerName}.
         *
         * @availablesince [July 2019 Release (v2.6459)](https://docs.coveo.com/en/2938/)
         */
        autoPushToGtmDataLayer: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false }),
        /**
         * The name of the Google Tag Manager data layer initialized in the page.
         *
         * See also [`autoPushToGtmDataLayer`]{@link Analytics.options.autoPushToGtmDataLayer}.
         *
         * **Note:**
         * Setting this option is only useful if the [GTM data layer was renamed](https://developers.google.com/tag-manager/devguide#renaming) in the page.
         *
         * **Default:** `dataLayer`
         */
        gtmDataLayerName: ComponentOptions_1.ComponentOptions.buildStringOption({ defaultValue: 'dataLayer' })
    };
    return Analytics;
}(Component_1.Component));
exports.Analytics = Analytics;


/***/ }),
/* 131 */,
/* 132 */,
/* 133 */,
/* 134 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var ResultLayoutEvents = /** @class */ (function () {
    function ResultLayoutEvents() {
    }
    ResultLayoutEvents.populateResultLayout = 'populateResultLayout';
    return ResultLayoutEvents;
}());
exports.ResultLayoutEvents = ResultLayoutEvents;


/***/ }),
/* 135 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var Options_1 = __webpack_require__(78);
var Utils_1 = __webpack_require__(4);
var Globalize = __webpack_require__(23);
var DefaultCurrencyToStringOptions = /** @class */ (function (_super) {
    __extends(DefaultCurrencyToStringOptions, _super);
    function DefaultCurrencyToStringOptions() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.decimals = 0;
        return _this;
    }
    return DefaultCurrencyToStringOptions;
}(Options_1.Options));
var CurrencyUtils = /** @class */ (function () {
    function CurrencyUtils() {
    }
    CurrencyUtils.currencyToString = function (value, options) {
        if (Utils_1.Utils.isNullOrUndefined(value)) {
            return '';
        }
        value = Number(value);
        Assert_1.Assert.isNumber(value);
        options = new DefaultCurrencyToStringOptions().merge(options);
        var currency = Globalize.culture().numberFormat.currency;
        var backup = currency.symbol;
        if (Utils_1.Utils.isNonEmptyString(options.symbol)) {
            currency.symbol = options.symbol;
        }
        var str = Globalize.format(value, 'c' + options.decimals.toString());
        currency.symbol = backup;
        return str;
    };
    return CurrencyUtils;
}());
exports.CurrencyUtils = CurrencyUtils;


/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(5);
var ResponsiveDropdownHeader = /** @class */ (function () {
    function ResponsiveDropdownHeader(componentName, element) {
        this.element = element;
        Assert_1.Assert.isString(componentName);
        Assert_1.Assert.exists(element);
        this.element.addClass("coveo-" + componentName + "-dropdown-header");
        this.element.addClass(ResponsiveDropdownHeader.DEFAULT_CSS_CLASS_NAME);
    }
    ResponsiveDropdownHeader.prototype.open = function () {
        this.element.addClass(ResponsiveDropdownHeader.ACTIVE_HEADER_CSS_CLASS_NAME);
    };
    ResponsiveDropdownHeader.prototype.close = function () {
        this.element.removeClass(ResponsiveDropdownHeader.ACTIVE_HEADER_CSS_CLASS_NAME);
    };
    ResponsiveDropdownHeader.prototype.cleanUp = function () {
        this.element.detach();
    };
    ResponsiveDropdownHeader.prototype.hide = function () {
        Dom_1.$$(this.element).addClass('coveo-hidden');
    };
    ResponsiveDropdownHeader.prototype.show = function () {
        Dom_1.$$(this.element).removeClass('coveo-hidden');
    };
    ResponsiveDropdownHeader.DEFAULT_CSS_CLASS_NAME = 'coveo-dropdown-header';
    ResponsiveDropdownHeader.ACTIVE_HEADER_CSS_CLASS_NAME = 'coveo-dropdown-header-active';
    return ResponsiveDropdownHeader;
}());
exports.ResponsiveDropdownHeader = ResponsiveDropdownHeader;


/***/ }),
/* 137 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var TemplateFieldsEvaluator = /** @class */ (function () {
    function TemplateFieldsEvaluator() {
    }
    TemplateFieldsEvaluator.evaluateFieldsToMatch = function (toMatches, result) {
        var templateShouldBeLoaded = true;
        if (!toMatches)
            return true;
        underscore_1.each(toMatches, function (toMatch) {
            var matchAtLeastOnce = false;
            if (!toMatch.values) {
                matchAtLeastOnce = result.raw[toMatch.field] != null;
            }
            else {
                underscore_1.each(toMatch.values, function (value) {
                    if (!matchAtLeastOnce) {
                        var fieldValue = result.raw[toMatch.field];
                        var fieldValues = TemplateFieldsEvaluator.getFieldValueAsArray(fieldValue);
                        matchAtLeastOnce = TemplateFieldsEvaluator.isMatch(fieldValues, value);
                    }
                });
            }
            templateShouldBeLoaded = templateShouldBeLoaded && (toMatch.reverseCondition ? !matchAtLeastOnce : matchAtLeastOnce);
        });
        return templateShouldBeLoaded;
    };
    TemplateFieldsEvaluator.getFieldValueAsArray = function (fieldValue) {
        return typeof fieldValue === 'string' ? [fieldValue] : fieldValue;
    };
    TemplateFieldsEvaluator.isMatch = function (fieldValues, value) {
        return underscore_1.find(fieldValues, function (fieldValue) { return fieldValue.toLowerCase() == value.toLowerCase(); }) != undefined;
    };
    return TemplateFieldsEvaluator;
}());
exports.TemplateFieldsEvaluator = TemplateFieldsEvaluator;


/***/ }),
/* 138 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var EventsUtils = /** @class */ (function () {
    function EventsUtils() {
    }
    // eventName must be in PascalCase
    EventsUtils.addPrefixedEvent = function (element, pascalCaseEventName, callback) {
        _.each(this.prefixes, function (prefix) {
            if (prefix == '') {
                pascalCaseEventName = pascalCaseEventName.toLowerCase();
            }
            element.addEventListener(prefix + pascalCaseEventName, callback, false);
        });
    };
    // eventName must be in PascalCase
    EventsUtils.removePrefixedEvent = function (element, pascalCaseEventName, callback) {
        _.each(this.prefixes, function (prefix) {
            if (prefix == '') {
                pascalCaseEventName = pascalCaseEventName.toLowerCase();
            }
            element.removeEventListener(prefix + pascalCaseEventName, callback, false);
        });
    };
    EventsUtils.prefixes = ['webkit', 'moz', 'MS', 'o', ''];
    return EventsUtils;
}());
exports.EventsUtils = EventsUtils;


/***/ }),
/* 139 */,
/* 140 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var MiscModules_1 = __webpack_require__(67);
var QueryboxQueryParameters = /** @class */ (function () {
    function QueryboxQueryParameters(options) {
        this.options = options;
    }
    QueryboxQueryParameters.queryIsBlocked = function () {
        // This code runs on some assumption :
        // Since all "buildingQuery" events would have to be run in the same call stack
        // We can add a static flag to block 2 or more query box/omnibox from trying to modify the query inside the same event.
        // If 2 query box are activated, we get duplicate terms in the query, or duplicate term correction with did you mean.
        // This means that only one query box/searchbox would be able to modify the query in a single search page.
        // This also means that if there is 2 search box enabled, the first one in the markup in the page would be able to do the job correctly as far as the query is concerned.
        // The second one is inactive as far as the query is concerned.
        // The flag gets reset in "defer" (setTimeout 0) so that it gets reset correctly when the query event has finished executing
        if (!QueryboxQueryParameters.queryIsCurrentlyBlocked) {
            QueryboxQueryParameters.queryIsCurrentlyBlocked = true;
            MiscModules_1.Defer.defer(function () { return QueryboxQueryParameters.allowDuplicateQuery(); });
            return false;
        }
        return true;
    };
    QueryboxQueryParameters.allowDuplicateQuery = function () {
        QueryboxQueryParameters.queryIsCurrentlyBlocked = false;
    };
    QueryboxQueryParameters.prototype.addParameters = function (queryBuilder, lastQuery) {
        if (!QueryboxQueryParameters.queryIsBlocked()) {
            if (this.options.enableWildcards) {
                queryBuilder.enableWildcards = true;
            }
            if (this.options.enableQuestionMarks) {
                queryBuilder.enableQuestionMarks = true;
            }
            if (this.options.enableLowercaseOperators) {
                queryBuilder.enableLowercaseOperators = true;
            }
            if (!_.isEmpty(lastQuery)) {
                queryBuilder.enableQuerySyntax = this.options.enableQuerySyntax;
                queryBuilder.expression.add(lastQuery);
                if (this.options.enablePartialMatch) {
                    queryBuilder.enablePartialMatch = this.options.enablePartialMatch;
                    if (this.options.partialMatchKeywords) {
                        queryBuilder.partialMatchKeywords = this.options.partialMatchKeywords;
                    }
                    if (this.options.partialMatchThreshold) {
                        queryBuilder.partialMatchThreshold = this.options.partialMatchThreshold;
                    }
                }
            }
        }
    };
    QueryboxQueryParameters.queryIsCurrentlyBlocked = false;
    return QueryboxQueryParameters;
}());
exports.QueryboxQueryParameters = QueryboxQueryParameters;


/***/ }),
/* 141 */,
/* 142 */,
/* 143 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var SliderEvents = /** @class */ (function () {
    function SliderEvents() {
    }
    SliderEvents.startSlide = 'startSlide';
    SliderEvents.duringSlide = 'duringSlide';
    SliderEvents.endSlide = 'endSlide';
    SliderEvents.graphValueSelected = 'graphValueSelected';
    return SliderEvents;
}());
exports.SliderEvents = SliderEvents;


/***/ }),
/* 144 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var ColorUtils = /** @class */ (function () {
    function ColorUtils() {
    }
    ColorUtils.hsvToRgb = function (h, s, v) {
        var r, g, b;
        var i = Math.floor(h * 6);
        var f = h * 6 - i;
        var p = v * (1 - s);
        var q = v * (1 - f * s);
        var t = v * (1 - (1 - f) * s);
        switch (i % 6) {
            case 0:
                (r = v), (g = t), (b = p);
                break;
            case 1:
                (r = q), (g = v), (b = p);
                break;
            case 2:
                (r = p), (g = v), (b = t);
                break;
            case 3:
                (r = p), (g = q), (b = v);
                break;
            case 4:
                (r = t), (g = p), (b = v);
                break;
            case 5:
                (r = v), (g = p), (b = q);
                break;
        }
        return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];
    };
    ColorUtils.rgbToHsv = function (r, g, b) {
        (r = r / 255), (g = g / 255), (b = b / 255);
        var max = Math.max(r, g, b), min = Math.min(r, g, b);
        var h, s, v = max;
        var d = max - min;
        s = max == 0 ? 0 : d / max;
        if (max == min) {
            h = 0; // achromatic
        }
        else {
            switch (max) {
                case r:
                    h = (g - b) / d + (g < b ? 6 : 0);
                    break;
                case g:
                    h = (b - r) / d + 2;
                    break;
                case b:
                    h = (r - g) / d + 4;
                    break;
            }
            h /= 6;
        }
        return [h, s, v];
    };
    return ColorUtils;
}());
exports.ColorUtils = ColorUtils;


/***/ }),
/* 145 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var QueryError = /** @class */ (function () {
    function QueryError(errorResponse) {
        this.status = errorResponse.statusCode;
        this.message = errorResponse.data.message;
        this.name = this.type = errorResponse.data.type;
        this.queryExecutionReport = errorResponse.data.executionReport;
        Assert_1.Assert.isNumber(this.status);
        Assert_1.Assert.isNonEmptyString(this.message);
        Assert_1.Assert.isNonEmptyString(this.type);
    }
    return QueryError;
}());
exports.QueryError = QueryError;


/***/ }),
/* 146 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var history_1 = __webpack_require__(147);
__webpack_require__(312);
exports.Version = 'v15';
exports.Endpoints = {
    default: 'https://usageanalytics.coveo.com',
    production: 'https://usageanalytics.coveo.com',
    dev: 'https://usageanalyticsdev.coveo.com',
    staging: 'https://usageanalyticsstaging.coveo.com'
};
;
function defaultResponseTransformer(response) {
    return response.json().then(function (data) {
        data.raw = response;
        return data;
    });
}
var Client = (function () {
    function Client(opts) {
        if (typeof opts === 'undefined') {
            throw new Error('You have to pass options to this constructor');
        }
        this.endpoint = opts.endpoint || exports.Endpoints.default;
        this.token = opts.token;
        this.version = opts.version || exports.Version;
    }
    Client.prototype.sendEvent = function (eventType, request) {
        return fetch(this.getRestEndpoint() + "/analytics/" + eventType, {
            method: 'POST',
            headers: this.getHeaders(),
            mode: 'cors',
            body: JSON.stringify(request),
            credentials: 'include'
        });
    };
    Client.prototype.sendSearchEvent = function (request) {
        return this.sendEvent('search', request).then(defaultResponseTransformer);
    };
    Client.prototype.sendClickEvent = function (request) {
        return this.sendEvent('click', request).then(defaultResponseTransformer);
    };
    Client.prototype.sendCustomEvent = function (request) {
        return this.sendEvent('custom', request).then(defaultResponseTransformer);
    };
    Client.prototype.sendViewEvent = function (request) {
        if (request.referrer === '') {
            delete request.referrer;
        }
        var store = new history_1.HistoryStore();
        var historyElement = {
            name: 'PageView',
            value: request.contentIdValue,
            time: JSON.stringify(new Date()),
        };
        store.addElement(historyElement);
        return this.sendEvent('view', request).then(defaultResponseTransformer);
    };
    Client.prototype.getVisit = function () {
        return fetch(this.getRestEndpoint() + "/analytics/visit")
            .then(defaultResponseTransformer);
    };
    Client.prototype.getHealth = function () {
        return fetch(this.getRestEndpoint() + "/analytics/monitoring/health")
            .then(defaultResponseTransformer);
    };
    Client.prototype.getRestEndpoint = function () {
        return this.endpoint + "/rest/" + this.version;
    };
    Client.prototype.getHeaders = function () {
        var headers = {
            'Content-Type': "application/json"
        };
        if (this.token) {
            headers['Authorization'] = "Bearer " + this.token;
        }
        return headers;
    };
    return Client;
}());
exports.Client = Client;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Client;


/***/ }),
/* 147 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var storage_1 = __webpack_require__(105);
var detector = __webpack_require__(148);
exports.STORE_KEY = '__coveo.analytics.history';
exports.MAX_NUMBER_OF_HISTORY_ELEMENTS = 20;
exports.MIN_THRESHOLD_FOR_DUPLICATE_VALUE = 1000 * 60;
exports.MAX_VALUE_SIZE = 75;
var HistoryStore = (function () {
    function HistoryStore(store) {
        this.store = store || storage_1.getAvailableStorage();
        if (!(this.store instanceof storage_1.CookieStorage) && detector.hasCookieStorage()) {
            new storage_1.CookieStorage().removeItem(exports.STORE_KEY);
        }
    }
    ;
    HistoryStore.prototype.addElement = function (elem) {
        elem.internalTime = new Date().getTime();
        this.cropQueryElement(elem);
        var currentHistory = this.getHistoryWithInternalTime();
        if (currentHistory != null) {
            if (this.isValidEntry(elem)) {
                this.setHistory([elem].concat(currentHistory));
            }
        }
        else {
            this.setHistory([elem]);
        }
    };
    HistoryStore.prototype.getHistory = function () {
        var history = this.getHistoryWithInternalTime();
        return this.stripInternalTime(history);
    };
    HistoryStore.prototype.getHistoryWithInternalTime = function () {
        try {
            return JSON.parse(this.store.getItem(exports.STORE_KEY));
        }
        catch (e) {
            return [];
        }
    };
    HistoryStore.prototype.setHistory = function (history) {
        try {
            this.store.setItem(exports.STORE_KEY, JSON.stringify(history.slice(0, exports.MAX_NUMBER_OF_HISTORY_ELEMENTS)));
        }
        catch (e) { }
    };
    HistoryStore.prototype.clear = function () {
        try {
            this.store.removeItem(exports.STORE_KEY);
        }
        catch (e) { }
    };
    HistoryStore.prototype.getMostRecentElement = function () {
        var currentHistory = this.getHistoryWithInternalTime();
        if (currentHistory != null) {
            var sorted = currentHistory.sort(function (first, second) {
                if (first.internalTime == null && second.internalTime == null) {
                    return 0;
                }
                if (first.internalTime == null && second.internalTime != null) {
                    return 1;
                }
                if (first.internalTime != null && second.internalTime == null) {
                    return -1;
                }
                return second.internalTime - first.internalTime;
            });
            return sorted[0];
        }
        return null;
    };
    HistoryStore.prototype.cropQueryElement = function (elem) {
        if (elem.name && elem.name.toLowerCase() == 'query' && elem.value != null) {
            elem.value = elem.value.slice(0, exports.MAX_VALUE_SIZE);
        }
    };
    HistoryStore.prototype.isValidEntry = function (elem) {
        var lastEntry = this.getMostRecentElement();
        if (lastEntry && lastEntry.value == elem.value) {
            return elem.internalTime - lastEntry.internalTime > exports.MIN_THRESHOLD_FOR_DUPLICATE_VALUE;
        }
        return true;
    };
    HistoryStore.prototype.stripInternalTime = function (history) {
        if (history) {
            history.forEach(function (part, index, array) {
                delete part.internalTime;
            });
        }
        return history;
    };
    return HistoryStore;
}());
exports.HistoryStore = HistoryStore;
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = HistoryStore;


/***/ }),
/* 148 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function hasLocalStorage() {
    try {
        return 'localStorage' in window && window['localStorage'] !== null;
    }
    catch (e) {
        return false;
    }
}
exports.hasLocalStorage = hasLocalStorage;
;
function hasSessionStorage() {
    try {
        return 'sessionStorage' in window && window['sessionStorage'] !== null;
    }
    catch (e) {
        return false;
    }
}
exports.hasSessionStorage = hasSessionStorage;
;
function hasCookieStorage() {
    return navigator.cookieEnabled;
}
exports.hasCookieStorage = hasCookieStorage;
;
function hasDocument() {
    return document !== null;
}
exports.hasDocument = hasDocument;
;
function hasDocumentLocation() {
    return hasDocument() && document.location !== null;
}
exports.hasDocumentLocation = hasDocumentLocation;
;


/***/ }),
/* 149 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(9);
var underscore_1 = __webpack_require__(0);
var ACCESS_TOKEN_ERRORS;
(function (ACCESS_TOKEN_ERRORS) {
    ACCESS_TOKEN_ERRORS["NO_RENEW_FUNCTION"] = "NO_RENEW_FUNCTION";
    ACCESS_TOKEN_ERRORS["REPEATED_FAILURES"] = "REPEATED_FAILURES";
})(ACCESS_TOKEN_ERRORS = exports.ACCESS_TOKEN_ERRORS || (exports.ACCESS_TOKEN_ERRORS = {}));
var AccessToken = /** @class */ (function () {
    function AccessToken(token, renew) {
        var _this = this;
        this.token = token;
        this.renew = renew;
        this.subscribers = [];
        this.logger = new Logger_1.Logger(this);
        this.triedRenewals = 0;
        this.resetRenewalTriesAfterDelay = underscore_1.debounce(function () {
            _this.triedRenewals = 0;
        }, 500, false);
    }
    AccessToken.prototype.updateToken = function (token) {
        this.token = token;
        this.notifySubscribers();
    };
    AccessToken.prototype.doRenew = function (onError) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, err_1;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        this.triedRenewals++;
                        this.resetRenewalTriesAfterDelay();
                        _b.label = 1;
                    case 1:
                        _b.trys.push([1, 3, , 4]);
                        this.verifyRenewSetup();
                        this.logger.info('Renewing expired access token');
                        _a = this;
                        return [4 /*yield*/, this.renew()];
                    case 2:
                        _a.token = _b.sent();
                        this.logger.info('Access token renewed', this.token);
                        this.notifySubscribers();
                        return [2 /*return*/, true];
                    case 3:
                        err_1 = _b.sent();
                        switch (err_1.message) {
                            case ACCESS_TOKEN_ERRORS.REPEATED_FAILURES:
                                this.logger.error('AccessToken tried to renew itself extremely fast in a short period of time');
                                this.logger.error('There is most probably an authentication error, or a bad implementation of the custom renew function');
                                this.logger.error('Inspect the developer console of your browser to find out the root cause');
                                break;
                            case ACCESS_TOKEN_ERRORS.NO_RENEW_FUNCTION:
                                this.logger.error("AccessToken tried to renew, but no function is configured on initialization to provide acess token renewal");
                                this.logger.error('The option name is renewAccessToken on the SearchEndpoint class');
                                break;
                        }
                        this.logger.error('Failed to renew access token', err_1);
                        if (onError) {
                            onError(err_1);
                        }
                        return [2 /*return*/, false];
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    AccessToken.prototype.subscribeToRenewal = function (onTokenRefreshed) {
        this.subscribers.push(onTokenRefreshed);
    };
    AccessToken.prototype.verifyRenewSetup = function () {
        if (this.renew == null) {
            throw new Error(ACCESS_TOKEN_ERRORS.NO_RENEW_FUNCTION);
        }
        if (this.triedRenewals >= 5) {
            throw new Error(ACCESS_TOKEN_ERRORS.REPEATED_FAILURES);
        }
    };
    AccessToken.prototype.notifySubscribers = function () {
        var _this = this;
        this.subscribers.forEach(function (subscriber) { return subscriber(_this.token); });
    };
    return AccessToken;
}());
exports.AccessToken = AccessToken;


/***/ }),
/* 150 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var JitterTypes;
(function (JitterTypes) {
    JitterTypes["None"] = "none";
    JitterTypes["Full"] = "full";
})(JitterTypes = exports.JitterTypes || (exports.JitterTypes = {}));
var defaultOptions = {
    delayFirstAttempt: false,
    jitter: JitterTypes.None,
    maxDelay: Infinity,
    numOfAttempts: 10,
    retry: function () { return true; },
    startingDelay: 100,
    timeMultiple: 2
};
function getSanitizedOptions(options) {
    var sanitized = __assign(__assign({}, defaultOptions), options);
    if (sanitized.numOfAttempts < 1) {
        sanitized.numOfAttempts = 1;
    }
    return sanitized;
}
exports.getSanitizedOptions = getSanitizedOptions;
//# sourceMappingURL=options.js.map

/***/ }),
/* 151 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var jitter_factory_1 = __webpack_require__(321);
var Delay = /** @class */ (function () {
    function Delay(options) {
        this.options = options;
        this.attempt = 0;
    }
    Delay.prototype.apply = function () {
        var _this = this;
        return new Promise(function (resolve) { return setTimeout(resolve, _this.jitteredDelay); });
    };
    Delay.prototype.setAttemptNumber = function (attempt) {
        this.attempt = attempt;
    };
    Object.defineProperty(Delay.prototype, "jitteredDelay", {
        get: function () {
            var jitter = jitter_factory_1.JitterFactory(this.options);
            return jitter(this.delay);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Delay.prototype, "delay", {
        get: function () {
            var constant = this.options.startingDelay;
            var base = this.options.timeMultiple;
            var power = this.numOfDelayedAttempts;
            var delay = constant * Math.pow(base, power);
            return Math.min(delay, this.options.maxDelay);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Delay.prototype, "numOfDelayedAttempts", {
        get: function () {
            return this.attempt;
        },
        enumerable: true,
        configurable: true
    });
    return Delay;
}());
exports.Delay = Delay;
//# sourceMappingURL=delay.base.js.map

/***/ }),
/* 152 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(23);
var merge = function (obj1, obj2) {
    var obj3 = {};
    for (var attrname in obj1) {
        obj3[attrname] = obj1[attrname];
    }
    for (var attrname in obj2) {
        obj3[attrname] = obj2[attrname];
    }
    return obj3;
};
var dict = {
    "box user": "User",
    "filetype_box user": "User",
    "cfpage": "Confluence Page",
    "filetype_cfpage": "Confluence Page",
    "cfcomment": "Confluence Comment",
    "filetype_cfcomment": "Confluence Comment",
    "cfspace": "Confluence Space",
    "filetype_cfspace": "Confluence Space",
    "cfblogentry": "Confluence Blog Entry",
    "filetype_cfblogentry": "Confluence Blog Entry",
    "confluencespace": "Confluence Space",
    "filetype_confluencespace": "Confluence Space",
    "exchangemessage": "Message",
    "filetype_exchangemessage": "Message",
    "exchangeappointment": "Appointment",
    "filetype_exchangeappointment": "Appointment",
    "exchangenote": "Note",
    "filetype_exchangenote": "Note",
    "exchangetask": "Task",
    "filetype_exchangetask": "Task",
    "exchangeperson": "Exchange User",
    "filetype_exchangeperson": "Exchange User",
    "activedirperson": "Active Directory User",
    "filetype_activedirperson": "Active Directory User",
    "exchangeactivity": "Activity",
    "filetype_exchangeactivity": "Activity",
    "exchangecalendarmessage": "Calendar Message",
    "filetype_exchangecalendarmessage": "Calendar Message",
    "exchangedocument": "Exchange Document",
    "filetype_exchangedocument": "Exchange Document",
    "exchangedsn": "DSN",
    "filetype_exchangedsn": "DSN",
    "exchangefreebusy": "Free/Busy",
    "filetype_exchangefreebusy": "Free/Busy",
    "exchangegroup": "Group",
    "filetype_exchangegroup": "Group",
    "exchangerssfeed": "RSS Feed",
    "filetype_exchangerssfeed": "RSS Feed",
    "exchangejunkmessage": "Junk Email",
    "filetype_exchangejunkmessage": "Junk Email",
    "exchangeofficecom": "Communications",
    "filetype_exchangeofficecom": "Communications",
    "html": "HTML File",
    "filetype_html": "HTML File",
    "wiki": "Wiki",
    "filetype_wiki": "Wiki",
    "webscraperwebpage": "Web Page",
    "filetype_webscraperwebpage": "Web Page",
    "image": "Image",
    "filetype_image": "Image",
    "folder": "Folder",
    "filetype_folder": "Folder",
    "txt": "Text",
    "filetype_txt": "Text",
    "zip": "Zip File",
    "filetype_zip": "Zip File",
    "olefile": "OLE file",
    "filetype_olefile": "OLE file",
    "gmailmessage": "Gmail Message",
    "filetype_gmailmessage": "Gmail Message",
    "pdf": "PDF File",
    "filetype_pdf": "PDF File",
    "swf": "Flash File",
    "filetype_swf": "Flash File",
    "xml": "XML File",
    "filetype_xml": "XML File",
    "vsd": "Visio",
    "filetype_vsd": "Visio",
    "svg": "SVG",
    "filetype_svg": "SVG",
    "svm": "Open Office",
    "filetype_svm": "Open Office",
    "rssitem": "RSS feed",
    "filetype_rssitem": "RSS feed",
    "doc": "Document",
    "filetype_doc": "Document",
    "docx": "Microsoft Word Document",
    "filetype_docx": "Microsoft Word Document",
    "xls": "Spreadsheet Document",
    "filetype_xls": "Spreadsheet Document",
    "ppt": "Presentation Document",
    "filetype_ppt": "Presentation Document",
    "video": "Video",
    "filetype_video": "Video",
    "youtube": "YouTube video",
    "filetype_youtube": "YouTube video",
    "saleforceitem": "Salesforce",
    "filetype_saleforceitem": "Salesforce",
    "dynamicscrmitem": "Dynamics CRM",
    "filetype_dynamicscrmitem": "Dynamics CRM",
    "salesforceitem": "Salesforce",
    "filetype_salesforceitem": "Salesforce",
    "odt": "Open Text Document",
    "filetype_odt": "Open Text Document",
    "box": "User",
    "filetype_box": "User",
    "jiraissue": "Jira Issue",
    "filetype_jiraissue": "Jira Issue",
    "lithiummessage": "Lithium Message",
    "filetype_lithiummessage": "Lithium Message",
    "lithiumthread": "Lithium Thread",
    "filetype_lithiumthread": "Lithium Thread",
    "lithiumboard": "Lithium Board",
    "filetype_lithiumboard": "Lithium Board",
    "lithiumcategory": "Lithium Category",
    "filetype_lithiumcategory": "Lithium Category",
    "lithiumcommunity": "Lithium Community",
    "filetype_lithiumcommunity": "Lithium Community",
    "people": "User",
    "objecttype_people": "User",
    "message": "Message",
    "objecttype_message": "Message",
    "feed": "RSS Feed",
    "objecttype_feed": "RSS Feed",
    "thread": "Thread",
    "objecttype_thread": "Thread",
    "file": "File",
    "objecttype_file": "File",
    "board": "Board",
    "objecttype_board": "Board",
    "category": "Category",
    "objecttype_category": "Category",
    "account": "Account",
    "objecttype_account": "Account",
    "annotation": "Note",
    "objecttype_annotation": "Note",
    "campaign": "Campaign",
    "objecttype_campaign": "Campaign",
    "case": "Case",
    "objecttype_case": "Case",
    "contact": "Contact",
    "objecttype_contact": "Contact",
    "contract": "Contract",
    "objecttype_contract": "Contract",
    "event": "Event",
    "objecttype_event": "Event",
    "email": "Email",
    "objecttype_email": "Email",
    "goal": "Goal",
    "objecttype_goal": "Goal",
    "incident": "Incident",
    "objecttype_incident": "Incident",
    "invoice": "Invoice",
    "objecttype_invoice": "Invoice",
    "lead": "Lead",
    "objecttype_lead": "Lead",
    "list": "List",
    "objecttype_list": "Marketing List",
    "solution": "Solution",
    "objecttype_solution": "Solution",
    "report": "Report",
    "objecttype_report": "Report",
    "task": "Task",
    "objecttype_task": "Task",
    "user": "User",
    "objecttype_user": "User",
    "attachment": "Attachment",
    "objecttype_attachment": "Attachment",
    "casecomment": "Case Comment",
    "objecttype_casecomment": "Case Comment",
    "opportunity": "Opportunity",
    "objecttype_opportunity": "Opportunity",
    "opportunityproduct": "Opportunity Product",
    "objecttype_opportunityproduct": "Opportunity Product",
    "feeditem": "Chatter",
    "objecttype_feeditem": "Chatter",
    "feedcomment": "Comment",
    "objecttype_feedcomment": "Comment",
    "note": "Note",
    "objecttype_note": "Note",
    "product": "Product",
    "objecttype_product": "Product",
    "partner": "Partner",
    "objecttype_partner": "Partner",
    "queueitem": "Queue Item",
    "objecttype_queueitem": "Queue Item",
    "quote": "Quote",
    "objecttype_quote": "Quote",
    "salesliterature": "Sales Literature",
    "objecttype_salesliterature": "Sales Literature",
    "salesorder": "Sales Order",
    "objecttype_salesorder": "Sales Order",
    "service": "Service",
    "objecttype_service": "Service",
    "socialprofile": "Social Profile",
    "objecttype_socialprofile": "Social Profile",
    "kbdocumentation": "Knowledge Document",
    "objecttype_kbdocumentation": "Knowledge Document",
    "kbtechnicalarticle": "Technical Documentation",
    "objecttype_kbtechnicalarticle": "Technical Documentation",
    "kbsolution": "Solution",
    "objecttype_kbsolution": "Solution",
    "kbknowledgearticle": "Knowledge Article",
    "objecttype_kbknowledgearticle": "Knowledge Article",
    "kbattachment": "Attachment",
    "objecttype_kbattachment": "Attachment",
    "kbarticle": "Article",
    "objecttype_kbarticle": "Article",
    "kbarticlecomment": "Article Comment",
    "objecttype_kbarticlecomment": "Article Comment",
    "knowledgearticle": "Knowledge Article",
    "objecttype_knowledgearticle": "Knowledge Article",
    "topic": "Topic",
    "objecttype_topic": "Topic",
    "dashboard": "Dashboard",
    "objecttype_dashboard": "Dashboard",
    "contentversion": "Document",
    "objecttype_contentversion": "Document",
    "collaborationgroup": "Collaboration group",
    "objecttype_collaborationgroup": "Collaboration group",
    "phonecall": "Phone call",
    "objecttype_phonecall": "Phone call",
    "appointment": "Appointment",
    "objecttype_appointment": "Appointment",
    "sn_hr_core_case": "HR Case",
    "filetype_sn_hr_core_case": "HR Case",
    "sc_cat_item": "Catalog Item",
    "filetype_sc_cat_item": "Catalog Item",
    "sn_customerservice_case": "Case",
    "filetype_sn_customerservice_case": "Case",
    "kb_social_qa_answer": "Answer",
    "filetype_kb_social_qa_answer": "Answer",
    "kb_social_qa_question": "Question",
    "filetype_kb_social_qa_question": "Question",
    "kb_social_qa_comment": "Comment",
    "filetype_kb_social_qa_comment": "Comment",
    "filetype_incident": "Incident",
    "kb_knowledge": "Knowledge Article",
    "filetype_kb_knowledge": "Knowledge Article",
    "spportal": "Portal",
    "filetype_spportal": "Portal",
    "spsite": "SharePoint Site",
    "filetype_spsite": "SharePoint Site",
    "spuserprofile": "SharePoint User",
    "filetype_spuserprofile": "SharePoint User",
    "sparea": "Area",
    "filetype_sparea": "Area",
    "spannouncement": "Announcement",
    "filetype_spannouncement": "Announcement",
    "spannouncementlist": "Announcements",
    "filetype_spannouncementlist": "Announcements",
    "spcontact": "Contact",
    "filetype_spcontact": "Contact",
    "spcontactlist": "Contacts",
    "filetype_spcontactlist": "Contacts",
    "spcustomlist": "Custom Lists",
    "filetype_spcustomlist": "Custom Lists",
    "spdiscussionboard": "Discussion Board",
    "filetype_spdiscussionboard": "Discussion Board",
    "spdiscussionboardlist": "Discussion Boards",
    "filetype_spdiscussionboardlist": "Discussion Boards",
    "spdocumentlibrarylist": "Document Library",
    "filetype_spdocumentlibrarylist": "Document Library",
    "spevent": "Event",
    "filetype_spevent": "Event",
    "speventlist": "Events",
    "filetype_speventlist": "Events",
    "spformlibrarylist": "Form Library",
    "filetype_spformlibrarylist": "Form Library",
    "spissue": "Issue",
    "filetype_spissue": "Issue",
    "spissuelist": "Issues",
    "filetype_spissuelist": "Issues",
    "splink": "Link",
    "filetype_splink": "Link",
    "splinklist": "Links",
    "filetype_splinklist": "Links",
    "sppicturelibrarylist": "Picture Library",
    "filetype_sppicturelibrarylist": "Picture Library",
    "spsurvey": "Survey",
    "filetype_spsurvey": "Survey",
    "spsurveylist": "Surveys",
    "filetype_spsurveylist": "Surveys",
    "sptask": "Task",
    "filetype_sptask": "Task",
    "sptasklist": "Tasks",
    "filetype_sptasklist": "Tasks",
    "spagenda": "Agenda",
    "filetype_spagenda": "Agenda",
    "spagendalist": "Agendas",
    "filetype_spagendalist": "Agendas",
    "spattendee": "Attendee",
    "filetype_spattendee": "Attendee",
    "spattendeelist": "Attendees",
    "filetype_spattendeelist": "Attendees",
    "spcustomgridlist": "Custom Grids",
    "filetype_spcustomgridlist": "Custom Grids",
    "spdecision": "Decision",
    "filetype_spdecision": "Decision",
    "spdecisionlist": "Decisions",
    "filetype_spdecisionlist": "Decisions",
    "spobjective": "Objective",
    "filetype_spobjective": "Objective",
    "spobjectivelist": "Objectives",
    "filetype_spobjectivelist": "Objectives",
    "sptextbox": "Textbox",
    "filetype_sptextbox": "Textbox",
    "sptextboxlist": "Textbox list",
    "filetype_sptextboxlist": "Textbox list",
    "spthingstobring": "Thing To Bring",
    "filetype_spthingstobring": "Thing To Bring",
    "spthingstobringlist": "Things To Bring",
    "filetype_spthingstobringlist": "Things To Bring",
    "sparealisting": "Area Listing",
    "filetype_sparealisting": "Area Listing",
    "spmeetingserie": "Meeting series",
    "filetype_spmeetingserie": "Meeting series",
    "spmeetingserielist": "Meeting Series List",
    "filetype_spmeetingserielist": "Meeting Series List",
    "spsitedirectory": "Site Directory Item",
    "filetype_spsitedirectory": "Site Directory Item",
    "spsitedirectorylist": "Site Directory",
    "filetype_spsitedirectorylist": "Site Directory",
    "spdatasource": "Data Source",
    "filetype_spdatasource": "Data Source",
    "spdatasourcelist": "Data Source List",
    "filetype_spdatasourcelist": "Data Source List",
    "splisttemplatecataloglist": "List Template Gallery",
    "filetype_splisttemplatecataloglist": "List Template Gallery",
    "spwebpartcataloglist": "WebPart Gallery",
    "filetype_spwebpartcataloglist": "WebPart Gallery",
    "spwebtemplatecataloglist": "Site Template Gallery",
    "filetype_spwebtemplatecataloglist": "Site Template Gallery",
    "spworkspacepagelist": "Workspace Pages",
    "filetype_spworkspacepagelist": "Workspace Pages",
    "spunknownlist": "Custom List",
    "filetype_spunknownlist": "Custom List",
    "spadministratortask": "Administrator Task",
    "filetype_spadministratortask": "Administrator Task",
    "spadministratortasklist": "Administrator Tasks",
    "filetype_spadministratortasklist": "Administrator Tasks",
    "spareadocumentlibrarylist": "Area Document Library",
    "filetype_spareadocumentlibrarylist": "Area Document Library",
    "spblogcategory": "Blog Category",
    "filetype_spblogcategory": "Blog Category",
    "spblogcategorylist": "Blog Categories",
    "filetype_spblogcategorylist": "Blog Categories",
    "spblogcomment": "Blog Comment",
    "filetype_spblogcomment": "Blog Comment",
    "spblogcommentlist": "Blog Comments",
    "filetype_spblogcommentlist": "Blog Comments",
    "spblogpost": "Blog Post",
    "filetype_spblogpost": "Blog Post",
    "spblogpostlist": "Blog Posts",
    "filetype_spblogpostlist": "Blog Posts",
    "spdataconnectionlibrarylist": "Data Connection Library",
    "filetype_spdataconnectionlibrarylist": "Data Connection Library",
    "spdistributiongroup": "Distribution Group",
    "filetype_spdistributiongroup": "Distribution Group",
    "spdistributiongrouplist": "Distribution Groups",
    "filetype_spdistributiongrouplist": "Distribution Groups",
    "spipfslist": "InfoPath Forms Servers",
    "filetype_spipfslist": "InfoPath Forms Servers",
    "spkeyperformanceindicator": "Key Performance Indicator",
    "filetype_spkeyperformanceindicator": "Key Performance Indicator",
    "spkeyperformanceindicatorlist": "Key Performance Indicators",
    "filetype_spkeyperformanceindicatorlist": "Key Performance Indicators",
    "splanguagesandtranslator": "Languages and Translator",
    "filetype_splanguagesandtranslator": "Languages and Translator",
    "splanguagesandtranslatorlist": "Languages and Translators",
    "filetype_splanguagesandtranslatorlist": "Languages and Translators",
    "spmasterpagescataloglist": "Master Page Gallery",
    "filetype_spmasterpagescataloglist": "Master Page Gallery",
    "spnocodeworkflowlibrarylist": "No-code Workflow Libraries",
    "filetype_spnocodeworkflowlibrarylist": "No-code Workflow Libraries",
    "spprojecttask": "Project Task",
    "filetype_spprojecttask": "Project Task",
    "spprojecttasklist": "Project Tasks",
    "filetype_spprojecttasklist": "Project Tasks",
    "sppublishingpageslibrarylist": "Page Library",
    "filetype_sppublishingpageslibrarylist": "Page Library",
    "spreportdocumentlibrarylist": "Report Document Library",
    "filetype_spreportdocumentlibrarylist": "Report Document Library",
    "spreportlibrarylist": "Report Library",
    "filetype_spreportlibrarylist": "Report Library",
    "spslidelibrarylist": "Slide Library",
    "filetype_spslidelibrarylist": "Slide Library",
    "sptab": "Tabs",
    "filetype_sptab": "Tabs",
    "sptablist": "Tabs List",
    "filetype_sptablist": "Tabs List",
    "sptranslationmanagementlibrarylist": "Translation Management Library",
    "filetype_sptranslationmanagementlibrarylist": "Translation Management Library",
    "spuserinformation": "User Information",
    "filetype_spuserinformation": "User Information",
    "spuserinformationlist": "User Information List",
    "filetype_spuserinformationlist": "User Information List",
    "spwikipagelibrarylist": "Wiki Page Library",
    "filetype_spwikipagelibrarylist": "Wiki Page Library",
    "spworkflowhistory": "Workflow History",
    "filetype_spworkflowhistory": "Workflow History",
    "spworkflowhistorylist": "Workflow History List",
    "filetype_spworkflowhistorylist": "Workflow History List",
    "spworkflowprocess": "Custom Workflow Process",
    "filetype_spworkflowprocess": "Custom Workflow Process",
    "spworkflowprocesslist": "Custom Workflow Processes",
    "filetype_spworkflowprocesslist": "Custom Workflow Processes",
    "sppublishingimageslibrarylist": "Publishing Image Library",
    "filetype_sppublishingimageslibrarylist": "Publishing Image Library",
    "spcirculation": "Circulation",
    "filetype_spcirculation": "Circulation",
    "spcirculationlist": "Circulations",
    "filetype_spcirculationlist": "Circulations",
    "spdashboardslibrarylist": "Dashboards Library",
    "filetype_spdashboardslibrarylist": "Dashboards Library",
    "spdataconnectionforperformancepointlibrarylist": "PerformancePoint Data Connection Library",
    "filetype_spdataconnectionforperformancepointlibrarylist": "PerformancePoint Data Connection Library",
    "sphealthreport": "Health Report",
    "filetype_sphealthreport": "Health Report",
    "sphealthreportlist": "Health Reports",
    "filetype_sphealthreportlist": "Health Reports",
    "sphealthrule": "Health Rule",
    "filetype_sphealthrule": "Health Rule",
    "sphealthrulelist": "Health Rules",
    "filetype_sphealthrulelist": "Health Rules",
    "spimedictionary": "IME Dictionary",
    "filetype_spimedictionary": "IME Dictionary",
    "spimedictionarylist": "IME Dictionaries",
    "filetype_spimedictionarylist": "IME Dictionaries",
    "spperformancepointcontent": "PerformancePoint Content",
    "filetype_spperformancepointcontent": "PerformancePoint Content",
    "spperformancepointcontentlist": "PerformancePoint Contents",
    "filetype_spperformancepointcontentlist": "PerformancePoint Contents",
    "spphonecallmemo": "Phone Call Memo",
    "filetype_spphonecallmemo": "Phone Call Memo",
    "spphonecallmemolist": "Phone Call Memos",
    "filetype_spphonecallmemolist": "Phone Call Memos",
    "sprecordlibrarylist": "Record Library",
    "filetype_sprecordlibrarylist": "Record Library",
    "spresource": "Resource",
    "filetype_spresource": "Resource",
    "spresourcelist": "Resources",
    "filetype_spresourcelist": "Resources",
    "spprocessdiagramslibrarylist": "Process Diagram Library",
    "filetype_spprocessdiagramslibrarylist": "Process Diagram Library",
    "spsitethemeslibrarylist": "Site Theme Library",
    "filetype_spsitethemeslibrarylist": "Site Theme Library",
    "spsolutionslibrarylist": "Solution Library",
    "filetype_spsolutionslibrarylist": "Solution Library",
    "spwfpublibrarylist": "WFPUB Library",
    "filetype_spwfpublibrarylist": "WFPUB Library",
    "spwhereabout": "Whereabout",
    "filetype_spwhereabout": "Whereabout",
    "spwhereaboutlist": "Whereabouts",
    "filetype_spwhereaboutlist": "Whereabouts",
    "spdocumentlink": "Link to a Document",
    "filetype_spdocumentlink": "Link to a Document",
    "spdocumentset": "Document Set",
    "filetype_spdocumentset": "Document Set",
    "spmicrofeedpost": "Microfeed Post",
    "filetype_spmicrofeedpost": "Microfeed Post",
    "spmicrofeedlist": "Microfeed",
    "filetype_spmicrofeedlist": "Microfeed",
    "splistfolder": "List Folder",
    "filetype_splistfolder": "List Folder",
    "slackmessage": "Slack Message",
    "filetype_slackmessage": "Slack Message",
    "slackchannel": "Slack Channel",
    "filetype_slackchannel": "Slack Channel",
    "slackfile": "Slack File",
    "filetype_slackfile": "Slack File",
    "slackuser": "Slack User",
    "filetype_slackuser": "Slack User",
    "youtubevideo": "YouTube video",
    "filetype_youtubevideo": "YouTube video",
    "youtubeplaylistitem": "YouTube playlist item",
    "filetype_youtubeplaylistitem": "YouTube playlist item",
    "youtubeplaylist": "YouTube playlist",
    "filetype_youtubeplaylist": "YouTube playlist",
    "Unknown": "Unknown",
    "And": "AND",
    "Authenticating": "Authenticating {0}...",
    "Clear": "Clear {0}",
    "CompleteQuery": "Complete query",
    "Exclude": "Exclude {0}",
    "EnterTag": "Add Tag",
    "Next": "Next",
    "Last": "Last",
    "Link": "Link",
    "Or": "OR",
    "Previous": "Previous",
    "QueryDidntMatchAnyDocuments": "Your query did not match any documents.",
    "QueryException": "Your query has an error: {0}.",
    "Me": "Me",
    "Remove": "Remove",
    "Search": "Search",
    "SearchFor": "Search for {0}",
    "SubmitSearch": "Submit search",
    "ShareQuery": "Share Query",
    "Preferences": "Preferences",
    "LinkOpeningSettings": "Link opening settings",
    "Reauthenticate": "Reauthenticate {0}",
    "ResultsFilteringExpression": "Result filtering expressions",
    "FiltersInYourPreferences": "Filters in your preferences",
    "Create": "Create",
    "SearchIn": "Search in {0}",
    "Seconds": "in {0} second<pl>s</pl>",
    "ShowingResultsOf": "Result<pl>s</pl> {0}<pl>-{1}</pl> of {2}",
    "ShowingResultsOfWithQuery": "Result<pl>s</pl> {0}<pl>-{1}</pl> of {2} for {3}",
    "SwitchTo": "Switch to {0}",
    "Unexclude": "Remove exclusion filter on {0}",
    "ClearAllFilters": "Clear All Filters",
    "SkipLogin": "Skip login",
    "LoginInProgress": "Login in progress, please wait ...",
    "Login": "Log In",
    "GetStarted": "Get Started",
    "More": "More",
    "NMore": "{0} more...",
    "Less": "Fewer",
    "Settings": "Settings",
    "Score": "Score",
    "ScoreDescription": "The score is computed from the number of occurrences as well as from the position in the result set.",
    "Occurrences": "Occurrences",
    "OccurrencesDescription": "Sort by number of occurrences, with values having the highest number appearing first.",
    "Label": "Label",
    "Of": "of",
    "LabelDescription": "Sort alphabetically on the field values.",
    "Value": "Value",
    "ValueDescription": "Sort on the values of the first computed field",
    "AlphaAscending": "Value Ascending",
    "AlphaDescending": "Value Descending",
    "ChiSquare": "Chi Square",
    "Nosort": "No Sort",
    "NosortDescription": "Do not sort the values. The values will be returned in a random order.",
    "RelativeFrequency": "Relative Frequency",
    "RelativeFrequencyDescription": "Sort based on the relative frequency of values. Less common values will appear higher.",
    "DateDistribution": "Date distribution",
    "Custom": "Custom",
    "CustomDescription": "Sort based on a custom order",
    "ComputedField": "Computed Field",
    "Ascending": "Ascending",
    "Descending": "Descending",
    "noResultFor": "No results for {0}",
    "noResult": "No results",
    "autoCorrectedQueryTo": "Query was automatically corrected to {0}",
    "didYouMean": "Did you mean: {0}",
    "SuggestedResults": "Suggested Results",
    "SuggestedQueries": "Suggested Queries",
    "MostRelevantItems": "Most relevant items:",
    "AllItems": "All items:",
    "ShowLess": "Show less",
    "ShowMore": "Show more",
    "HideFacet": "Hide Facet",
    "ShowFacet": "Show Facet",
    "AndOthers": "and {0} other<pl>s</pl>",
    "Others": "{0} other<pl>s</pl>",
    "MostRelevantPosts": "Most Relevant Posts:",
    "CompleteThread": "Complete Thread:",
    "ShowCompleteThread": "Show Complete Thread",
    "ShowOnlyTopMatchingPosts": "Show Only Top Matching Posts",
    "MostRelevantReplies": "Most Relevant Replies:",
    "AllConversation": "All Conversation:",
    "ShowAllConversation": "Show All Conversation",
    "ShowAllReplies": "Show All Replies",
    "ShowOnlyMostRelevantReplies": "Show Only Most Relevant Replies",
    "Close": "Close",
    "Open": "Open",
    "OpenInOutlookWhenPossible": "Open in Outlook (when possible)",
    "AlwaysOpenInNewWindow": "Always open results in new window",
    "Quickview": "Quick View",
    "NoQuickview": "The Quick View for this document is unavailable",
    "ErrorReport": "Error Report",
    "OopsError": "Something went wrong.",
    "ProblemPersists": "If the problem persists contact the administrator.",
    "GoBack": "Go Back",
    "Reset": "Reset",
    "Retry": "Retry",
    "MoreInfo": "More Information",
    "Username": "Username",
    "Password": "Password",
    "PostedBy": "Posted by",
    "CannotConnect": "Cannot connect to the server address.",
    "BadUserPass": "Password does not match with username.",
    "PleaseEnterYourCredentials": "Please enter your credentials for {0}.",
    "PleaseEnterYourSearchPage": "Please enter your search page URL",
    "Collapse": "Collapse",
    "Collapsable": "Collapsible",
    "Expand": "Expand",
    "CollapseFacet": "Collapse {0} facet",
    "ExpandFacet": "Expand {0} facet",
    "ShowLessFacetResults": "Show fewer results for {0} facet",
    "ShowMoreFacetResults": "Show more results for {0} facet",
    "ShowLessCategoryResults": "Show fewer results for the {0} category",
    "ShowMoreCategoryResults": "Show more results for the {0} category",
    "ShowLessHierarchicalResults": "Show fewer results for the {0} facet",
    "ShowMoreHierarchicalResults": "Show more results for the {0} facet",
    "SearchFacetResults": "Search for values in {0} facet",
    "Today": "Today",
    "Yesterday": "Yesterday",
    "Tomorrow": "Tomorrow",
    "Duration": "Duration: {0}",
    "IndexDuration": "Index Duration: {0}",
    "ProxyDuration": "Proxy Duration: {0}",
    "ClientDuration": "Client Duration: {0}",
    "Unavailable": "Unavailable",
    "Reply": "Reply",
    "ReplyAll": "Reply All",
    "Forward": "Forward",
    "From": "From",
    "Caption": "Caption",
    "Expression": "Expression",
    "Tab": "Tab",
    "Tabs": "Tabs",
    "EnterExpressionName": "Enter expression name",
    "EnterExpressionToFilterWith": "Enter expression to filter results with",
    "SelectTab": "Select Tab",
    "SelectAll": "Select All",
    "PageUrl": "Search page URL",
    "ErrorSavingToDevice": "Error while saving the information to your device",
    "ErrorReadingFromDevice": "Error while reading the information from your device",
    "AppIntro": "Speak with a product specialist who can answer your questions about Coveo and help you decide which Coveo solution is right for you. Or, try a live demo !",
    "TryDemo": "Try the demo",
    "ContactUs": "Contact us",
    "NewToCoveo": "New to Coveo?",
    "LetUsHelpGetStarted": "Let us help you get started",
    "LikesThis": "{0} like<sn>s</sn> this.",
    "CannotConnectSearchPage": "Cannot connect to your search page",
    "AreYouSureDeleteFilter": "Are you sure you want to delete the filter {0} with the expression {1}",
    "OnlineHelp": "Online Help",
    "Done": "Done",
    "SaveFacetState": "Save this facet state",
    "ClearFacetState": "Clear facet state",
    "DisplayingTheOnlyMessage": "Displaying the only message in this conversation",
    "NoNetworkConnection": "No network connection",
    "UnknownConnection": "Unknown connection",
    "EthernetConnection": "Ethernet connection",
    "WiFi": "WiFi connection",
    "CELL": "Cellular connection",
    "CELL_2G": "Cellular 2G connection",
    "CELL_3G": "Cellular 3G connection",
    "CELL_4G": "Cellular 4G connection",
    "Relevance": "Relevance",
    "Date": "Date",
    "Amount": "Amount",
    "QueryExceptionNoException": "No exception",
    "QueryExceptionInvalidSyntax": "Invalid syntax",
    "QueryExceptionInvalidCustomField": "Invalid custom field",
    "QueryExceptionInvalidDate": "Invalid date",
    "QueryExceptionInvalidExactPhrase": "Invalid exact phrase",
    "QueryExceptionInvalidDateOp": "Invalid date operator",
    "QueryExceptionInvalidNear": "Invalid NEAR operator",
    "QueryExceptionInvalidWeightedNear": "Invalid weighted NEAR",
    "QueryExceptionInvalidTerm": "Invalid term",
    "QueryExceptionTooManyTerms": "Too many terms",
    "QueryExceptionWildcardTooGeneral": "Wildcard too general",
    "QueryExceptionInvalidSortField": "Invalid sort field",
    "QueryExceptionInvalidSmallStringOp": "Invalid small string operator",
    "QueryExceptionRequestedResultsMax": "Requested results maximum",
    "QueryExceptionAggregatedMirrorDead": "Aggregated mirror is offline",
    "QueryExceptionAggregatedMirrorQueryTimeOut": "Aggregated mirror query timeout",
    "QueryExceptionAggregatedMirrorInvalidBuildNumber": "Aggregated mirror invalid build number",
    "QueryExceptionAggregatedMirrorCannotConnect": "Aggregated mirror cannot connect",
    "QueryExceptionNotEnoughLeadingCharsWildcard": "Not enough leading character wildcard",
    "QueryExceptionSecurityInverterNotFound": "Security inverter not found",
    "QueryExceptionSecurityInverterAccessDenied": "Security inverter access denied",
    "QueryExceptionAggregatedMirrorCannotImpersonate": "Aggregated mirror cannot impersonate",
    "QueryExceptionUnexpected": "Unexpected",
    "QueryExceptionAccessDenied": "Access denied",
    "QueryExceptionSuperUserTokenInvalid": "Super user token invalid",
    "QueryExceptionSuperUserTokenExpired": "Super user token is expired",
    "QueryExceptionLicenseQueriesExpired": "Queries license expired",
    "QueryExceptionLicenseSuperUserTokenNotSupported": "License super user token not supported",
    "QueryExceptionInvalidSession": "Invalid session",
    "QueryExceptionInvalidDocument": "Invalid document",
    "QueryExceptionSearchDisabled": "Search disabled",
    "FileType": "File type",
    "ShowAttachment": "Show attachment",
    "OnFeed": "on {0}'s feed.",
    "Author": "Author",
    "NoTitle": "No title",
    "CurrentSelections": "Current selections",
    "AllContent": "All content",
    "CancelLastAction": "Cancel last action",
    "SearchTips": "Search tips",
    "CheckSpelling": "Check the spelling of your keywords.",
    "TryUsingFewerKeywords": "Try using fewer, different or more general keywords.",
    "SelectFewerFilters": "Select fewer filters to broaden your search.",
    "Document": "Document",
    "Time": "Time",
    "StartDate": "Start Date",
    "StartTime": "Start Time",
    "DurationTitle": "Duration",
    "UserQuery": "User query",
    "ShowUserActions": "Show User Actions",
    "NoData": "No data available",
    "EventType": "Event type",
    "GoToFullSearch": "Full search",
    "GoToEdition": "Customize Panel",
    "RemoveContext": "Remove context",
    "BoxAttachToCase": "Attach to case",
    "AttachToCase": "Attach to case",
    "Attach": "Attach",
    "Attached": "Attached",
    "Detach": "Detach",
    "Details": "Details",
    "AdditionalFilters": "Additional filters",
    "SelectNonContextualSearch": "Remove the context from the current record to broaden your search",
    "CopyPasteToSupport": "Copy paste this message to the Coveo Support team for more information.",
    "FollowQueryDescription": "Alert me for changes to the search results of this query.",
    "SearchAlerts_Panel": "Manage Alerts",
    "SearchAlerts_PanelDescription": "View and manage your search alerts.",
    "SearchAlerts_PanelNoSearchAlerts": "You have no subscriptions.",
    "SearchAlerts_Fail": "The Search Alerts service is currently unavailable.",
    "SearchAlerts_Type": "Type",
    "SearchAlerts_Content": "Content",
    "SearchAlerts_Actions": "Action",
    "EmptyQuery": "<empty>",
    "SearchAlerts_Type_followQuery": "Query",
    "SearchAlerts_Type_followDocument": "Item",
    "SearchAlerts_unFollowing": "Stop Following",
    "SearchAlerts_follow": "Follow",
    "SearchAlerts_followed": "Followed",
    "SearchAlerts_followQuery": "Follow Query",
    "Subscription_StopFollowingQuery": "Stop Following Query",
    "SearchAlerts_Frequency": "When",
    "SubscriptionsManageSubscriptions": "Manage Alerts",
    "SubscriptionsMessageFollowQuery": "You will receive alerts when the query <b>{0}</b> returns new or updated items.",
    "SubscriptionsMessageFollow": "You will receive alerts for changes to the item <b>{0}</b>.",
    "Expiration": "Expiration",
    "Monthly": "Monthly",
    "Daily": "Daily",
    "Monday": "Monday",
    "Tuesday": "Tuesday",
    "Wednesday": "Wednesday",
    "Thursday": "Thursday",
    "Friday": "Friday",
    "Saturday": "Saturday",
    "Sunday": "Sunday",
    "NextDay": "Next {0}",
    "LastDay": "Last {0}",
    "StartTypingCaseForSuggestions": "Describe your problem to see possible solutions",
    "ExportToExcel": "Export to Excel",
    "ExportToExcelDescription": "Export search results to Excel",
    "CaseCreationNoResults": "No recommended solutions were found",
    "SortBy": "Sort by",
    "BoxCreateArticle": "Create Article",
    "Facets": "Facets",
    "AdvancedSearch": "Advanced Search",
    "Keywords": "Keywords",
    "AllTheseWords": "All these words",
    "ExactPhrase": "This exact phrase",
    "AnyOfTheseWords": "Any of these words",
    "NoneOfTheseWords": "None of these words",
    "Anytime": "Anytime",
    "InTheLast": "In the last",
    "Days": "days",
    "Months": "months",
    "Month": "Month",
    "Year": "Year",
    "Between": "Between",
    "Language": "Language",
    "Size": "Size",
    "AtLeast": "at least",
    "AtMost": "at most",
    "Contains": "contains",
    "DoesNotContain": "does not contain",
    "Matches": "matches",
    "Bytes": "bytes",
    "card": "Card",
    "table": "Table",
    "ResultLinks": "Result links",
    "EnableQuerySyntax": "Enable query syntax",
    "On": "On",
    "Off": "Off",
    "Automatic": "Automatic",
    "ResultsPerPage": "Results per page",
    "PreviousMonth": "Previous month",
    "NextMonth": "Next month",
    "Title": "Title",
    "FiltersInAdvancedSearch": "Filters in Advanced Search",
    "NoEndpoints": "{0} has no registered endpoints.",
    "InvalidToken": "The token used is invalid.",
    "AddSources": "You will need to add sources in your index, or wait for the created sources to finish indexing.",
    "TryAgain": "Please try again.",
    "CoveoOnlineHelp": "Coveo Online Help",
    "CannotAccess": "{0} cannot be accessed.",
    "CoveoOrganization": "Coveo Organization",
    "SearchAPIDuration": "Search API Duration: {0}",
    "LastUpdated": "Last updated",
    "AllDates": "All dates",
    "WithinLastDay": "Within last day",
    "WithinLastWeek": "Within last week",
    "WithinLastMonth": "Within last month",
    "WithinLastYear": "Within last year",
    "RelevanceInspector": "Relevance Inspector",
    "KeywordInCategory": "{0} <span class=\"coveo-omnibox-suggestion-category\">in {1}</span>",
    "Result": "Result",
    "ResultCount": "{0} result<pl>s</pl>",
    "ShowingResults": "{0} result<pl>s</pl>",
    "ShowingResultsWithQuery": "{0} result<pl>s</pl> for {1}",
    "NumberOfVideos": "Number of videos",
    "AllCategories": "All Categories",
    "Recommended": "Recommended",
    "Featured": "Featured",
    "CoveoHomePage": "Coveo Home page",
    "SizeValue": "Size value",
    "UnitMeasurement": "Unit of measurement",
    "Toggle": "Toggle",
    "FilterOn": "Filter on {0}",
    "RemoveFilterOn": "Remove inclusion filter on {0}",
    "Enter": "Enter",
    "InsertAQuery": "Insert a query",
    "PressEnterToSend": "Press enter to send",
    "SortResultsBy": "Sort results by {0}",
    "SortResultsByAscending": "Sort by {0} in ascending order",
    "SortResultsByDescending": "Sort by {0} in descending order",
    "DisplayResultsAs": "Display results as {0}",
    "FacetTitle": "{0} facet",
    "IncludeValueWithResultCount": "Inclusion filter on {0}; {1}",
    "ExcludeValueWithResultCount": "Exclusion filter on {0}; {1}",
    "PageNumber": "Page {0}",
    "DisplayResultsPerPage": "Display {0} results per page",
    "GroupByAndFacetRequestsCannotCoexist": "The query is invalid because it contains both Group By and Facet requests. Ensure that the search interface does not initialize DynamicFacet components alongside Facet components (or alongside any component extending the Facet component, such as FacetRange or FacetSlider).",
    "MustContain": "Must contain:",
    "Missing": "Missing:",
    "Filters": "Filters",
    "FiltersDropdown": "Filters dropdown",
    "OpenFiltersDropdown": "Open the filters dropdown",
    "CloseFiltersDropdown": "Close the filters dropdown",
    "NoValuesFound": "No values found.",
    "To": "to",
    "DeselectFilterValues": "Deselect all active filters on {0} field",
    "Rated": "Rated {0} out of {1} star<pl>s</pl>",
    "RatedBy": "by {0} user<pl>s</pl>",
    "NoRatings": "No ratings",
    "Pagination": "Pagination",
    "ThumbnailOf": "Thumbnail of \"{0}\"",
    "CollapsedUriParts": "Collapsed URI parts",
    "HierarchicalFacetValueIndentedUnder": "{0} under {1}",
    "HierarchicalFacetValuePathPrefix": "in",
    "UsefulnessFeedbackRequest": "Was this useful?",
    "UsefulnessFeedbackThankYou": "Thanks for your feedback!",
    "UsefulnessFeedbackExplainWhy": "Explain why",
    "UsefulnessFeedbackExplainWhyImperative": "Explain why",
    "UsefulnessFeedbackDoesNotAnswer": "This didn't answer my question at all",
    "UsefulnessFeedbackPartiallyAnswers": "This only partially answered my question",
    "UsefulnessFeedbackWasNotAQuestion": "My request wasn't meant to be perceived as a question",
    "Yes": "Yes",
    "No": "No",
    "Other": "Other",
    "Send": "Send",
    "Edit": "Edit",
    "Delete": "Delete",
    "Save": "Save",
    "UsefulnessFeedbackReason": "Reason",
    "AnswerSnippet": "Answer to your question",
    "AnswerSpecificSnippet": "Answer to \"{0}\"",
    "SuggestedQuestions": "People also ask",
    "ExpandQuestionAnswer": "View answer for \"{0}\"",
    "MoreValuesAvailable": "additional values are available",
    "Breadcrumb": "Active filters",
    "OrganizationIsPaused": "Your Coveo organization is paused due to inactivity and search is currently unavailable.",
    "OrganizationWillResume": "Your organization is resuming and will be available shortly.",
    "UpdatingResults": "Updating results",
    "QuerySuggestionsAvailable": "{0} search suggestion<pl>s are</pl> available.",
    "QuerySuggestionsUnavailable": "There are no search suggestions.",
};
function defaultLanguage() {
    var locales = String["locales"] || (String["locales"] = {});
    locales["en"] = merge(locales["en"], dict);
    String["toLocaleString"].call(this, { "en": dict });
    String["locale"] = "en";
    String["defaultLocale"] = "en";
    Globalize.culture("en");
}
exports.defaultLanguage = defaultLanguage;
function setLanguageAfterPageLoaded() {
    var locales = String["locales"] || (String["locales"] = {});
    locales["en"] = merge(locales["en"], dict);
    String["toLocaleString"].call(this, { "en": dict });
    String["locale"] = "en";
    String["defaultLocale"] = "en";
    Globalize.culture("en");
}
exports.setLanguageAfterPageLoaded = setLanguageAfterPageLoaded;


/***/ }),
/* 153 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var ExternalModulesShim_1 = __webpack_require__(26);
var _ = __webpack_require__(0);
String.toLocaleString = ExternalModulesShim_1.LocaleString;
var pluralRegex = /<pl>(((?!<\/pl>).)*)<\/pl>/g;
var singularRegex = /<sn>(((?!<\/sn>).)*)<\/sn>/g;
exports.L10N = {
    format: function (key) {
        var args = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            args[_i - 1] = arguments[_i];
        }
        var value = key.toLocaleString();
        // Try to find a soft match
        // These conditions check if there was a change in the string (meaning toLocaleString found a match). If there was no
        // match, try another format.
        if (value == key) {
            var tryTranslationInUpperCase = key.toUpperCase().toLocaleString();
            var tryTranslationInLowerCase = key.toLowerCase().toLocaleString();
            var tryTranslationAfterCapitalization = (key.charAt(0).toUpperCase() + key.toLowerCase().slice(1)).toLocaleString();
            if (tryTranslationInUpperCase != key.toUpperCase().toLocaleString()) {
                value = tryTranslationInUpperCase;
            }
            else if (tryTranslationInLowerCase != key.toLowerCase().toLocaleString()) {
                value = tryTranslationInLowerCase;
            }
            else if (tryTranslationAfterCapitalization != key.charAt(0).toUpperCase() + key.toLowerCase().slice(1)) {
                value = tryTranslationAfterCapitalization;
            }
        }
        if (args.length > 0) {
            var last = _.last(args);
            // Last argument is either the count or a boolean forcing plural (true) or singular (false)
            if (_.isBoolean(last) || _.isNumber(last)) {
                args.pop();
                value = exports.L10N.formatPlSn(value, last);
            }
            _.each(args, function (arg, i) { return (value = value.replace("{" + i + "}", arg)); });
        }
        else {
            // If there was no parameters passed, we try to cleanup the possible parameters in the translated string.
            value = value.replace(/{[0-9]}|<pl>[a-zA-Z]+<\/pl>|<sn>|<\/sn>/g, '').trim();
        }
        return value;
    },
    formatPlSn: function (value, count) {
        var isPlural = _.isBoolean(count) ? count : count !== 1 && count !== -1;
        if (isPlural) {
            value = value.replace(pluralRegex, '$1').replace(singularRegex, '');
        }
        else {
            value = value.replace(pluralRegex, '').replace(singularRegex, '$1');
        }
        return value;
    }
};


/***/ }),
/* 154 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var Assert_1 = __webpack_require__(5);
var Logger_1 = __webpack_require__(9);
var AnalyticsEndpointCaller_1 = __webpack_require__(331);
var UrlUtils_1 = __webpack_require__(43);
var Utils_1 = __webpack_require__(4);
var AnalyticsInformation_1 = __webpack_require__(50);
var AnalyticsEndpoint = /** @class */ (function () {
    function AnalyticsEndpoint(options) {
        this.options = options;
        this.logger = new Logger_1.Logger(this);
        var endpointCallerOptions = {
            accessToken: this.options.accessToken.token
        };
        this.endpointCaller = new AnalyticsEndpointCaller_1.AnalyticsEndpointCaller(endpointCallerOptions);
        this.organization = options.organization;
    }
    AnalyticsEndpoint.getURLFromSearchEndpoint = function (endpoint) {
        if (!endpoint || !endpoint.options || !endpoint.options.restUri) {
            return this.DEFAULT_ANALYTICS_URI;
        }
        var basePlatform = endpoint.options.restUri.replace(/^(https?:\/\/)platform/, '$1analytics').split('/rest')[0];
        return basePlatform + '/rest/ua';
    };
    AnalyticsEndpoint.prototype.getCurrentVisitId = function () {
        return this.visitId;
    };
    AnalyticsEndpoint.prototype.getCurrentVisitIdPromise = function () {
        var _this = this;
        return new Promise(function (resolve, reject) {
            if (_this.getCurrentVisitId()) {
                resolve(_this.getCurrentVisitId());
            }
            else {
                var url = _this.buildAnalyticsUrl('/analytics/visit');
                _this.getFromService(url, {})
                    .then(function (response) {
                    _this.visitId = response.id;
                    resolve(_this.visitId);
                })
                    .catch(function (response) {
                    reject(response);
                });
            }
        });
    };
    AnalyticsEndpoint.prototype.sendSearchEvents = function (searchEvents) {
        if (searchEvents.length > 0) {
            this.logger.info('Logging analytics search events', searchEvents);
            return this.sendToService(searchEvents, 'searches', 'searchEvents');
        }
    };
    AnalyticsEndpoint.prototype.sendDocumentViewEvent = function (documentViewEvent) {
        Assert_1.Assert.exists(documentViewEvent);
        this.logger.info('Logging analytics document view', documentViewEvent);
        return this.sendToService(documentViewEvent, 'click', 'clickEvent');
    };
    AnalyticsEndpoint.prototype.sendCustomEvent = function (customEvent) {
        Assert_1.Assert.exists(customEvent);
        this.logger.info('Logging analytics custom event', customEvent);
        return this.sendToService(customEvent, 'custom', 'customEvent');
    };
    AnalyticsEndpoint.prototype.getTopQueries = function (params) {
        var url = this.buildAnalyticsUrl('/stats/topQueries');
        return this.getFromService(url, params);
    };
    AnalyticsEndpoint.prototype.clearCookies = function () {
        new AnalyticsInformation_1.AnalyticsInformation().clear();
    };
    AnalyticsEndpoint.prototype.sendToService = function (data, path, paramName) {
        return __awaiter(this, void 0, void 0, function () {
            var url, request, results, error_1, successfullyRenewed;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!(AnalyticsEndpoint.pendingRequest != null)) return [3 /*break*/, 2];
                        return [4 /*yield*/, AnalyticsEndpoint.pendingRequest];
                    case 1:
                        _a.sent();
                        _a.label = 2;
                    case 2:
                        url = this.getURL(path);
                        request = this.executeRequest(url, data);
                        _a.label = 3;
                    case 3:
                        _a.trys.push([3, 5, , 8]);
                        return [4 /*yield*/, request];
                    case 4:
                        results = _a.sent();
                        AnalyticsEndpoint.pendingRequest = null;
                        this.handleAnalyticsEventResponse(results.data);
                        return [2 /*return*/, results.data];
                    case 5:
                        error_1 = _a.sent();
                        AnalyticsEndpoint.pendingRequest = null;
                        if (!this.isAnalyticsTokenExpired(error_1)) return [3 /*break*/, 7];
                        return [4 /*yield*/, this.options.accessToken.doRenew()];
                    case 6:
                        successfullyRenewed = _a.sent();
                        if (successfullyRenewed) {
                            return [2 /*return*/, this.sendToService(data, path, paramName)];
                        }
                        _a.label = 7;
                    case 7: throw error_1;
                    case 8: return [2 /*return*/];
                }
            });
        });
    };
    AnalyticsEndpoint.prototype.isAnalyticsTokenExpired = function (error) {
        return error != null && error.statusCode === 400 && error.data && error.data.type === 'InvalidToken';
    };
    AnalyticsEndpoint.prototype.executeRequest = function (urlNormalized, data) {
        var request = this.endpointCaller.call({
            errorsAsSuccess: false,
            method: 'POST',
            queryString: urlNormalized.queryNormalized,
            requestData: data,
            url: urlNormalized.path,
            responseType: 'text',
            requestDataType: 'application/json'
        });
        if (request) {
            AnalyticsEndpoint.pendingRequest = request;
            return request;
        }
        // In some case, (eg: using navigator.sendBeacon), there won't be any response to read from the service
        // In those case, send back an empty object upstream.
        return Promise.resolve({
            data: {
                visitId: '',
                visitorId: ''
            },
            duration: 0
        });
    };
    AnalyticsEndpoint.prototype.getURL = function (path) {
        var versionToCall = AnalyticsEndpoint.CUSTOM_ANALYTICS_VERSION || AnalyticsEndpoint.DEFAULT_ANALYTICS_VERSION;
        var urlNormalized = UrlUtils_1.UrlUtils.normalizeAsParts({
            paths: [this.options.serviceUrl, versionToCall, '/analytics/', path],
            query: {
                org: this.organization
            }
        });
        return urlNormalized;
    };
    AnalyticsEndpoint.prototype.getFromService = function (url, params) {
        var paramsToSend = __assign({}, params, { access_token: this.options.accessToken.token });
        return this.endpointCaller
            .call({
            errorsAsSuccess: false,
            method: 'GET',
            queryString: this.options.organization ? ['org=' + Utils_1.Utils.safeEncodeURIComponent(this.options.organization)] : [],
            requestData: paramsToSend,
            responseType: 'json',
            url: url
        })
            .then(function (res) {
            return res.data;
        });
    };
    AnalyticsEndpoint.prototype.handleAnalyticsEventResponse = function (response) {
        var visitId;
        if (response['visitId']) {
            visitId = response['visitId'];
        }
        else if (response['searchEventResponses']) {
            visitId = underscore_1.first(response['searchEventResponses']).visitId;
        }
        if (visitId) {
            this.visitId = visitId;
        }
        return response;
    };
    AnalyticsEndpoint.prototype.buildAnalyticsUrl = function (path) {
        return UrlUtils_1.UrlUtils.normalizeAsString({
            paths: [this.options.serviceUrl, AnalyticsEndpoint.CUSTOM_ANALYTICS_VERSION || AnalyticsEndpoint.DEFAULT_ANALYTICS_VERSION, path]
        });
    };
    AnalyticsEndpoint.DEFAULT_ANALYTICS_URI = 'https://analytics.cloud.coveo.com/rest/ua';
    AnalyticsEndpoint.DEFAULT_ANALYTICS_VERSION = 'v15';
    AnalyticsEndpoint.CUSTOM_ANALYTICS_VERSION = undefined;
    return AnalyticsEndpoint;
}());
exports.AnalyticsEndpoint = AnalyticsEndpoint;


/***/ }),
/* 155 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var QueryController_1 = __webpack_require__(44);
exports.QueryController = QueryController_1.QueryController;
var HistoryController_1 = __webpack_require__(156);
exports.HistoryController = HistoryController_1.HistoryController;
var LocalStorageHistoryController_1 = __webpack_require__(157);
exports.LocalStorageHistoryController = LocalStorageHistoryController_1.LocalStorageHistoryController;


/***/ }),
/* 156 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var InitializationEvents_1 = __webpack_require__(17);
var Dom_1 = __webpack_require__(1);
var HashUtils_1 = __webpack_require__(42);
var Defer_1 = __webpack_require__(31);
var RootComponent_1 = __webpack_require__(45);
var Utils_1 = __webpack_require__(4);
var _ = __webpack_require__(0);
var QueryStateModel_1 = __webpack_require__(13);
var AnalyticsActionListMeta_1 = __webpack_require__(10);
var SharedAnalyticsCalls_1 = __webpack_require__(126);
var Model_1 = __webpack_require__(18);
/**
 * This component is instantiated automatically by the framework on the root if the {@link SearchInterface}.<br/>
 * When the {@link SearchInterface.options.enableHistory} option is set to true, this component is instantiated.<br/>
 * It's only job is to apply changes in the {@link QueryStateModel} to the hash in the URL, and vice versa.<br/>
 * This component does *not* hold the state of the interface, it only represent it in the URL.
 */
var HistoryController = /** @class */ (function (_super) {
    __extends(HistoryController, _super);
    /**
     * Create a new HistoryController
     * @param element
     * @param window
     * @param queryStateModel
     * @param queryController
     * @param usageAnalytics **Deprecated.** Since the [October 2019 Release (v2.7219)](https://docs.coveo.com/en/3084/), the class retrieves and uses the {@link AnalyticsClient} from the `queryController` constructor parameter.
     */
    function HistoryController(element, window, queryStateModel, queryController, usageAnalytics) {
        var _this = _super.call(this, element, HistoryController.ID) || this;
        _this.window = window;
        _this.queryStateModel = queryStateModel;
        _this.queryController = queryController;
        _this.willUpdateHash = false;
        Assert_1.Assert.exists(_this.queryStateModel);
        Assert_1.Assert.exists(_this.queryController);
        Dom_1.$$(_this.element).on(InitializationEvents_1.InitializationEvents.restoreHistoryState, function () {
            _this.logger.trace('Restore history state. Update model');
            _this.updateModelFromHash();
            _this.lastState = _this.queryStateModel.getAttributes();
        });
        Dom_1.$$(_this.element).on(_this.queryStateModel.getEventName(Model_1.Model.eventTypes.all), function () {
            _this.logger.trace('Query model changed. Update hash');
            _this.updateHashFromModel();
        });
        _this.hashchange = function () {
            _this.handleHashChange();
            _this.lastState = _this.queryStateModel.getAttributes();
        };
        _this.window.addEventListener('hashchange', _this.hashchange);
        Dom_1.$$(_this.element).on(InitializationEvents_1.InitializationEvents.nuke, function () { return _this.handleNuke(); });
        return _this;
    }
    Object.defineProperty(HistoryController.prototype, "usageAnalytics", {
        get: function () {
            return this.queryController.usageAnalytics;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(HistoryController.prototype, "hashUtils", {
        get: function () {
            return this.hashUtilsModule ? this.hashUtilsModule : HashUtils_1.HashUtils;
        },
        set: function (hashUtils) {
            this.hashUtilsModule = hashUtils;
        },
        enumerable: true,
        configurable: true
    });
    HistoryController.prototype.setState = function (state) {
        this.setHashValues(state);
    };
    HistoryController.prototype.replaceState = function (state) {
        var hash = '#' + this.hashUtils.encodeValues(state);
        this.window.location.replace(hash);
    };
    HistoryController.prototype.replaceUrl = function (url) {
        this.window.location.replace(url);
    };
    /**
     * Set the given map of key value in the hash of the URL
     * @param values
     */
    HistoryController.prototype.setHashValues = function (values) {
        this.logger.trace('Update history hash');
        var encoded = this.hashUtils.encodeValues(values);
        var hash = encoded ? "#" + encoded : '';
        var hashHasChanged = this.window.location.hash != hash;
        this.logger.trace('from', this.window.location.hash, 'to', hash);
        var location = this.window.location;
        var url = "" + location.pathname + location.search + hash;
        if (this.queryController.firstQuery) {
            if (hashHasChanged) {
                // Using replace avoids adding an entry in the History of the browser.
                // This means that this new URL will become the new initial URL.
                this.replaceUrl(url);
                this.logger.trace('History hash modified', hash);
            }
        }
        else if (hashHasChanged) {
            this.window.history.pushState('', '', url);
            this.logger.trace('History hash created', hash);
        }
    };
    HistoryController.prototype.debugInfo = function () {
        return {
            state: this.queryStateModel.getAttributes()
        };
    };
    HistoryController.prototype.handleHashChange = function () {
        this.logger.trace('History hash changed');
        var attributesThatGotApplied = this.updateModelFromHash();
        if (_.difference(attributesThatGotApplied, HistoryController.attributesThatDoNotTriggerQuery).length > 0) {
            if (this.lastState) {
                var differenceWithLastState = Utils_1.Utils.differenceBetweenObjects(this.queryStateModel.getAttributes(), this.lastState);
                this.mapStateDifferenceToUsageAnalyticsCall(differenceWithLastState);
            }
            this.queryController.executeQuery();
        }
    };
    HistoryController.prototype.handleNuke = function () {
        this.window.removeEventListener('hashchange', this.hashchange);
    };
    HistoryController.prototype.updateHashFromModel = function () {
        var _this = this;
        this.logger.trace('Model -> history hash');
        if (!this.willUpdateHash) {
            Defer_1.Defer.defer(function () {
                var attributes = _this.queryStateModel.getAttributes();
                _this.setHashValues(attributes);
                _this.logger.debug('Saving state to hash', attributes);
                _this.willUpdateHash = false;
            });
            this.willUpdateHash = true;
        }
    };
    HistoryController.prototype.updateModelFromHash = function () {
        var _this = this;
        this.logger.trace('History hash -> model');
        var toSet = {};
        var diff = [];
        _.each(this.queryStateModel.attributes, function (value, key, obj) {
            var valToSet = _this.getHashValue(key);
            toSet[key] = valToSet;
            if ("" + _this.queryStateModel.get(key) !== "" + valToSet) {
                diff.push(key);
            }
        });
        this.queryStateModel.setMultiple(toSet);
        return diff;
    };
    HistoryController.prototype.getHashValue = function (key) {
        Assert_1.Assert.isNonEmptyString(key);
        var value;
        try {
            var hash = this.hashUtils.getHash(this.window);
            value = this.hashUtils.getValue(key, hash);
        }
        catch (error) {
            this.logger.error("Could not parse parameter " + key + " from URI");
        }
        if (Utils_1.Utils.isUndefined(value)) {
            value = this.queryStateModel.defaultAttributes[key];
        }
        return value;
    };
    HistoryController.prototype.mapStateDifferenceToUsageAnalyticsCall = function (stateDifference) {
        // In this method, we want to only match a single analytics event for the current state change.
        // Even though it's technically possible that many property changed at the same time since the last state,
        // the backend UA service does not support multiple search cause for a single search event.
        // So we find the first event that match (if any), by order of importance (query expression > sort > facet)
        var _this = this;
        if (!this.usageAnalytics) {
            this.logger.warn("The query state has been modified directly in the URL and we couldn't log the proper analytics call.");
            this.logger.warn('This is caused by a history controller that has been initialized without the usage analytics parameter.');
            return;
        }
        if (QueryStateModel_1.QUERY_STATE_ATTRIBUTES.Q in stateDifference) {
            SharedAnalyticsCalls_1.logSearchBoxSubmitEvent(this.usageAnalytics);
            return;
        }
        else if (QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT in stateDifference) {
            SharedAnalyticsCalls_1.logSortEvent(this.usageAnalytics, stateDifference[QueryStateModel_1.QUERY_STATE_ATTRIBUTES.SORT]);
            return;
        }
        else {
            // Facet id are not known at compilation time, so we iterate on all keys,
            // and try to determine if at least one is linked to a facet selection or exclusion.
            _.keys(stateDifference).forEach(function (key) {
                var facetInfo = _this.extractFacetInfoFromStateDifference(key);
                if (facetInfo) {
                    _this.usageAnalytics.logSearchEvent(facetInfo.actionCause, {
                        facetId: facetInfo.fieldName,
                        facetField: facetInfo.fieldName,
                        facetTitle: facetInfo.fieldName,
                        facetValue: facetInfo.valueModified
                    });
                }
            });
        }
    };
    HistoryController.prototype.extractFacetInfoFromStateDifference = function (key) {
        var regexForFacetInclusion = /^f:(?!.*:not)(.*)/;
        var matchForInclusion = regexForFacetInclusion.exec(key);
        var regexForFacetExclusion = /^f:(.*):not/;
        var matchForExclusion = regexForFacetExclusion.exec(key);
        var currentValue = this.queryStateModel.get(key) || [];
        var lastValue = this.lastState[key] || [];
        var valueRemoved = currentValue.length < lastValue.length;
        var valueModified;
        if (valueRemoved) {
            valueModified = _.first(_.difference(lastValue, currentValue));
        }
        else {
            valueModified = _.first(_.difference(currentValue, lastValue));
        }
        if (matchForInclusion) {
            var fieldName = matchForInclusion[1];
            var actionCause = void 0;
            if (valueRemoved) {
                actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.facetDeselect;
            }
            else {
                actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.facetSelect;
            }
            return {
                fieldName: fieldName,
                actionCause: actionCause,
                valueModified: valueModified
            };
        }
        if (matchForExclusion) {
            var fieldName = matchForExclusion[1];
            var actionCause = void 0;
            if (valueRemoved) {
                actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.facetUnexclude;
            }
            else {
                actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.facetExclude;
            }
            return {
                fieldName: fieldName,
                actionCause: actionCause,
                valueModified: valueModified
            };
        }
        return null;
    };
    HistoryController.ID = 'HistoryController';
    HistoryController.attributesThatDoNotTriggerQuery = ['quickview'];
    return HistoryController;
}(RootComponent_1.RootComponent));
exports.HistoryController = HistoryController;


/***/ }),
/* 157 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var LocalStorageUtils_1 = __webpack_require__(41);
var Model_1 = __webpack_require__(18);
var Logger_1 = __webpack_require__(9);
var Assert_1 = __webpack_require__(5);
var InitializationEvents_1 = __webpack_require__(17);
var RootComponent_1 = __webpack_require__(45);
var Dom_1 = __webpack_require__(1);
var underscore_1 = __webpack_require__(0);
/**
 * This component acts like the {@link HistoryController} excepts that is saves the {@link QueryStateModel} in the local storage.<br/>
 * This will not allow 'back' and 'forward' navigation in the history, like the standard {@link HistoryController} allows. Instead, it load the query state only on page load.<br/>
 * To enable this component, you should set the {@link SearchInterface.options.useLocalStorageForHistory} as well as the {@link SearchInterface.options.enableHistory} options to true.
 */
var LocalStorageHistoryController = /** @class */ (function (_super) {
    __extends(LocalStorageHistoryController, _super);
    /**
     * Create a new LocalStorageHistoryController instance
     * @param element
     * @param windoh For mock purpose
     * @param model
     * @param queryController
     */
    function LocalStorageHistoryController(element, windoh, model, queryController) {
        var _this = _super.call(this, element, LocalStorageHistoryController.ID) || this;
        _this.windoh = windoh;
        _this.model = model;
        _this.queryController = queryController;
        _this.omit = [];
        if (!LocalStorageUtils_1.localStorageExists) {
            new Logger_1.Logger(element).info('No local storage available in current browser. LocalStorageHistoryController cannot initialize itself', _this);
        }
        else {
            _this.storage = new LocalStorageUtils_1.LocalStorageUtils(LocalStorageHistoryController.ID);
            Assert_1.Assert.exists(_this.model);
            Assert_1.Assert.exists(_this.queryController);
            Dom_1.$$(_this.element).on(InitializationEvents_1.InitializationEvents.restoreHistoryState, function () { return _this.initModelFromLocalStorage(); });
            Dom_1.$$(_this.element).on(_this.model.getEventName(Model_1.Model.eventTypes.all), function () { return _this.updateLocalStorageFromModel(); });
        }
        return _this;
    }
    LocalStorageHistoryController.prototype.replaceState = function (state) {
        this.storage.save(state);
    };
    /**
     * Specifies an array of attributes from the query state model that should not be persisted in the local storage
     * @param attributes
     */
    LocalStorageHistoryController.prototype.withoutThoseAttribute = function (attributes) {
        this.omit = attributes;
    };
    LocalStorageHistoryController.prototype.setState = function (values) {
        this.storage.save(values);
    };
    LocalStorageHistoryController.prototype.updateLocalStorageFromModel = function () {
        var attributes = underscore_1.omit(this.model.getAttributes(), this.omit);
        this.setState(attributes);
        this.logger.debug('Saving state to localstorage', attributes);
    };
    LocalStorageHistoryController.prototype.initModelFromLocalStorage = function () {
        var model = this.localStorageModel;
        this.model.setMultiple(model);
    };
    Object.defineProperty(LocalStorageHistoryController.prototype, "localStorageModel", {
        get: function () {
            var _this = this;
            var model = {};
            var storedValues = this.storage.load() || {};
            underscore_1.each(this.model.attributes, function (value, key) {
                var storedValue = storedValues[key];
                var defaultValue = _this.model.defaultAttributes[key];
                var valueToSet = storedValue == undefined ? defaultValue : storedValue;
                model[key] = valueToSet;
            });
            return model;
        },
        enumerable: true,
        configurable: true
    });
    LocalStorageHistoryController.ID = 'LocalStorageHistoryController';
    return LocalStorageHistoryController;
}(RootComponent_1.RootComponent));
exports.LocalStorageHistoryController = LocalStorageHistoryController;


/***/ }),
/* 158 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var StringUtils_1 = __webpack_require__(22);
var ResponsiveComponents_1 = __webpack_require__(55);
var _ = __webpack_require__(0);
var TemplateConditionEvaluator = /** @class */ (function () {
    function TemplateConditionEvaluator() {
    }
    TemplateConditionEvaluator.getFieldFromString = function (text) {
        var acceptableCharacterInFieldName = '[a-z0-9_]';
        var fieldWithAtSymbolPrefix = "@(" + acceptableCharacterInFieldName + "+)\\b";
        var rawFieldAccessedUsingDotOperator = "\\braw\\.(" + acceptableCharacterInFieldName + "+)\\b";
        var fieldBetweenDoubleQuotes = "\"[^\"]*?(" + acceptableCharacterInFieldName + "+)[^\"]*?\"";
        var fieldBetweenSingleQuotes = "'[^']*?(" + acceptableCharacterInFieldName + "+)[^']*?'";
        var rawFieldAccessedUsingString = "\\braw\\[(?:" + fieldBetweenDoubleQuotes + "|" + fieldBetweenSingleQuotes + ")\\]";
        var fieldUsedInCondition = "data-condition-field-(?:not-)?(" + acceptableCharacterInFieldName + "+)=";
        var fieldMatcher = new RegExp(fieldWithAtSymbolPrefix + "|" + rawFieldAccessedUsingDotOperator + "|" + rawFieldAccessedUsingString + "|" + fieldUsedInCondition, 'gi');
        var matchedFields = StringUtils_1.StringUtils.match(text, fieldMatcher);
        return _.map(matchedFields, function (match) { return _.find(match.splice(1), function (field) { return field; }); });
    };
    TemplateConditionEvaluator.evaluateCondition = function (condition, result, responsiveComponents) {
        if (responsiveComponents === void 0) { responsiveComponents = new ResponsiveComponents_1.ResponsiveComponents(); }
        var templateShouldBeLoaded = true;
        var fieldsInCondition = TemplateConditionEvaluator.getFieldFromString(condition);
        _.each(fieldsInCondition, function (fieldInCondition) {
            var matchingFieldValues = TemplateConditionEvaluator.evaluateMatchingFieldValues(fieldInCondition, condition);
            var fieldShouldNotBeNull = matchingFieldValues.length != 0 || TemplateConditionEvaluator.evaluateFieldShouldNotBeNull(fieldInCondition, condition);
            if (fieldShouldNotBeNull) {
                templateShouldBeLoaded = templateShouldBeLoaded && result.raw[fieldInCondition] != null;
            }
            if (templateShouldBeLoaded) {
                _.each(matchingFieldValues, function (fieldValue) {
                    templateShouldBeLoaded = templateShouldBeLoaded && result.raw[fieldInCondition].toLowerCase() == fieldValue.toLowerCase();
                });
            }
        });
        if (templateShouldBeLoaded) {
            if (TemplateConditionEvaluator.evaluateShouldUseSmallScreen(condition)) {
                templateShouldBeLoaded = templateShouldBeLoaded && responsiveComponents.isSmallScreenWidth();
            }
        }
        return templateShouldBeLoaded;
    };
    TemplateConditionEvaluator.evaluateMatchingFieldValues = function (field, condition) {
        var foundForCurrentField = [];
        // try to get the field value in the format raw.filetype == "YouTubeVideo"
        var firstRegexToGetValue = new RegExp("raw\\." + field + "\\s*=+\\s*[\"|']([a-zA-Z]+)[\"|']", 'gi');
        // try to get the field value in the format raw['filetype'] == "YouTubeVideo"
        var secondRegexToGetValue = new RegExp("raw\\[[\"|']" + field + "[\"|']\\]\\s*=+\\s*[\"|']([a-zA-Z]+)[\"|']", 'gi');
        var matches = StringUtils_1.StringUtils.match(condition, firstRegexToGetValue).concat(StringUtils_1.StringUtils.match(condition, secondRegexToGetValue));
        matches.forEach(function (match) {
            foundForCurrentField = foundForCurrentField.concat(match[1]);
        });
        return _.unique(foundForCurrentField);
    };
    TemplateConditionEvaluator.evaluateFieldShouldNotBeNull = function (field, condition) {
        var firstRegexToMatchNonNull = new RegExp("raw\\." + field + "\\s*!=\\s*(?=null|undefined)", 'gi');
        var secondRegexToMatchNonNull = new RegExp("raw\\[[\"|']" + field + "[\"|']\\]\\s*!=\\s*(?=null|undefined)", 'gi');
        return condition.match(firstRegexToMatchNonNull) != null || condition.match(secondRegexToMatchNonNull) != null;
    };
    TemplateConditionEvaluator.evaluateShouldUseSmallScreen = function (condition) {
        return condition.match(/Coveo\.DeviceUtils\.isSmallScreenWidth/gi);
    };
    return TemplateConditionEvaluator;
}());
exports.TemplateConditionEvaluator = TemplateConditionEvaluator;


/***/ }),
/* 159 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(4);
var TemplateConditionEvaluator_1 = __webpack_require__(158);
var ComponentOptions_1 = __webpack_require__(8);
var Dom_1 = __webpack_require__(1);
var Initialization_1 = __webpack_require__(2);
var underscore_1 = __webpack_require__(0);
var TemplateFromAScriptTag = /** @class */ (function () {
    function TemplateFromAScriptTag(template, scriptTag) {
        this.template = template;
        this.scriptTag = scriptTag;
        var condition = scriptTag.getAttribute('data-condition');
        if (condition != null) {
            // Allows to add quotes in data-condition on the templates
            condition = condition.toString().replace(/&quot;/g, '"');
            template.setConditionWithFallback(condition);
        }
        else {
            var parsedFieldsAttributes = this.parseFieldsAttributes();
            if (parsedFieldsAttributes && Utils_1.Utils.isNonEmptyArray(parsedFieldsAttributes)) {
                this.template.fieldsToMatch = parsedFieldsAttributes;
            }
        }
        this.template.layout = this.parseLayout();
        this.template.mobile = this.parseScreenSize('data-mobile');
        this.template.tablet = this.parseScreenSize('data-tablet');
        this.template.desktop = this.parseScreenSize('data-desktop');
        this.template.fields = TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString(scriptTag.innerHTML + " " + (condition ? condition : ''));
        this.template.role = scriptTag.getAttribute('data-role');
        this.template.addFields(TemplateConditionEvaluator_1.TemplateConditionEvaluator.getFieldFromString(scriptTag.innerHTML + ' ' + condition) || []);
        // Additional fields that might be specified directly on the script element
        var additionalFields = ComponentOptions_1.ComponentOptions.loadFieldsOption(scriptTag, 'fields', {
            includeInResults: true
        });
        if (additionalFields != null) {
            // remove the @
            this.template.addFields(underscore_1.map(additionalFields, function (field) { return field.substr(1); }));
        }
        // Additional fields that might be used to conditionally load the template when it's going to be rendered.
        this.template.addFields(underscore_1.map(this.template.fieldsToMatch, function (toMatch) {
            return toMatch.field;
        }));
        // Scan components in this template
        // return the fields needed for the content of this template
        var neededFieldsForComponents = underscore_1.chain(this.template.getComponentsInside(scriptTag.innerHTML))
            .map(function (component) {
            return Initialization_1.Initialization.getRegisteredFieldsComponentForQuery(component);
        })
            .flatten()
            .value();
        this.template.addFields(neededFieldsForComponents);
    }
    TemplateFromAScriptTag.prototype.toHtmlElement = function (container) {
        if (!container) {
            container = Dom_1.$$('code');
        }
        var condition = Dom_1.$$(this.scriptTag).getAttribute('data-condition');
        if (condition) {
            container.setAttribute('data-condition', condition);
        }
        container.setHtml(this.scriptTag.innerHTML);
        return container.el;
    };
    TemplateFromAScriptTag.prototype.parseFieldsAttributes = function () {
        var dataSet = this.scriptTag.dataset;
        return underscore_1.chain(dataSet)
            .map(function (value, key) {
            var match = key.match(/field([a-zA-Z0-9_\.]*)/i);
            if (match) {
                var values = void 0;
                if (value != null && value != 'null' && value != '') {
                    values = underscore_1.map(value.split(','), function (val) { return val.trim(); });
                }
                return {
                    field: match[1].toLowerCase(),
                    values: values
                };
            }
            else {
                return undefined;
            }
        })
            .compact()
            .value();
    };
    TemplateFromAScriptTag.prototype.parseScreenSize = function (attribute) {
        return Utils_1.Utils.parseBooleanIfNotUndefined(this.scriptTag.getAttribute(attribute));
    };
    TemplateFromAScriptTag.prototype.parseLayout = function () {
        var layout = this.scriptTag.getAttribute('data-layout');
        return layout;
    };
    TemplateFromAScriptTag.fromString = function (template, properties, container) {
        if (properties === void 0) { properties = {}; }
        if (container === void 0) { container = document.createElement('code'); }
        container.innerHTML = template;
        if (properties.condition != null) {
            container.setAttribute('data-condition', properties.condition);
        }
        if (properties.layout != null) {
            container.setAttribute('data-layout', properties.layout);
        }
        else {
            container.setAttribute('data-layout', 'list');
        }
        if (properties.mobile != null) {
            container.setAttribute('data-mobile', properties.mobile.toString());
        }
        if (properties.tablet != null) {
            container.setAttribute('data-tablet', properties.tablet.toString());
        }
        if (properties.desktop != null) {
            container.setAttribute('data-desktop', properties.desktop.toString());
        }
        if (properties.fieldsToMatch != null) {
            underscore_1.each(properties.fieldsToMatch, function (fieldToMatch) {
                if (fieldToMatch.values) {
                    container.setAttribute("data-field-" + fieldToMatch.field.toLowerCase(), fieldToMatch.values.join(','));
                }
                else {
                    container.setAttribute("data-field-" + fieldToMatch.field.toLowerCase(), null);
                }
            });
        }
        if (properties.role != null) {
            container.setAttribute('data-role', properties.role);
        }
        return container;
    };
    return TemplateFromAScriptTag;
}());
exports.TemplateFromAScriptTag = TemplateFromAScriptTag;


/***/ }),
/* 160 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var ComponentOptions_1 = __webpack_require__(8);
var LocalStorageUtils_1 = __webpack_require__(41);
var ResultListEvents_1 = __webpack_require__(29);
var DebugEvents_1 = __webpack_require__(106);
var Dom_1 = __webpack_require__(1);
var StringUtils_1 = __webpack_require__(22);
var SearchEndpoint_1 = __webpack_require__(53);
var RootComponent_1 = __webpack_require__(45);
var BaseComponent_1 = __webpack_require__(36);
var ExternalModulesShim_1 = __webpack_require__(26);
var Globalize = __webpack_require__(23);
var _ = __webpack_require__(0);
__webpack_require__(390);
var Strings_1 = __webpack_require__(6);
var DebugHeader_1 = __webpack_require__(391);
var QueryEvents_1 = __webpack_require__(11);
var DebugForResult_1 = __webpack_require__(393);
var GlobalExports_1 = __webpack_require__(3);
var Template_1 = __webpack_require__(27);
var Debug = /** @class */ (function (_super) {
    __extends(Debug, _super);
    function Debug(element, bindings, options, ModalBox) {
        if (ModalBox === void 0) { ModalBox = ExternalModulesShim_1.ModalBox; }
        var _this = _super.call(this, element, Debug.ID) || this;
        _this.element = element;
        _this.bindings = bindings;
        _this.options = options;
        _this.ModalBox = ModalBox;
        _this.opened = false;
        _this.options = ComponentOptions_1.ComponentOptions.initComponentOptions(element, Debug, options);
        // This gets debounced so the following logic works correctly :
        // When you alt dbl click on a component, it's possible to add/merge multiple debug info source together
        // They will be merged together in this.addInfoToDebugPanel
        // Then, openModalBox, even if it's called from multiple different caller will be opened only once all the info has been merged together correctly
        _this.showDebugPanel = _.debounce(function () { return _this.openModalBox(); }, 100);
        Dom_1.$$(_this.element).on(ResultListEvents_1.ResultListEvents.newResultDisplayed, function (e, args) {
            return _this.handleNewResultDisplayed(args);
        });
        Dom_1.$$(_this.element).on(DebugEvents_1.DebugEvents.showDebugPanel, function (e, args) { return _this.handleShowDebugPanel(args); });
        Dom_1.$$(_this.element).on(QueryEvents_1.QueryEvents.querySuccess, function (e, args) { return _this.handleQuerySuccess(args); });
        Dom_1.$$(_this.element).on(QueryEvents_1.QueryEvents.newQuery, function () { return _this.handleNewQuery(); });
        _this.localStorageDebug = new LocalStorageUtils_1.LocalStorageUtils('DebugPanel');
        _this.collapsedSections = _this.localStorageDebug.load() || [];
        return _this;
    }
    Debug.prototype.debugInfo = function () {
        return null;
    };
    Debug.prototype.addInfoToDebugPanel = function (info) {
        if (this.stackDebug == null) {
            this.stackDebug = {};
        }
        this.stackDebug = __assign({}, this.stackDebug, info);
    };
    Debug.prototype.handleNewResultDisplayed = function (args) {
        var _this = this;
        Dom_1.$$(args.item).on('dblclick', function (e) {
            _this.handleResultDoubleClick(e, args);
        });
    };
    Debug.prototype.handleResultDoubleClick = function (e, args) {
        if (e.altKey) {
            var index_1 = args.result.index;
            var template = args.item['template'];
            var findResult = function (results) {
                return results != null ? _.find(results.results, function (result) { return result.index == index_1; }) : args.result;
            };
            var debugInfo = __assign({}, new DebugForResult_1.DebugForResult(this.bindings).generateDebugInfoForResult(args.result), { findResult: findResult, template: this.templateToJson(template) });
            this.addInfoToDebugPanel(debugInfo);
            this.showDebugPanel();
        }
    };
    Debug.prototype.handleQuerySuccess = function (args) {
        if (this.opened) {
            if (this.stackDebug && this.stackDebug.findResult) {
                this.addInfoToDebugPanel(new DebugForResult_1.DebugForResult(this.bindings).generateDebugInfoForResult(this.stackDebug.findResult(args.results)));
            }
            this.redrawDebugPanel();
            this.hideAnimationDuringQuery();
        }
    };
    Debug.prototype.handleNewQuery = function () {
        if (this.opened) {
            this.showAnimationDuringQuery();
        }
    };
    Debug.prototype.handleShowDebugPanel = function (args) {
        this.addInfoToDebugPanel(args);
        this.showDebugPanel();
    };
    Debug.prototype.buildStackPanel = function () {
        var _this = this;
        var body = Dom_1.$$('div', {
            className: 'coveo-debug'
        });
        var keys = _.chain(this.stackDebug)
            .omit('findResult') // findResult is a duplicate of the simpler "result" key used to retrieve the results only
            .keys()
            .value();
        // TODO Can't chain this properly due to a bug in underscore js definition file.
        // Yep, A PR is opened to DefinitelyTyped.
        var keysPaired = _.pairs(keys);
        keysPaired = keysPaired.sort(function (a, b) {
            var indexA = _.indexOf(Debug.customOrder, a[1]);
            var indexB = _.indexOf(Debug.customOrder, b[1]);
            if (indexA != -1 && indexB != -1) {
                return indexA - indexB;
            }
            if (indexA != -1) {
                return -1;
            }
            if (indexB != -1) {
                return 1;
            }
            return a[0] - b[0];
        });
        var json = {};
        _.forEach(keysPaired, function (key) {
            var section = _this.buildSection(key[1]);
            var build = _this.buildStackPanelSection(_this.stackDebug[key[1]], _this.stackDebug['result']);
            section.container.append(build.section);
            if (build.json != null) {
                json[key[1]] = build.json;
            }
            body.append(section.dom.el);
        });
        return {
            body: body.el,
            json: json
        };
    };
    Debug.prototype.getModalBody = function () {
        if (this.modalBox && this.modalBox.content) {
            return Dom_1.$$(this.modalBox.content).find('.coveo-modal-body');
        }
        return null;
    };
    Debug.prototype.redrawDebugPanel = function () {
        var build = this.buildStackPanel();
        var body = this.getModalBody();
        if (body) {
            Dom_1.$$(body).empty();
            Dom_1.$$(body).append(build.body);
        }
        this.updateSearchFunctionnality(build);
    };
    Debug.prototype.openModalBox = function () {
        var _this = this;
        var build = this.buildStackPanel();
        this.opened = true;
        this.modalBox = this.ModalBox.open(build.body, {
            title: Strings_1.l('Debug'),
            className: 'coveo-debug',
            titleClose: true,
            overlayClose: true,
            validation: function () {
                _this.onCloseModalBox();
                return true;
            },
            sizeMod: 'big',
            body: this.bindings.root
        });
        var title = Dom_1.$$(this.modalBox.wrapper).find('.coveo-modal-header');
        if (title) {
            if (!this.debugHeader) {
                this.debugHeader = new DebugHeader_1.DebugHeader(this, title, function (value) { return _this.search(value, build.body); }, this.stackDebug);
            }
            else {
                this.debugHeader.moveTo(title);
                this.updateSearchFunctionnality(build);
            }
        }
        else {
            this.logger.warn('No title found in modal box.');
        }
    };
    Debug.prototype.updateSearchFunctionnality = function (build) {
        var _this = this;
        if (this.debugHeader) {
            this.debugHeader.setNewInfoToDebug(this.stackDebug);
            this.debugHeader.setSearch(function (value) { return _this.search(value, build.body); });
        }
    };
    Debug.prototype.onCloseModalBox = function () {
        this.stackDebug = null;
        this.opened = false;
    };
    Debug.prototype.buildStackPanelSection = function (value, results) {
        if (value instanceof HTMLElement) {
            return { section: value };
        }
        else if (_.isFunction(value)) {
            return this.buildStackPanelSection(value(results), results);
        }
        var json = this.toJson(value);
        return { section: this.buildProperty(json), json: json };
    };
    Debug.prototype.findInProperty = function (element, value) {
        var _this = this;
        var wrappedElement = Dom_1.$$(element);
        var match = element['label'].indexOf(value) != -1;
        if (match) {
            this.highlightSearch(element['labelDom'], value);
        }
        else {
            this.removeHighlightSearch(element['labelDom']);
        }
        if (wrappedElement.hasClass('coveo-property-object')) {
            wrappedElement.toggleClass('coveo-search-match', match);
            var children = element['buildKeys']();
            var submatch_1 = false;
            _.each(children, function (child) {
                submatch_1 = _this.findInProperty(child, value) || submatch_1;
            });
            wrappedElement.toggleClass('coveo-search-submatch', submatch_1);
            return match || submatch_1;
        }
        else {
            if (element['values'].indexOf(value) != -1) {
                this.highlightSearch(element['valueDom'], value);
                match = true;
            }
            else {
                this.removeHighlightSearch(element['valueDom']);
            }
            wrappedElement.toggleClass('coveo-search-match', match);
        }
        return match;
    };
    Debug.prototype.buildSection = function (id) {
        var _this = this;
        var dom = Dom_1.$$('div', {
            className: "coveo-section coveo-" + id + "-section"
        });
        var header = Dom_1.$$('div', {
            className: 'coveo-section-header'
        });
        Dom_1.$$(header).text(id);
        dom.append(header.el);
        var container = Dom_1.$$('div', {
            className: 'coveo-section-container'
        });
        dom.append(container.el);
        if (_.contains(this.collapsedSections, id)) {
            Dom_1.$$(dom).addClass('coveo-debug-collapsed');
        }
        header.on('click', function () {
            Dom_1.$$(dom).toggleClass('coveo-debug-collapsed');
            if (_.contains(_this.collapsedSections, id)) {
                _this.collapsedSections = _.without(_this.collapsedSections, id);
            }
            else {
                _this.collapsedSections.push(id);
            }
            _this.localStorageDebug.save(_this.collapsedSections);
        });
        return {
            dom: dom,
            header: header,
            container: container
        };
    };
    Debug.prototype.buildProperty = function (value, label) {
        if (value instanceof Promise) {
            return this.buildPromise(value, label);
        }
        else if ((_.isArray(value) || _.isObject(value)) && !_.isString(value)) {
            return this.buildObjectProperty(value, label);
        }
        else {
            return this.buildBasicProperty(value, label);
        }
    };
    Debug.prototype.buildPromise = function (promise, label) {
        var _this = this;
        var dom = Dom_1.$$('div', {
            className: 'coveo-property coveo-property-promise'
        });
        promise.then(function (value) {
            var resolvedDom = _this.buildProperty(value, label);
            dom.replaceWith(resolvedDom);
        });
        return dom.el;
    };
    Debug.prototype.buildObjectProperty = function (object, label) {
        var _this = this;
        var dom = Dom_1.$$('div', {
            className: 'coveo-property coveo-property-object'
        });
        var valueContainer = Dom_1.$$('div', {
            className: 'coveo-property-value'
        });
        var keys = _.keys(object);
        if (!_.isArray(object)) {
            keys.sort();
        }
        var children;
        var buildKeys = function () {
            if (children == null) {
                children = [];
                _.each(keys, function (key) {
                    var property = _this.buildProperty(object[key], key);
                    if (property != null) {
                        children.push(property);
                        valueContainer.append(property);
                    }
                });
            }
            return children;
        };
        dom.el['buildKeys'] = buildKeys;
        if (label != null) {
            var labelDom = Dom_1.$$('div', {
                className: 'coveo-property-label'
            });
            labelDom.text(label);
            dom.el['labelDom'] = labelDom.el;
            dom.append(labelDom.el);
            if (keys.length != 0) {
                dom.addClass('coveo-collapsible');
                labelDom.on('click', function () {
                    buildKeys();
                    var className = dom.el.className.split(/\s+/);
                    if (_.contains(className, 'coveo-expanded')) {
                        className = _.without(className, 'coveo-expanded');
                    }
                    else {
                        className.push('coveo-expanded');
                    }
                    dom.el.className = className.join(' ');
                });
            }
        }
        else {
            buildKeys();
        }
        if (keys.length == 0) {
            var className = _.without(dom.el.className.split(/\s+/), 'coveo-property-object');
            className.push('coveo-property-basic');
            dom.el.className = className.join(' ');
            if (_.isArray(object)) {
                valueContainer.setHtml('[]');
            }
            else {
                valueContainer.setHtml('{}');
            }
            dom.el['values'] = '';
        }
        dom.el['label'] = label != null ? label.toLowerCase() : '';
        dom.append(valueContainer.el);
        return dom.el;
    };
    Debug.prototype.buildBasicProperty = function (value, label) {
        var _this = this;
        var dom = Dom_1.$$('div', {
            className: 'coveo-property coveo-property-basic'
        });
        if (label != null) {
            var labelDom = Dom_1.$$('div', {
                className: 'coveo-property-label'
            });
            labelDom.text(label);
            dom.append(labelDom.el);
            dom.el['labelDom'] = labelDom.el;
        }
        var stringValue = value != null ? value.toString() : String(value);
        if (value != null && value['ref'] != null) {
            value = value['ref'];
        }
        var valueDom = Dom_1.$$('div');
        valueDom.text(stringValue);
        valueDom.on('dblclick', function () {
            _this.selectElementText(valueDom.el);
        });
        dom.append(valueDom.el);
        dom.el['valueDom'] = valueDom;
        var className = ['coveo-property-value'];
        if (_.isString(value)) {
            className.push('coveo-property-value-string');
        }
        if (_.isNull(value) || _.isUndefined(value)) {
            className.push('coveo-property-value-null');
        }
        if (_.isNumber(value)) {
            className.push('coveo-property-value-number');
        }
        if (_.isBoolean(value)) {
            className.push('coveo-property-value-boolean');
        }
        if (_.isDate(value)) {
            className.push('coveo-property-value-date');
        }
        if (_.isObject(value)) {
            className.push('coveo-property-value-object');
        }
        if (_.isArray(value)) {
            className.push('coveo-property-value-array');
        }
        valueDom.el.className = className.join(' ');
        dom.el['label'] = label != null ? label.toLowerCase() : '';
        dom.el['values'] = stringValue.toLowerCase();
        return dom.el;
    };
    Debug.prototype.toJson = function (value, depth, done) {
        var _this = this;
        if (depth === void 0) { depth = 0; }
        if (done === void 0) { done = []; }
        if (value instanceof BaseComponent_1.BaseComponent || value instanceof SearchEndpoint_1.SearchEndpoint) {
            return this.componentToJson(value, depth);
        }
        if (value instanceof HTMLElement) {
            return this.htmlToJson(value);
        }
        if (value instanceof Template_1.Template) {
            return this.templateToJson(value);
        }
        if (value instanceof Promise) {
            return value.then(function (value) {
                return _this.toJson(value, depth, done);
            });
        }
        if (value == window) {
            return this.toJsonRef(value);
        }
        if (_.isArray(value) || _.isObject(value)) {
            if (_.contains(done, value)) {
                return this.toJsonRef(value, '< RECURSIVE >');
            }
            else if (depth >= Debug.maxDepth) {
                return this.toJsonRef(value);
            }
            else if (_.isArray(value)) {
                return _.map(value, function (subValue, key) { return _this.toJson(subValue, depth + 1, done.concat([value])); });
            }
            else if (_.isDate(value)) {
                return this.toJsonRef(value, Globalize.format(value, 'F'));
            }
            else {
                var result_1 = {};
                _.each(value, function (subValue, key) {
                    result_1[key] = _this.toJson(subValue, depth + 1, done.concat([value]));
                });
                result_1['ref'];
                return result_1;
            }
        }
        return value;
    };
    Debug.prototype.toJsonRef = function (value, stringValue) {
        stringValue = new String(stringValue || value);
        stringValue['ref'] = value;
        return stringValue;
    };
    Debug.prototype.componentToJson = function (value, depth) {
        if (depth === void 0) { depth = 0; }
        var options = _.keys(value['options']);
        if (options.length > 0) {
            return this.toJson(value['options'], depth);
        }
        else {
            return this.toJsonRef(value['options'], new String('No options'));
        }
    };
    Debug.prototype.htmlToJson = function (value) {
        if (value == null) {
            return undefined;
        }
        return {
            tagName: value.tagName,
            id: value.id,
            classList: value.className.split(/\s+/)
        };
    };
    Debug.prototype.templateToJson = function (template) {
        if (template == null) {
            return null;
        }
        var element = template['element'];
        var templateObject = {
            type: template.getType()
        };
        if (element != null) {
            templateObject.id = element.id;
            templateObject.condition = element.attributes['data-condition'];
            templateObject.content = element.innerText;
        }
        return templateObject;
    };
    Debug.prototype.selectElementText = function (el) {
        if (window.getSelection && document.createRange) {
            var selection = window.getSelection();
            var range = document.createRange();
            range.selectNodeContents(el);
            selection.removeAllRanges();
            selection.addRange(range);
        }
        else if ('createTextRange' in document.body) {
            var textRange = document.body['createTextRange']();
            textRange.moveToElementText(el);
            textRange.select();
        }
    };
    Debug.prototype.search = function (value, body) {
        var _this = this;
        if (_.isEmpty(value)) {
            Dom_1.$$(body)
                .findAll('.coveo-search-match, .coveo-search-submatch')
                .forEach(function (el) {
                Dom_1.$$(el).removeClass('coveo-search-match, coveo-search-submatch');
            });
            Dom_1.$$(body).removeClass('coveo-searching');
        }
        else {
            Dom_1.$$(body).addClass('coveo-searching-loading');
            setTimeout(function () {
                var rootProperties = Dom_1.$$(body).findAll('.coveo-section .coveo-section-container > .coveo-property');
                _.each(rootProperties, function (element) {
                    _this.findInProperty(element, value);
                });
                Dom_1.$$(body).addClass('coveo-searching');
                Dom_1.$$(body).removeClass('coveo-searching-loading');
            });
        }
    };
    Debug.prototype.highlightSearch = function (elementToSearch, search) {
        var asHTMLElement;
        if (elementToSearch instanceof HTMLElement) {
            asHTMLElement = elementToSearch;
        }
        else if (elementToSearch instanceof Dom_1.Dom) {
            asHTMLElement = elementToSearch.el;
        }
        if (asHTMLElement != null && asHTMLElement.innerText != null) {
            var match = asHTMLElement.innerText.split(new RegExp('(?=' + StringUtils_1.StringUtils.regexEncode(search) + ')', 'gi'));
            asHTMLElement.innerHTML = '';
            match.forEach(function (value) {
                var regex = new RegExp('(' + StringUtils_1.StringUtils.regexEncode(search) + ')', 'i');
                var group = value.match(regex);
                var span;
                if (group != null) {
                    span = Dom_1.$$('span', {
                        className: 'coveo-debug-highlight'
                    });
                    span.text(group[1]);
                    asHTMLElement.appendChild(span.el);
                    span = Dom_1.$$('span');
                    span.text(value.substr(group[1].length));
                    asHTMLElement.appendChild(span.el);
                }
                else {
                    span = Dom_1.$$('span');
                    span.text(value);
                    asHTMLElement.appendChild(span.el);
                }
            });
        }
    };
    Debug.prototype.removeHighlightSearch = function (element) {
        if (element != null) {
            element.innerHTML = element.innerText;
        }
    };
    Debug.prototype.showAnimationDuringQuery = function () {
        Dom_1.$$(this.modalBox.content).addClass('coveo-debug-loading');
    };
    Debug.prototype.hideAnimationDuringQuery = function () {
        Dom_1.$$(this.modalBox.content).removeClass('coveo-debug-loading');
    };
    Debug.ID = 'Debug';
    Debug.doExport = function () {
        GlobalExports_1.exportGlobally({
            Debug: Debug
        });
    };
    Debug.options = {
        enableDebug: ComponentOptions_1.ComponentOptions.buildBooleanOption({ defaultValue: false })
    };
    Debug.customOrder = ['error', 'queryDuration', 'result', 'fields', 'rankingInfo', 'template', 'query', 'results', 'state'];
    Debug.durationKeys = ['indexDuration', 'proxyDuration', 'clientDuration', 'duration'];
    Debug.maxDepth = 10;
    return Debug;
}(RootComponent_1.RootComponent));
exports.Debug = Debug;


/***/ }),
/* 161 */
/***/ (function(module, exports, __webpack_require__) {

var isObject = __webpack_require__(110);
var document = __webpack_require__(38).document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
  return is ? document.createElement(it) : {};
};


/***/ }),
/* 162 */
/***/ (function(module, exports) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),
/* 163 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(80);
var dPs = __webpack_require__(403);
var enumBugKeys = __webpack_require__(167);
var IE_PROTO = __webpack_require__(115)('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE = 'prototype';

// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = __webpack_require__(161)('iframe');
  var i = enumBugKeys.length;
  var lt = '<';
  var gt = '>';
  var iframeDocument;
  iframe.style.display = 'none';
  __webpack_require__(410).appendChild(iframe);
  iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  // createDict = iframe.contentWindow.Object;
  // html.removeChild(iframe);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  iframeDocument.close();
  createDict = iframeDocument.F;
  while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  return createDict();
};

module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    Empty[PROTOTYPE] = anObject(O);
    result = new Empty();
    Empty[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = createDict();
  return Properties === undefined ? result : dPs(result, Properties);
};


/***/ }),
/* 164 */
/***/ (function(module, exports, __webpack_require__) {

var core = __webpack_require__(39);
var global = __webpack_require__(38);
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: core.version,
  mode: __webpack_require__(165) ? 'pure' : 'global',
  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});


/***/ }),
/* 165 */
/***/ (function(module, exports) {

module.exports = true;


/***/ }),
/* 166 */
/***/ (function(module, exports) {

var id = 0;
var px = Math.random();
module.exports = function (key) {
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};


/***/ }),
/* 167 */
/***/ (function(module, exports) {

// IE 8- don't enum bug keys
module.exports = (
  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');


/***/ }),
/* 168 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var LIBRARY = __webpack_require__(165);
var $export = __webpack_require__(60);
var redefine = __webpack_require__(423);
var hide = __webpack_require__(61);
var Iterators = __webpack_require__(84);
var $iterCreate = __webpack_require__(424);
var setToStringTag = __webpack_require__(169);
var getPrototypeOf = __webpack_require__(425);
var ITERATOR = __webpack_require__(46)('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
var VALUES = 'values';

var returnThis = function () { return this; };

module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  $iterCreate(Constructor, NAME, next);
  var getMethod = function (kind) {
    if (!BUGGY && kind in proto) return proto[kind];
    switch (kind) {
      case KEYS: return function keys() { return new Constructor(this, kind); };
      case VALUES: return function values() { return new Constructor(this, kind); };
    } return function entries() { return new Constructor(this, kind); };
  };
  var TAG = NAME + ' Iterator';
  var DEF_VALUES = DEFAULT == VALUES;
  var VALUES_BUG = false;
  var proto = Base.prototype;
  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  var $default = $native || getMethod(DEFAULT);
  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  var methods, key, IteratorPrototype;
  // Fix native
  if ($anyNative) {
    IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
    if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
      // Set @@toStringTag to native iterators
      setToStringTag(IteratorPrototype, TAG, true);
      // fix for some old engines
      if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
    }
  }
  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEF_VALUES && $native && $native.name !== VALUES) {
    VALUES_BUG = true;
    $default = function values() { return $native.call(this); };
  }
  // Define iterator
  if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
    hide(proto, ITERATOR, $default);
  }
  // Plug for library
  Iterators[NAME] = $default;
  Iterators[TAG] = returnThis;
  if (DEFAULT) {
    methods = {
      values: DEF_VALUES ? $default : getMethod(VALUES),
      keys: IS_SET ? $default : getMethod(KEYS),
      entries: $entries
    };
    if (FORCED) for (key in methods) {
      if (!(key in proto)) redefine(proto, key, methods[key]);
    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  }
  return methods;
};


/***/ }),
/* 169 */
/***/ (function(module, exports, __webpack_require__) {

var def = __webpack_require__(109).f;
var has = __webpack_require__(82);
var TAG = __webpack_require__(46)('toStringTag');

module.exports = function (it, tag, stat) {
  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};


/***/ }),
/* 170 */
/***/ (function(module, exports) {

module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
  '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';


/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var DeviceUtils_1 = __webpack_require__(24);
var PendingSearchEvent_1 = __webpack_require__(117);
var PendingSearchAsYouTypeSearchEvent_1 = __webpack_require__(128);
var Assert_1 = __webpack_require__(5);
var Logger_1 = __webpack_require__(9);
var AnalyticsActionListMeta_1 = __webpack_require__(10);
var Defer_1 = __webpack_require__(31);
var Dom_1 = __webpack_require__(1);
var AnalyticsEvents_1 = __webpack_require__(58);
var APIAnalyticsBuilder_1 = __webpack_require__(172);
var QueryStateModel_1 = __webpack_require__(13);
var Component_1 = __webpack_require__(7);
var Version_1 = __webpack_require__(104);
var QueryUtils_1 = __webpack_require__(21);
var _ = __webpack_require__(0);
var AnalyticsInformation_1 = __webpack_require__(50);
var ControllersModules_1 = __webpack_require__(155);
var LiveAnalyticsClient = /** @class */ (function () {
    function LiveAnalyticsClient(endpoint, rootElement, userId, userDisplayName, anonymous, splitTestRunName, splitTestRunVersion, originLevel1, sendToCloud, bindings) {
        this.endpoint = endpoint;
        this.rootElement = rootElement;
        this.userId = userId;
        this.userDisplayName = userDisplayName;
        this.anonymous = anonymous;
        this.splitTestRunName = splitTestRunName;
        this.splitTestRunVersion = splitTestRunVersion;
        this.originLevel1 = originLevel1;
        this.sendToCloud = sendToCloud;
        this.bindings = bindings;
        this.isContextual = false;
        this.originContext = 'Search';
        this.language = String['locale'];
        this.device = DeviceUtils_1.DeviceUtils.getDeviceName();
        this.mobile = DeviceUtils_1.DeviceUtils.isMobileDevice();
        Assert_1.Assert.exists(endpoint);
        Assert_1.Assert.exists(rootElement);
        Assert_1.Assert.isNonEmptyString(this.language);
        Assert_1.Assert.isNonEmptyString(this.device);
        Assert_1.Assert.isNonEmptyString(this.originLevel1);
        this.logger = new Logger_1.Logger(this);
    }
    LiveAnalyticsClient.prototype.isActivated = function () {
        return true;
    };
    LiveAnalyticsClient.prototype.getCurrentVisitId = function () {
        return this.endpoint.getCurrentVisitId();
    };
    LiveAnalyticsClient.prototype.getCurrentVisitIdPromise = function () {
        return this.endpoint.getCurrentVisitIdPromise();
    };
    LiveAnalyticsClient.prototype.getCurrentEventCause = function () {
        if (this.pendingSearchEvent != null) {
            return this.pendingSearchEvent.getEventCause();
        }
        if (this.pendingSearchAsYouTypeSearchEvent != null) {
            return this.pendingSearchAsYouTypeSearchEvent.getEventCause();
        }
        return null;
    };
    LiveAnalyticsClient.prototype.getCurrentEventMeta = function () {
        if (this.pendingSearchEvent != null) {
            return this.pendingSearchEvent.getEventMeta();
        }
        if (this.pendingSearchAsYouTypeSearchEvent != null) {
            return this.pendingSearchAsYouTypeSearchEvent.getEventMeta();
        }
        return null;
    };
    LiveAnalyticsClient.prototype.logSearchEvent = function (actionCause, meta) {
        var metaObject = this.buildMetaObject(meta);
        this.pushSearchEvent(actionCause, metaObject);
    };
    LiveAnalyticsClient.prototype.logSearchAsYouType = function (actionCause, meta) {
        var metaObject = this.buildMetaObject(meta);
        this.pushSearchAsYouTypeEvent(actionCause, metaObject);
    };
    LiveAnalyticsClient.prototype.logClickEvent = function (actionCause, meta, result, element) {
        var metaObject = this.buildMetaObject(meta, result);
        return this.pushClickEvent(actionCause, metaObject, result, element);
    };
    LiveAnalyticsClient.prototype.logCustomEvent = function (actionCause, meta, element, result) {
        var metaObject = this.buildMetaObject(meta, result);
        return this.pushCustomEvent(actionCause, metaObject, element);
    };
    LiveAnalyticsClient.prototype.getTopQueries = function (params) {
        return this.endpoint.getTopQueries(params);
    };
    LiveAnalyticsClient.prototype.sendAllPendingEvents = function () {
        if (this.pendingSearchAsYouTypeSearchEvent) {
            this.pendingSearchAsYouTypeSearchEvent.sendRightNow();
        }
    };
    LiveAnalyticsClient.prototype.cancelAllPendingEvents = function () {
        if (this.pendingSearchAsYouTypeSearchEvent) {
            this.pendingSearchAsYouTypeSearchEvent.cancel();
            this.pendingSearchAsYouTypeSearchEvent = null;
        }
        if (this.pendingSearchEvent) {
            this.pendingSearchEvent.cancel();
            this.pendingSearchEvent = null;
        }
    };
    LiveAnalyticsClient.prototype.getPendingSearchEvent = function () {
        if (this.pendingSearchEvent) {
            return this.pendingSearchEvent;
        }
        else if (this.pendingSearchAsYouTypeSearchEvent) {
            return this.pendingSearchAsYouTypeSearchEvent;
        }
        return null;
    };
    LiveAnalyticsClient.prototype.warnAboutSearchEvent = function () {
        if (_.isUndefined(this.pendingSearchEvent) && _.isUndefined(this.pendingSearchAsYouTypeSearchEvent)) {
            this.logger.warn('A search was triggered, but no analytics event was logged. If you wish to have consistent analytics data, consider logging a search event using the methods provided by the framework', 'https://docs.coveo.com/en/2726/#logging-your-own-search-events');
            if (window['console'] && console.trace) {
                console.trace();
            }
        }
    };
    LiveAnalyticsClient.prototype.setOriginContext = function (originContext) {
        this.originContext = originContext;
    };
    LiveAnalyticsClient.prototype.getOriginContext = function () {
        return this.originContext;
    };
    LiveAnalyticsClient.prototype.getUserDisplayName = function () {
        return this.userDisplayName;
    };
    LiveAnalyticsClient.prototype.pushCustomEvent = function (actionCause, metaObject, element) {
        var customEvent = this.buildCustomEvent(actionCause, metaObject, element);
        this.triggerChangeAnalyticsCustomData('CustomEvent', metaObject, customEvent);
        this.checkToSendAnyPendingSearchAsYouType(actionCause);
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.customEvent, {
            customEvent: APIAnalyticsBuilder_1.APIAnalyticsBuilder.convertCustomEventToAPI(customEvent)
        });
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, {
            event: 'CoveoCustomEvent',
            coveoAnalyticsEventData: customEvent
        });
        return this.sendToCloud ? this.endpoint.sendCustomEvent(customEvent) : Promise.resolve(null);
    };
    LiveAnalyticsClient.prototype.pushSearchEvent = function (actionCause, metaObject) {
        var _this = this;
        Assert_1.Assert.exists(actionCause);
        if (this.pendingSearchEvent && this.pendingSearchEvent.getEventCause() !== actionCause.name) {
            this.pendingSearchEvent.stopRecording();
            this.pendingSearchEvent = null;
        }
        this.checkToSendAnyPendingSearchAsYouType(actionCause);
        if (!this.pendingSearchEvent) {
            var searchEvent = this.buildSearchEvent(actionCause, metaObject);
            this.triggerChangeAnalyticsCustomData('SearchEvent', metaObject, searchEvent);
            var pendingSearchEvent = (this.pendingSearchEvent = new PendingSearchEvent_1.PendingSearchEvent(this.rootElement, this.endpoint, searchEvent, this.sendToCloud));
            Defer_1.Defer.defer(function () {
                // At this point all `duringQuery` events should have been fired, so we can forget
                // about the pending search event. It will finish processing automatically when
                // all the deferred that were caught terminate.
                _this.pendingSearchEvent = undefined;
                pendingSearchEvent.stopRecording();
            });
        }
    };
    LiveAnalyticsClient.prototype.checkToSendAnyPendingSearchAsYouType = function (actionCause) {
        if (this.eventIsNotRelatedToSearchbox(actionCause.name)) {
            this.sendAllPendingEvents();
        }
        else {
            this.cancelAnyPendingSearchAsYouTypeEvent();
        }
    };
    LiveAnalyticsClient.prototype.pushSearchAsYouTypeEvent = function (actionCause, metaObject) {
        this.cancelAnyPendingSearchAsYouTypeEvent();
        var searchEvent = this.buildSearchEvent(actionCause, metaObject);
        this.triggerChangeAnalyticsCustomData('SearchEvent', metaObject, searchEvent);
        this.pendingSearchAsYouTypeSearchEvent = new PendingSearchAsYouTypeSearchEvent_1.PendingSearchAsYouTypeSearchEvent(this.rootElement, this.endpoint, searchEvent, this.sendToCloud);
    };
    LiveAnalyticsClient.prototype.pushClickEvent = function (actionCause, metaObject, result, element) {
        var event = this.buildClickEvent(actionCause, metaObject, result, element);
        this.checkToSendAnyPendingSearchAsYouType(actionCause);
        this.triggerChangeAnalyticsCustomData('ClickEvent', metaObject, event, { resultData: result });
        Assert_1.Assert.isNonEmptyString(event.searchQueryUid);
        Assert_1.Assert.isNonEmptyString(event.collectionName);
        Assert_1.Assert.isNonEmptyString(event.sourceName);
        Assert_1.Assert.isNumber(event.documentPosition);
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.documentViewEvent, {
            documentViewEvent: APIAnalyticsBuilder_1.APIAnalyticsBuilder.convertDocumentViewToAPI(event)
        });
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.analyticsEventReady, {
            event: 'CoveoClickEvent',
            coveoAnalyticsEventData: event
        });
        return this.sendToCloud ? this.endpoint.sendDocumentViewEvent(event) : Promise.resolve(null);
    };
    LiveAnalyticsClient.prototype.buildAnalyticsEvent = function (actionCause, metaObject) {
        return {
            searchQueryUid: undefined,
            actionCause: actionCause.name,
            actionType: actionCause.type,
            username: this.userId,
            userDisplayName: this.userDisplayName,
            anonymous: this.anonymous,
            device: this.device,
            mobile: this.mobile,
            language: this.language,
            responseTime: undefined,
            originLevel1: this.originLevel1,
            originLevel2: this.getOriginLevel2(this.rootElement),
            originLevel3: document.referrer,
            originContext: this.originContext,
            customData: _.keys(metaObject).length > 0 ? metaObject : undefined,
            userAgent: navigator.userAgent,
            clientId: new AnalyticsInformation_1.AnalyticsInformation().clientId
        };
    };
    LiveAnalyticsClient.prototype.buildSearchEvent = function (actionCause, metaObject) {
        return this.merge(this.buildAnalyticsEvent(actionCause, metaObject), {
            searchQueryUid: undefined,
            pipeline: undefined,
            splitTestRunName: this.splitTestRunName,
            splitTestRunVersion: this.splitTestRunVersion,
            queryText: undefined,
            advancedQuery: undefined,
            results: undefined,
            resultsPerPage: undefined,
            pageNumber: undefined,
            didYouMean: undefined,
            facets: undefined,
            contextual: this.isContextual
        });
    };
    LiveAnalyticsClient.prototype.buildClickEvent = function (actionCause, metaObject, result, element) {
        return this.merge(this.buildAnalyticsEvent(actionCause, metaObject), {
            searchQueryUid: result.queryUid,
            queryPipeline: result.pipeline,
            splitTestRunName: this.splitTestRunName || result.splitTestRun,
            splitTestRunVersion: this.splitTestRunVersion || (result.splitTestRun != undefined ? result.pipeline : undefined),
            documentUri: result.uri,
            documentUriHash: QueryUtils_1.QueryUtils.getUriHash(result),
            documentUrl: result.clickUri,
            documentTitle: result.title,
            documentCategory: QueryUtils_1.QueryUtils.getObjectType(result),
            originLevel2: this.getOriginLevel2(element),
            collectionName: QueryUtils_1.QueryUtils.getCollection(result),
            sourceName: QueryUtils_1.QueryUtils.getSource(result),
            documentPosition: result.index + 1,
            responseTime: 0,
            viewMethod: actionCause.name,
            rankingModifier: result.rankingModifier
        });
    };
    LiveAnalyticsClient.prototype.buildCustomEvent = function (actionCause, metaObject, element) {
        return this.merge(this.buildAnalyticsEvent(actionCause, metaObject), {
            lastSearchQueryUid: this.getLastSearchQueryUid(),
            eventType: actionCause.type,
            eventValue: actionCause.name,
            originLevel2: this.getOriginLevel2(element),
            responseTime: 0
        });
    };
    LiveAnalyticsClient.prototype.getOriginLevel2 = function (element) {
        return this.resolveActiveTabFromElement(element) || 'default';
    };
    LiveAnalyticsClient.prototype.getLastSearchQueryUid = function () {
        var queryController = Component_1.Component.resolveBinding(Component_1.Component.resolveRoot(this.rootElement), ControllersModules_1.QueryController);
        if (!queryController) {
            return;
        }
        var lastResults = queryController.getLastResults();
        if (!lastResults) {
            return;
        }
        return lastResults.searchUid;
    };
    LiveAnalyticsClient.prototype.buildMetaObject = function (meta, result) {
        var modifiedMeta = _.extend({}, meta);
        modifiedMeta['JSUIVersion'] = Version_1.version.lib + ';' + Version_1.version.product;
        var contentIDsAreAlreadySet = modifiedMeta['contentIDKey'] && modifiedMeta['contentIDValue'];
        if (!contentIDsAreAlreadySet && result) {
            var uniqueId = QueryUtils_1.QueryUtils.getPermanentId(result);
            modifiedMeta['contentIDKey'] = uniqueId.fieldUsed;
            modifiedMeta['contentIDValue'] = uniqueId.fieldValue;
        }
        return modifiedMeta;
    };
    LiveAnalyticsClient.prototype.cancelAnyPendingSearchAsYouTypeEvent = function () {
        if (this.pendingSearchAsYouTypeSearchEvent) {
            this.pendingSearchAsYouTypeSearchEvent.cancel();
            this.pendingSearchAsYouTypeSearchEvent = undefined;
        }
    };
    LiveAnalyticsClient.prototype.resolveActiveTabFromElement = function (element) {
        Assert_1.Assert.exists(element);
        var queryStateModel = this.resolveQueryStateModel(element);
        return queryStateModel && queryStateModel.get(QueryStateModel_1.QueryStateModel.attributesEnum.t);
    };
    LiveAnalyticsClient.prototype.resolveQueryStateModel = function (rootElement) {
        return Component_1.Component.resolveBinding(rootElement, QueryStateModel_1.QueryStateModel);
    };
    LiveAnalyticsClient.prototype.eventIsNotRelatedToSearchbox = function (event) {
        return event !== AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxSubmit.name && event !== AnalyticsActionListMeta_1.analyticsActionCauseList.searchboxClear.name;
    };
    LiveAnalyticsClient.prototype.triggerChangeAnalyticsCustomData = function (type, metaObject, event, data) {
        // This is for backward compatibility. Before the analytics were using either numbered
        // metas in `metaDataAsNumber` of later on named metas in `metaDataAsString`. Thus we still
        // provide those properties in a deprecated way. Below we are moving any data that put
        // in them to the root.
        metaObject['metaDataAsString'] = {};
        metaObject['metaDataAsNumber'] = {};
        var changeableAnalyticsDataObject = {
            language: event.language,
            originLevel1: event.originLevel1,
            originLevel2: event.originLevel2,
            originLevel3: event.originLevel3,
            metaObject: metaObject
        };
        var args = _.extend({}, {
            type: type,
            actionType: event.actionType,
            actionCause: event.actionCause
        }, changeableAnalyticsDataObject, data);
        Dom_1.$$(this.rootElement).trigger(AnalyticsEvents_1.AnalyticsEvents.changeAnalyticsCustomData, args);
        event.language = args.language;
        event.originLevel1 = args.originLevel1;
        event.originLevel2 = args.originLevel2;
        event.originLevel3 = args.originLevel3;
        event.customData = metaObject;
        // This is for backward compatibility. Before the analytics were using either numbered
        // metas in `metaDataAsNumber` of later on named metas in `metaDataAsString`. We are now putting
        // them all at the root, and if I encounter the older properties I move them to the top
        // level after issuing a warning.
        var metaDataAsString = event.customData['metaDataAsString'];
        if (_.keys(metaDataAsString).length > 0) {
            this.logger.warn("Using deprecated 'metaDataAsString' key to log custom analytics data. Custom meta should now be put at the root of the object.");
            _.extend(event.customData, metaDataAsString);
        }
        delete event.customData['metaDataAsString'];
        var metaDataAsNumber = event.customData['metaDataAsNumber'];
        if (_.keys(metaDataAsNumber).length > 0) {
            this.logger.warn("Using deprecated 'metaDataAsNumber' key to log custom analytics data. Custom meta should now be put at the root of the object.");
            _.extend(event.customData, metaDataAsNumber);
        }
        delete event.customData['metaDataAsNumber'];
    };
    LiveAnalyticsClient.prototype.merge = function (first, second) {
        return _.extend({}, first, second);
    };
    return LiveAnalyticsClient;
}());
exports.LiveAnalyticsClient = LiveAnalyticsClient;


/***/ }),
/* 172 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var APIAnalyticsBuilder = /** @class */ (function () {
    function APIAnalyticsBuilder() {
    }
    APIAnalyticsBuilder.convertSearchEventToAPI = function (searchEvent) {
        var apiSearchEvent = {
            advancedQuery: searchEvent.advancedQuery,
            customMetadatas: searchEvent.customData,
            device: searchEvent.device,
            didYouMean: searchEvent.didYouMean,
            language: searchEvent.language,
            pageNumber: searchEvent.pageNumber,
            queryText: searchEvent.queryText,
            responseTime: searchEvent.responseTime,
            numberOfResults: searchEvent.numberOfResults,
            resultsPerPage: searchEvent.resultsPerPage,
            searchHub: searchEvent.originLevel1,
            searchInterface: searchEvent.originLevel2,
            searchQueryUid: searchEvent.searchQueryUid,
            type: searchEvent.actionType,
            actionCause: searchEvent.actionCause,
            queryPipeline: searchEvent.queryPipeline,
            splitTestRunName: searchEvent.splitTestRunName,
            splitTestRunVersion: searchEvent.splitTestRunVersion
        };
        return apiSearchEvent;
    };
    APIAnalyticsBuilder.convertDocumentViewToAPI = function (documentView) {
        var apiDocumentView = {
            collectionName: documentView.collectionName,
            device: documentView.device,
            documentPosition: documentView.documentPosition,
            title: documentView.documentTitle,
            documentUrl: documentView.documentUrl,
            documentUri: documentView.documentUri,
            documentUriHash: documentView.documentUriHash,
            language: documentView.language,
            responseTime: documentView.responseTime,
            searchHub: documentView.originLevel1,
            searchInterface: documentView.originLevel2,
            searchQueryUid: documentView.searchQueryUid,
            sourceName: documentView.sourceName,
            viewMethod: documentView.viewMethod,
            customMetadatas: documentView.customData,
            actionCause: documentView.actionCause,
            queryPipeline: documentView.queryPipeline,
            splitTestRunName: documentView.splitTestRunName,
            splitTestRunVersion: documentView.splitTestRunVersion
        };
        return apiDocumentView;
    };
    APIAnalyticsBuilder.convertCustomEventToAPI = function (customEvent) {
        var apiCustomEvent = {
            actionCause: customEvent.actionCause,
            actionType: customEvent.actionType,
            device: customEvent.device,
            language: customEvent.language,
            responseTime: customEvent.responseTime,
            searchHub: customEvent.originLevel1,
            searchInterface: customEvent.originLevel2,
            customMetadatas: customEvent.customData
        };
        return apiCustomEvent;
    };
    return APIAnalyticsBuilder;
}());
exports.APIAnalyticsBuilder = APIAnalyticsBuilder;


/***/ }),
/* 173 */,
/* 174 */,
/* 175 */,
/* 176 */,
/* 177 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var Utils_1 = __webpack_require__(4);
var _ = __webpack_require__(0);
__webpack_require__(389);
var QueryEvents_1 = __webpack_require__(11);
var InitializationEvents_1 = __webpack_require__(17);
var ResultListEvents_1 = __webpack_require__(29);
var HashUtils_1 = __webpack_require__(42);
var ComponentsTypes_1 = __webpack_require__(47);
var InitializationPlaceholder = /** @class */ (function () {
    function InitializationPlaceholder(root) {
        this.root = root;
        this.facetPlaceholder = "<div class=\"coveo-placeholder-title\"></div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>\n    <div class=\"coveo-facet-placeholder-line\">\n      <div class=\"coveo-facet-placeholder-checkbox\"></div>\n      <div class=\"coveo-placeholder-text\"></div>\n    </div>";
        this.resultListPlaceholder = "<div class=\"coveo-result-frame coveo-placeholder-result\">\n  <div class=\"coveo-result-row\">\n    <div class=\"coveo-result-cell\" style=\"width:85px;text-align:center;\">\n      <div class=\"coveo-placeholder-icon\"></div>\n    </div>\n    <div class=\"coveo-result-cell\" style=\"padding-left:15px;\">\n      <div class=\"coveo-result-row\">\n        <div class=\"coveo-result-cell\">\n          <div class=\"coveo-placeholder-title\" style=\"width: 60%\"></div>\n        </div>\n        <div class=\"coveo-result-cell\" style=\"width:120px; text-align:right;\">\n          <div class=\"coveo-placeholder-text\" style=\"width: 80%\"></div>\n        </div>\n      </div>\n      <div class=\"coveo-result-row\">\n        <div class=\"coveo-result-cell\">\n          <div class=\"coveo-placeholder-text\" style=\"width: 70%\"></div>\n          <div class=\"coveo-placeholder-text\" style=\"width: 90%\"></div>\n          <div class=\"coveo-placeholder-text\" style=\"width: 60%\"></div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>";
        this.cardResultListPlaceholder = "<div class=\"coveo-card-layout coveo-placeholder-result CoveoResult\">\n  <div class=\"coveo-result-frame\">\n    <div class=\"coveo-result-row\" style=\"margin-bottom: 20px;\">\n      <div class=\"coveo-result-cell\" style=\"width: 32px; vertical-align: middle;\">\n        <div class=\"coveo-placeholder-icon-small\"></div>\n      </div>\n      <div class=\"coveo-result-cell\" style=\"text-align:left; padding-left: 10px; vertical-align: middle;\">\n        <div class=\"coveo-placeholder-title\" style=\"width: 60%\"></div>\n      </div>\n    </div>\n    <div class=\"coveo-result-row\" style=\"margin-bottom: 20px;\">\n      <div class=\"coveo-result-cell\">\n        <div class=\"coveo-placeholder-text\" style=\"width: 70%\"></div>\n        <div class=\"coveo-placeholder-text\" style=\"width: 90%\"></div>\n        <div class=\"coveo-placeholder-text\" style=\"width: 60%\"></div>\n      </div>\n      <div class=\"coveo-result-cell\">\n        <div class=\"coveo-placeholder-text\" style=\"width: 90%\"></div>\n        <div class=\"coveo-placeholder-text\" style=\"width: 70%\"></div>\n        <div class=\"coveo-placeholder-text\" style=\"width: 60%\"></div>\n      </div>\n    </div>\n    <div class=\"coveo-result-row\">\n      <div class=\"coveo-result-cell\">\n        <div class=\"coveo-placeholder-text\" style=\"width: 90%\"></div>\n          <div class=\"coveo-placeholder-text\" style=\"width: 100%\"></div>\n      </div>\n    </div>\n  </div>\n</div>\n";
        this.recommendationResultListPlaceholder = "<div class=\"coveo-result-frame coveo-placeholder-result\">\n  <div class=\"coveo-result-row\">\n    <div class=\"coveo-result-cell\" style=\"width: 32px; vertical-align: middle;\">\n        <div class=\"coveo-placeholder-icon-small\"></div>\n      </div>\n    <div class=\"coveo-result-cell\" style=\"padding-left:10px; vertical-align: middle;\">\n      <div class=\"coveo-result-row\">\n        <div class=\"coveo-result-cell\">\n          <div class=\"coveo-placeholder-title\" style=\"width: 90%\"></div>\n        </div>\n      </div>\n    </div>\n  </div>\n  ";
        this.eventToRemovePlaceholder = InitializationEvents_1.InitializationEvents.afterComponentsInitialization;
    }
    InitializationPlaceholder.prototype.withEventToRemovePlaceholder = function (event) {
        this.eventToRemovePlaceholder = event;
        return this;
    };
    InitializationPlaceholder.prototype.withFullInitializationStyling = function () {
        var _this = this;
        Dom_1.$$(this.root).addClass(InitializationPlaceholder.INITIALIZATION_CLASS);
        Dom_1.$$(this.root).removeClass(InitializationPlaceholder.AFTER_INITIALIZATION_CLASS);
        Dom_1.$$(this.root).one(this.eventToRemovePlaceholder, function () {
            Dom_1.$$(_this.root).removeClass(InitializationPlaceholder.INITIALIZATION_CLASS);
            Dom_1.$$(_this.root).addClass(InitializationPlaceholder.AFTER_INITIALIZATION_CLASS);
        });
        return this;
    };
    InitializationPlaceholder.prototype.withHiddenRootElement = function () {
        Dom_1.$$(this.root).addClass('coveo-hidden');
        return this;
    };
    InitializationPlaceholder.prototype.withVisibleRootElement = function () {
        Dom_1.$$(this.root).removeClass('coveo-hidden');
        return this;
    };
    InitializationPlaceholder.prototype.withWaitingForFirstQueryMode = function () {
        var _this = this;
        Dom_1.$$(this.root).addClass('coveo-waiting-for-query');
        Dom_1.$$(this.root).one(QueryEvents_1.QueryEvents.duringQuery, function () {
            Dom_1.$$(_this.root).removeClass('coveo-waiting-for-query');
        });
        return this;
    };
    InitializationPlaceholder.prototype.withAllPlaceholders = function () {
        this.withPlaceholderForFacets();
        this.withPlaceholderForResultList();
        this.withPlaceholderSearchbox();
        return this;
    };
    InitializationPlaceholder.prototype.withPlaceholderForFacets = function () {
        // Render an arbitrary number of placeholder facet.
        // Facets should become usable on the first deferredQuerySuccess
        var _this = this;
        var facetElements = ComponentsTypes_1.ComponentsTypes.getAllFacetElementsFromElement(this.root);
        if (Utils_1.Utils.isNonEmptyArray(facetElements)) {
            var placeholders_1 = [];
            _.each(facetElements, function (facetElement) { return Dom_1.$$(facetElement).addClass(InitializationPlaceholder.INITIALIZATION_CLASS); });
            _.each(_.first(facetElements, InitializationPlaceholder.NUMBER_OF_FACETS), function (facetElement) {
                Dom_1.$$(facetElement).addClass('coveo-with-placeholder');
                var placeHolder = Dom_1.$$('div', { className: 'coveo-facet-placeholder' }, _this.facetPlaceholder);
                facetElement.appendChild(placeHolder.el);
                placeholders_1.push(placeHolder);
            });
            Dom_1.$$(this.root).one(this.eventToRemovePlaceholder, function () {
                var toExecuteAfterInitialization = function () {
                    _.each(placeholders_1, function (placeholder) { return placeholder.remove(); });
                    _.each(facetElements, function (facetElement) {
                        return Dom_1.$$(facetElement).removeClass(InitializationPlaceholder.INITIALIZATION_CLASS);
                    });
                    _.each(facetElements, function (facetElement) { return Dom_1.$$(facetElement).removeClass('coveo-with-placeholder'); });
                };
                Dom_1.$$(_this.root).one(QueryEvents_1.QueryEvents.queryError, function () { return toExecuteAfterInitialization(); });
                Dom_1.$$(_this.root).one(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () { return toExecuteAfterInitialization(); });
            });
        }
        return this;
    };
    InitializationPlaceholder.prototype.withPlaceholderSearchbox = function () {
        // Searchbox should be good/usable afterComponentsInitialization
        // Create a placeholder until we reach that event.
        var searchBoxElements = Dom_1.$$(this.root).findAll('.CoveoSearchbox');
        if (Utils_1.Utils.isNonEmptyArray(searchBoxElements)) {
            _.each(searchBoxElements, function (el) {
                Dom_1.$$(el).addClass(InitializationPlaceholder.INITIALIZATION_CLASS);
            });
            Dom_1.$$(this.root).one(this.eventToRemovePlaceholder, function () {
                _.each(searchBoxElements, function (el) { return Dom_1.$$(el).removeClass(InitializationPlaceholder.INITIALIZATION_CLASS); });
            });
        }
        return this;
    };
    InitializationPlaceholder.prototype.withPlaceholderForResultList = function () {
        // Render an arbitrary number of placeholder in the first result list we find
        // When we get the first newResultDisplayedEvent, the result list should be usable.
        var resultListsElements = Dom_1.$$(this.root).findAll('.CoveoResultList');
        if (Utils_1.Utils.isNonEmptyArray(resultListsElements)) {
            _.each(resultListsElements, function (el) { return Dom_1.$$(el).addClass(InitializationPlaceholder.INITIALIZATION_CLASS); });
            var _a = this.determineResultListPlaceholder(resultListsElements), placeholderToUse_1 = _a.placeholderToUse, resultListToUse_1 = _a.resultListToUse, rootToUse_1 = _a.rootToUse;
            Dom_1.$$(resultListToUse_1).append(rootToUse_1);
            Dom_1.$$(resultListToUse_1).addClass('coveo-with-placeholder');
            _.times(this.isRecommendationRoot()
                ? InitializationPlaceholder.NUMBER_OF_RESULTS_RECOMMENDATION
                : InitializationPlaceholder.NUMBER_OF_RESULTS, function () {
                rootToUse_1.innerHTML += placeholderToUse_1;
            });
            var reset_1 = function () {
                Dom_1.$$(rootToUse_1).remove();
                _.each(resultListsElements, function (el) { return Dom_1.$$(el).removeClass(InitializationPlaceholder.INITIALIZATION_CLASS); });
                Dom_1.$$(resultListToUse_1).removeClass('coveo-with-placeholder');
            };
            Dom_1.$$(this.root).one(ResultListEvents_1.ResultListEvents.newResultDisplayed, function () { return reset_1(); });
            Dom_1.$$(this.root).one(QueryEvents_1.QueryEvents.queryError, function () { return reset_1(); });
            Dom_1.$$(this.root).one(QueryEvents_1.QueryEvents.noResults, function () { return reset_1(); });
        }
        return this;
    };
    InitializationPlaceholder.prototype.determineResultListPlaceholder = function (resultListElements) {
        var currentLayout;
        if (resultListElements.length > 1) {
            currentLayout = HashUtils_1.HashUtils.getValue('layout', HashUtils_1.HashUtils.getHash());
        }
        else if (resultListElements.length == 1) {
            currentLayout = resultListElements[0].getAttribute('data-layout');
        }
        if (!currentLayout) {
            currentLayout = 'list';
        }
        if (resultListElements.length > 1) {
            var resultListElement = _.find(resultListElements, function (resultListElement) {
                return resultListElement.getAttribute('data-layout') == currentLayout;
            });
            if (!resultListElement) {
                // No data-layout default to list
                resultListElement = _.find(resultListElements, function (resultListElement) {
                    return resultListElement.getAttribute('data-layout') == null;
                });
            }
            if (!resultListElement) {
                // Last fallback
                resultListElement = _.first(resultListElements);
            }
            return {
                placeholderToUse: this.determineResultListFromLayout(currentLayout),
                resultListToUse: resultListElement,
                rootToUse: this.determineRootFromLayout(currentLayout)
            };
        }
        else if (resultListElements.length == 1) {
            return {
                placeholderToUse: this.determineResultListFromLayout(currentLayout),
                resultListToUse: resultListElements[0],
                rootToUse: this.determineRootFromLayout(currentLayout)
            };
        }
        else {
            return null;
        }
    };
    InitializationPlaceholder.prototype.determineResultListFromLayout = function (layout) {
        switch (layout) {
            case 'list':
                if (this.isRecommendationRoot()) {
                    return this.recommendationResultListPlaceholder;
                }
                else {
                    return this.resultListPlaceholder;
                }
            case 'card':
                return this.cardResultListPlaceholder;
            default:
                return this.resultListPlaceholder;
        }
    };
    InitializationPlaceholder.prototype.determineRootFromLayout = function (layout) {
        switch (layout) {
            case 'list':
                return Dom_1.$$('div').el;
            case 'card':
                return Dom_1.$$('div', { className: 'coveo-result-list-container coveo-card-layout-container' }).el;
            default:
                return Dom_1.$$('div').el;
        }
    };
    InitializationPlaceholder.prototype.isRecommendationRoot = function () {
        return Dom_1.$$(this.root).hasClass('CoveoRecommendation');
    };
    InitializationPlaceholder.NUMBER_OF_FACETS = 3;
    InitializationPlaceholder.NUMBER_OF_RESULTS = 10;
    InitializationPlaceholder.NUMBER_OF_RESULTS_RECOMMENDATION = 5;
    InitializationPlaceholder.INITIALIZATION_CLASS = 'coveo-during-initialization';
    InitializationPlaceholder.AFTER_INITIALIZATION_CLASS = 'coveo-after-initialization';
    return InitializationPlaceholder;
}());
exports.InitializationPlaceholder = InitializationPlaceholder;


/***/ }),
/* 178 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = __webpack_require__(4);
var Strings_1 = __webpack_require__(6);
var _ = __webpack_require__(0);
var EmailUtils = /** @class */ (function () {
    function EmailUtils() {
    }
    EmailUtils.splitSemicolonSeparatedListOfEmailAddresses = function (addresses) {
        var addressesAsList = addresses.split(/\s*;\s*/);
        return _.filter(addressesAsList, function (s) {
            return Utils_1.Utils.exists(s) && Utils_1.Utils.isNonEmptyString(Utils_1.Utils.trim(s));
        });
    };
    EmailUtils.emailAddressesToHyperlinks = function (addresses, companyDomain, me, lengthLimit, truncateName) {
        if (lengthLimit === void 0) { lengthLimit = 2; }
        if (truncateName === void 0) { truncateName = false; }
        addresses = _.filter(addresses, function (s) {
            return Utils_1.Utils.exists(s) && Utils_1.Utils.isNonEmptyString(Utils_1.Utils.trim(s));
        });
        var hyperlinks = _.map(addresses, function (item) {
            var emailArray = EmailUtils.parseEmail(item);
            var email = emailArray[1];
            var name = emailArray[0];
            if (Utils_1.Utils.exists(me) && email == me) {
                name = Strings_1.l('Me');
            }
            if (truncateName) {
                var split = name.split(' ');
                if (!Utils_1.Utils.isNullOrUndefined(split[1])) {
                    name = split[0] + ' ' + split[1].substring(0, 1) + '.';
                }
            }
            var domainIndex = email.indexOf('@') >= 0 ? email.indexOf('@') + 1 : 0;
            var domain = email.substr(domainIndex);
            if (Utils_1.Utils.exists(companyDomain) && domain != companyDomain) {
                name += ' (' + domain + ')';
            }
            return '<a title="' + item.replace(/'/g, '&quot;') + '" href="mailto:' + encodeURI(email) + '">' + name + '</a>';
        });
        var excess = hyperlinks.length - lengthLimit;
        var andOthers = excess > 0 ? EmailUtils.buildEmailAddressesAndOthers(_.last(hyperlinks, excess)) : '';
        return _.first(hyperlinks, lengthLimit).join(', ') + andOthers;
    };
    EmailUtils.buildEmailAddressesAndOthers = function (excessHyperLinks) {
        return ('<span class="coveo-emails-excess-collapsed coveo-active" onclick="Coveo.TemplateHelpers.getHelper(\'excessEmailToggle\')(this);"> ' +
            Strings_1.l('AndOthers', excessHyperLinks.length.toString(), excessHyperLinks.length) +
            '</span>' +
            '<span class="coveo-emails-excess-expanded"> , ' +
            excessHyperLinks.join(' , ') +
            '</span>');
    };
    EmailUtils.parseEmail = function (email) {
        var name;
        var match = email.match(/^\s*(.*)\s+<(.*)>$/);
        if (match != null) {
            name = match[1];
            if (/^'.*'|'.*'$/.test(name)) {
                name = name.substr(1, name.length - 2);
            }
            email = match[2];
        }
        else {
            name = email;
            email = email;
        }
        return [name, email];
    };
    return EmailUtils;
}());
exports.EmailUtils = EmailUtils;


/***/ }),
/* 179 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var HTMLUtils = /** @class */ (function () {
    function HTMLUtils() {
    }
    HTMLUtils.buildAttributeString = function (options) {
        var ret = [];
        _.each(options, function (val, key, obj) {
            if (val != undefined) {
                ret.push(key + '=' + JSON.stringify(val.toString()));
            }
        });
        return ret.join(' ');
    };
    return HTMLUtils;
}());
exports.HTMLUtils = HTMLUtils;
var AnchorUtils = /** @class */ (function () {
    function AnchorUtils() {
    }
    AnchorUtils.buildAnchor = function (href, options) {
        var text;
        if (!options || !options.text) {
            text = href;
        }
        else {
            text = options.text;
            options.text = undefined;
        }
        return "<a href='" + href + "' " + HTMLUtils.buildAttributeString(options) + ">" + text + "</a>";
    };
    return AnchorUtils;
}());
exports.AnchorUtils = AnchorUtils;
var ImageUtils = /** @class */ (function () {
    function ImageUtils() {
    }
    ImageUtils.buildImage = function (src, options) {
        var ret = '<img ';
        ret += src ? "src='" + src + "' " : '';
        ret += HTMLUtils.buildAttributeString(options) + '/>';
        return ret;
    };
    ImageUtils.selectImageFromResult = function (result) {
        return document.querySelector("img[data-coveo-uri-hash=" + result.raw['urihash'] + "]");
    };
    ImageUtils.buildImageWithDirectSrcAttribute = function (endpoint, result) {
        var image = new Image();
        var dataStreamUri = endpoint.getViewAsDatastreamUri(result.uniqueId, '$Thumbnail$', { contentType: 'image/png' });
        image.onload = function () {
            ImageUtils.selectImageFromResult(result).setAttribute('src', dataStreamUri);
        };
        image.src = dataStreamUri;
    };
    ImageUtils.buildImageWithBase64SrcAttribute = function (endpoint, result) {
        endpoint
            .getRawDataStream(result.uniqueId, '$Thumbnail$')
            .then(function (response) {
            var rawBinary = String.fromCharCode.apply(null, new Uint8Array(response));
            ImageUtils.selectImageFromResult(result).setAttribute('src', 'data:image/png;base64, ' + btoa(rawBinary));
        })
            .catch(function () {
            ImageUtils.selectImageFromResult(result).remove();
        });
    };
    ImageUtils.buildImageFromResult = function (result, endpoint, options) {
        options = options ? options : {};
        var img = ImageUtils.buildImage(undefined, _.extend(options, { 'data-coveo-uri-hash': result.raw['urihash'] }));
        if (endpoint.isJsonp()) {
            // For jsonp we can't GET/POST for binary data. We are limited to only setting the src attribute directly on the img.
            ImageUtils.buildImageWithDirectSrcAttribute(endpoint, result);
        }
        else {
            // Base 64 img allows us to GET/POST the image as raw binary, so that we can also pass the credential of the user
            // Useful for phonegap.
            ImageUtils.buildImageWithBase64SrcAttribute(endpoint, result);
        }
        return img;
    };
    return ImageUtils;
}());
exports.ImageUtils = ImageUtils;


/***/ }),
/* 180 */,
/* 181 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var OS_NAME;
(function (OS_NAME) {
    OS_NAME[OS_NAME["WINDOWS"] = 0] = "WINDOWS";
    OS_NAME[OS_NAME["MACOSX"] = 1] = "MACOSX";
    OS_NAME[OS_NAME["UNIX"] = 2] = "UNIX";
    OS_NAME[OS_NAME["LINUX"] = 3] = "LINUX";
    OS_NAME[OS_NAME["UNKNOWN"] = 4] = "UNKNOWN";
})(OS_NAME = exports.OS_NAME || (exports.OS_NAME = {}));
var OSUtils = /** @class */ (function () {
    function OSUtils() {
    }
    OSUtils.get = function (nav) {
        if (nav === void 0) { nav = navigator; }
        var osName;
        if (nav.appVersion.indexOf('Win') != -1) {
            osName = OS_NAME.WINDOWS;
        }
        else if (nav.appVersion.indexOf('Mac') != -1) {
            osName = OS_NAME.MACOSX;
        }
        else if (nav.appVersion.indexOf('X11') != -1) {
            osName = OS_NAME.UNIX;
        }
        else if (nav.appVersion.indexOf('Linux') != -1) {
            osName = OS_NAME.LINUX;
        }
        else {
            osName = OS_NAME.UNKNOWN;
        }
        return osName;
    };
    return OSUtils;
}());
exports.OSUtils = OSUtils;


/***/ }),
/* 182 */,
/* 183 */,
/* 184 */,
/* 185 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var ExpressionBuilder_1 = __webpack_require__(75);
var Utils_1 = __webpack_require__(4);
var QueryBuilderExpression = /** @class */ (function () {
    function QueryBuilderExpression(basicExpression, advancedExpression, constantExpression, disjunctionExpression) {
        this.basicExpression = basicExpression;
        this.advancedExpression = advancedExpression;
        this.constantExpression = constantExpression;
        this.disjunctionExpression = disjunctionExpression;
    }
    QueryBuilderExpression.isEmpty = function (queryBuilderExpression) {
        var allNonEmptyValues = _.chain(queryBuilderExpression)
            .values()
            .compact()
            .value();
        return _.isEmpty(allNonEmptyValues);
    };
    QueryBuilderExpression.prototype.reset = function () {
        this.basicExpression = '';
        this.advancedExpression = '';
        this.constantExpression = '';
        this.disjunctionExpression = '';
    };
    Object.defineProperty(QueryBuilderExpression.prototype, "withoutConstant", {
        get: function () {
            return this.expressionBuilders.withoutConstantExpression.build();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "full", {
        get: function () {
            return ExpressionBuilder_1.ExpressionBuilder.mergeUsingOr(this.expressionBuilders.fullExpression, this.expressionBuilders.disjunctionExpression).build();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "basic", {
        get: function () {
            return this.expressionBuilders.basicExpression.build();
        },
        set: function (value) {
            this.basicExpression = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "advanced", {
        get: function () {
            return this.expressionBuilders.advancedExpression.build();
        },
        set: function (value) {
            this.advancedExpression = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "constant", {
        get: function () {
            return this.expressionBuilders.constantExpression.build();
        },
        set: function (value) {
            this.constantExpression = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(QueryBuilderExpression.prototype, "expressionBuilders", {
        get: function () {
            var addIfNotEmpty = function (expression, value) {
                if (Utils_1.Utils.isNonEmptyString(value)) {
                    expression.add(value);
                }
            };
            var basicExpression = new ExpressionBuilder_1.ExpressionBuilder();
            addIfNotEmpty(basicExpression, this.basicExpression);
            var advancedExpression = new ExpressionBuilder_1.ExpressionBuilder();
            addIfNotEmpty(advancedExpression, this.advancedExpression);
            var constantExpression = new ExpressionBuilder_1.ExpressionBuilder();
            addIfNotEmpty(constantExpression, this.constantExpression);
            var disjunctionExpression = new ExpressionBuilder_1.ExpressionBuilder();
            addIfNotEmpty(disjunctionExpression, this.disjunctionExpression);
            var withoutConstantExpression = ExpressionBuilder_1.ExpressionBuilder.merge(basicExpression, advancedExpression);
            var fullExpression = ExpressionBuilder_1.ExpressionBuilder.merge(basicExpression, advancedExpression, constantExpression);
            return {
                basicExpression: basicExpression,
                advancedExpression: advancedExpression,
                constantExpression: constantExpression,
                disjunctionExpression: disjunctionExpression,
                withoutConstantExpression: withoutConstantExpression,
                fullExpression: fullExpression
            };
        },
        enumerable: true,
        configurable: true
    });
    return QueryBuilderExpression;
}());
exports.QueryBuilderExpression = QueryBuilderExpression;


/***/ }),
/* 186 */,
/* 187 */,
/* 188 */,
/* 189 */,
/* 190 */,
/* 191 */,
/* 192 */,
/* 193 */,
/* 194 */,
/* 195 */,
/* 196 */,
/* 197 */,
/* 198 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var PopupVerticalAlignment;
(function (PopupVerticalAlignment) {
    PopupVerticalAlignment[PopupVerticalAlignment["TOP"] = 0] = "TOP";
    PopupVerticalAlignment[PopupVerticalAlignment["MIDDLE"] = 1] = "MIDDLE";
    PopupVerticalAlignment[PopupVerticalAlignment["BOTTOM"] = 2] = "BOTTOM";
    PopupVerticalAlignment[PopupVerticalAlignment["INNERTOP"] = 3] = "INNERTOP";
    PopupVerticalAlignment[PopupVerticalAlignment["INNERBOTTOM"] = 4] = "INNERBOTTOM";
})(PopupVerticalAlignment = exports.PopupVerticalAlignment || (exports.PopupVerticalAlignment = {}));
var PopupHorizontalAlignment;
(function (PopupHorizontalAlignment) {
    PopupHorizontalAlignment[PopupHorizontalAlignment["LEFT"] = 0] = "LEFT";
    PopupHorizontalAlignment[PopupHorizontalAlignment["CENTER"] = 1] = "CENTER";
    PopupHorizontalAlignment[PopupHorizontalAlignment["RIGHT"] = 2] = "RIGHT";
    PopupHorizontalAlignment[PopupHorizontalAlignment["INNERLEFT"] = 3] = "INNERLEFT";
    PopupHorizontalAlignment[PopupHorizontalAlignment["INNERRIGHT"] = 4] = "INNERRIGHT";
})(PopupHorizontalAlignment = exports.PopupHorizontalAlignment || (exports.PopupHorizontalAlignment = {}));
var PopupUtils = /** @class */ (function () {
    function PopupUtils() {
    }
    PopupUtils.positionPopup = function (popUp, nextTo, boundary, desiredPosition, appendTo, checkForBoundary) {
        if (checkForBoundary === void 0) { checkForBoundary = 0; }
        popUp.style.position = 'absolute';
        if (appendTo) {
            Dom_1.$$(appendTo).append(popUp);
        }
        desiredPosition.verticalOffset = desiredPosition.verticalOffset ? desiredPosition.verticalOffset : 0;
        desiredPosition.horizontalOffset = desiredPosition.horizontalOffset ? desiredPosition.horizontalOffset : 0;
        var popUpPosition = Dom_1.$$(nextTo).offset();
        PopupUtils.basicVerticalAlignment(popUpPosition, popUp, nextTo, desiredPosition);
        PopupUtils.basicHorizontalAlignment(popUpPosition, popUp, nextTo, desiredPosition);
        PopupUtils.finalAdjustement(Dom_1.$$(popUp).offset(), popUpPosition, popUp, desiredPosition);
        var popUpBoundary = PopupUtils.getBoundary(popUp);
        var boundaryPosition = PopupUtils.getBoundary(boundary);
        if (checkForBoundary < 2) {
            var checkBoundary = PopupUtils.checkForOutOfBoundary(popUpBoundary, boundaryPosition);
            if (checkBoundary.horizontal != 'ok' && desiredPosition.horizontalClip === true) {
                var width = popUp.offsetWidth;
                if (popUpBoundary.left < boundaryPosition.left) {
                    width -= boundaryPosition.left - popUpBoundary.left;
                }
                if (popUpBoundary.right > boundaryPosition.right) {
                    width -= popUpBoundary.right - boundaryPosition.right;
                }
                popUp.style.width = width + 'px';
                checkBoundary.horizontal = 'ok';
            }
            if (checkBoundary.vertical != 'ok' || checkBoundary.horizontal != 'ok') {
                var newDesiredPosition = PopupUtils.alignInsideBoundary(desiredPosition, checkBoundary);
                PopupUtils.positionPopup(popUp, nextTo, boundary, newDesiredPosition, appendTo, checkForBoundary + 1);
            }
        }
    };
    PopupUtils.finalAdjustement = function (popUpOffSet, popUpPosition, popUp, desiredPosition) {
        var position = Dom_1.$$(popUp).position();
        popUp.style.top = position.top + desiredPosition.verticalOffset - (popUpOffSet.top - popUpPosition.top) + 'px';
        popUp.style.left = position.left + desiredPosition.horizontalOffset - (popUpOffSet.left - popUpPosition.left) + 'px';
    };
    PopupUtils.basicVerticalAlignment = function (popUpPosition, popUp, nextTo, desiredPosition) {
        switch (desiredPosition.vertical) {
            case PopupVerticalAlignment.TOP:
                popUpPosition.top -= popUp.offsetHeight;
                break;
            case PopupVerticalAlignment.BOTTOM:
                popUpPosition.top += nextTo.offsetHeight;
                break;
            case PopupVerticalAlignment.MIDDLE:
                popUpPosition.top -= popUp.offsetHeight / 3;
            case PopupVerticalAlignment.INNERTOP:
                break; // Nothing to do, it's the default alignment normally
            case PopupVerticalAlignment.INNERBOTTOM:
                popUpPosition.top -= popUp.offsetHeight - nextTo.offsetHeight;
                break;
            default:
                break;
        }
    };
    PopupUtils.basicHorizontalAlignment = function (popUpPosition, popUp, nextTo, desiredPosition) {
        switch (desiredPosition.horizontal) {
            case PopupHorizontalAlignment.LEFT:
                popUpPosition.left -= popUp.offsetWidth;
                break;
            case PopupHorizontalAlignment.RIGHT:
                popUpPosition.left += nextTo.offsetWidth;
                break;
            case PopupHorizontalAlignment.CENTER:
                popUpPosition.left += PopupUtils.offSetToAlignCenter(popUp, nextTo);
                break;
            case PopupHorizontalAlignment.INNERLEFT:
                break; // Nothing to do, it's the default alignment normally
            case PopupHorizontalAlignment.INNERRIGHT:
                popUpPosition.left -= popUp.offsetWidth - nextTo.offsetWidth;
                break;
            default:
                break;
        }
    };
    PopupUtils.alignInsideBoundary = function (oldPosition, checkBoundary) {
        var newDesiredPosition = oldPosition;
        if (checkBoundary.horizontal == 'left') {
            newDesiredPosition.horizontal = PopupHorizontalAlignment.RIGHT;
        }
        if (checkBoundary.horizontal == 'right') {
            newDesiredPosition.horizontal = PopupHorizontalAlignment.LEFT;
        }
        if (checkBoundary.vertical == 'top') {
            newDesiredPosition.vertical = PopupVerticalAlignment.BOTTOM;
        }
        if (checkBoundary.vertical == 'bottom') {
            newDesiredPosition.vertical = PopupVerticalAlignment.TOP;
        }
        return newDesiredPosition;
    };
    PopupUtils.offSetToAlignCenter = function (popUp, nextTo) {
        return (nextTo.offsetWidth - popUp.offsetWidth) / 2;
    };
    PopupUtils.getBoundary = function (element) {
        var boundaryOffset = Dom_1.$$(element).offset();
        var toAddVertically;
        if (element.tagName.toLowerCase() == 'body') {
            toAddVertically = Math.max(element.scrollHeight, element.offsetHeight);
        }
        else if (element.tagName.toLowerCase() == 'html') {
            toAddVertically = Math.max(element.clientHeight, element.scrollHeight, element.offsetHeight);
        }
        else {
            toAddVertically = element.offsetHeight;
        }
        return {
            top: boundaryOffset.top,
            left: boundaryOffset.left,
            right: boundaryOffset.left + element.offsetWidth,
            bottom: boundaryOffset.top + toAddVertically
        };
    };
    PopupUtils.checkForOutOfBoundary = function (popUpBoundary, boundary) {
        var ret = {
            vertical: 'ok',
            horizontal: 'ok'
        };
        if (popUpBoundary.top < boundary.top) {
            ret.vertical = 'top';
        }
        if (popUpBoundary.bottom > boundary.bottom) {
            ret.vertical = 'bottom';
        }
        if (popUpBoundary.left < boundary.left) {
            ret.horizontal = 'left';
        }
        if (popUpBoundary.right > boundary.right) {
            ret.horizontal = 'right';
        }
        return ret;
    };
    return PopupUtils;
}());
exports.PopupUtils = PopupUtils;


/***/ }),
/* 199 */,
/* 200 */,
/* 201 */,
/* 202 */,
/* 203 */
/***/ (function(module, exports) {

// shim for using process in browser
var process = module.exports = {};

// cached from whatever global is present so that test runners that stub it
// don't break things.  But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals.  It's inside a
// function because try/catches deoptimize in certain engines.

var cachedSetTimeout;
var cachedClearTimeout;

function defaultSetTimout() {
    throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
    throw new Error('clearTimeout has not been defined');
}
(function () {
    try {
        if (typeof setTimeout === 'function') {
            cachedSetTimeout = setTimeout;
        } else {
            cachedSetTimeout = defaultSetTimout;
        }
    } catch (e) {
        cachedSetTimeout = defaultSetTimout;
    }
    try {
        if (typeof clearTimeout === 'function') {
            cachedClearTimeout = clearTimeout;
        } else {
            cachedClearTimeout = defaultClearTimeout;
        }
    } catch (e) {
        cachedClearTimeout = defaultClearTimeout;
    }
} ())
function runTimeout(fun) {
    if (cachedSetTimeout === setTimeout) {
        //normal enviroments in sane situations
        return setTimeout(fun, 0);
    }
    // if setTimeout wasn't available but was latter defined
    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
        cachedSetTimeout = setTimeout;
        return setTimeout(fun, 0);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedSetTimeout(fun, 0);
    } catch(e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
            return cachedSetTimeout.call(null, fun, 0);
        } catch(e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
            return cachedSetTimeout.call(this, fun, 0);
        }
    }


}
function runClearTimeout(marker) {
    if (cachedClearTimeout === clearTimeout) {
        //normal enviroments in sane situations
        return clearTimeout(marker);
    }
    // if clearTimeout wasn't available but was latter defined
    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
        cachedClearTimeout = clearTimeout;
        return clearTimeout(marker);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedClearTimeout(marker);
    } catch (e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
            return cachedClearTimeout.call(null, marker);
        } catch (e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
            return cachedClearTimeout.call(this, marker);
        }
    }



}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;

function cleanUpNextTick() {
    if (!draining || !currentQueue) {
        return;
    }
    draining = false;
    if (currentQueue.length) {
        queue = currentQueue.concat(queue);
    } else {
        queueIndex = -1;
    }
    if (queue.length) {
        drainQueue();
    }
}

function drainQueue() {
    if (draining) {
        return;
    }
    var timeout = runTimeout(cleanUpNextTick);
    draining = true;

    var len = queue.length;
    while(len) {
        currentQueue = queue;
        queue = [];
        while (++queueIndex < len) {
            if (currentQueue) {
                currentQueue[queueIndex].run();
            }
        }
        queueIndex = -1;
        len = queue.length;
    }
    currentQueue = null;
    draining = false;
    runClearTimeout(timeout);
}

process.nextTick = function (fun) {
    var args = new Array(arguments.length - 1);
    if (arguments.length > 1) {
        for (var i = 1; i < arguments.length; i++) {
            args[i - 1] = arguments[i];
        }
    }
    queue.push(new Item(fun, args));
    if (queue.length === 1 && !draining) {
        runTimeout(drainQueue);
    }
};

// v8 likes predictible objects
function Item(fun, array) {
    this.fun = fun;
    this.array = array;
}
Item.prototype.run = function () {
    this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};

function noop() {}

process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;

process.listeners = function (name) { return [] }

process.binding = function (name) {
    throw new Error('process.binding is not supported');
};

process.cwd = function () { return '/' };
process.chdir = function (dir) {
    throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };


/***/ }),
/* 204 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The `DistanceEvents` static class contains the string definitions of all events related to distance
 * list.
 *
 * See [Events](https://docs.coveo.com/en/417/).
 */
var DistanceEvents = /** @class */ (function () {
    function DistanceEvents() {
    }
    /**
     * Triggered when the [`DistanceResources`]{@link DistanceResources} component successfully resolves the position.
     *
     * All `onPositionResolved` event handlers receive a [`PositionResolvedEventArgs`]{@link IPositionResolvedEventArgs}
     * object as an argument.
     *
     * @type {string} The string value is `onPositionResolved`.
     */
    DistanceEvents.onPositionResolved = 'onPositionResolved';
    /**
     * Triggered when the [`DistanceResources`]{@link DistanceResources} component tries to resolve the position.
     *
     * All `onResolvingPosition` event handlers receive a
     * [`ResolvingPositionEventArgs`]{@link IResolvingPositionEventArgs} object as an argument.
     *
     * **Note:**
     * > You should bind a handler to this event if you want to register one or several new position providers.
     *
     * @type {string} The string value is `onResolvingPosition`.
     */
    DistanceEvents.onResolvingPosition = 'onResolvingPosition';
    /**
     * Triggered when the [`DistanceResources`]{@link DistanceResources} component fails to resolve the position.
     *
     * **Note:**
     * > You should bind a handler to this event if you want to display an error message to the end user, or hide
     * > components that cannot be used.
     *
     * @type {string} The string value is `onPositionNotResolved`.
     */
    DistanceEvents.onPositionNotResolved = 'onPositionNotResolved';
    return DistanceEvents;
}());
exports.DistanceEvents = DistanceEvents;


/***/ }),
/* 205 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Model_1 = __webpack_require__(18);
exports.Model = Model_1.Model;
var QueryStateModel_1 = __webpack_require__(13);
exports.QueryStateModel = QueryStateModel_1.QueryStateModel;
var ComponentOptionsModel_1 = __webpack_require__(28);
exports.ComponentOptionsModel = ComponentOptionsModel_1.ComponentOptionsModel;
var ComponentStateModel_1 = __webpack_require__(79);
exports.ComponentStateModel = ComponentStateModel_1.ComponentStateModel;


/***/ }),
/* 206 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Globalize = __webpack_require__(23);
var underscore_1 = __webpack_require__(0);
var Strings_1 = __webpack_require__(6);
var RegisteredNamedMethods_1 = __webpack_require__(30);
var Dom_1 = __webpack_require__(1);
var QuerySummaryUtils = /** @class */ (function () {
    function QuerySummaryUtils() {
    }
    QuerySummaryUtils.message = function (root, data) {
        var messageBuilder = QuerySummaryUtils.messageBuilderForMode(root);
        var strings = QuerySummaryUtils.getSummaryStrings(data);
        return messageBuilder(data, strings);
    };
    QuerySummaryUtils.htmlMessage = function (root, data) {
        var messageBuilder = QuerySummaryUtils.messageBuilderForMode(root);
        var strings = QuerySummaryUtils.getHtmlSummaryStrings(data);
        return messageBuilder(data, strings);
    };
    QuerySummaryUtils.replaceQueryTags = function (template, replacement) {
        var queryTag = /\$\{query\}/g;
        return template ? template.replace(queryTag, replacement) : '';
    };
    QuerySummaryUtils.messageBuilderForMode = function (root) {
        if (QuerySummaryUtils.isInfiniteScrollMode(root)) {
            return QuerySummaryUtils.buildInfiniteScrollMessage;
        }
        return QuerySummaryUtils.buildStandardMessage;
    };
    QuerySummaryUtils.isInfiniteScrollMode = function (root) {
        var resultListSelector = ".CoveoResultList";
        var resultLists = Dom_1.$$(root).findAll(resultListSelector);
        return underscore_1.any(resultLists, function (resultList) {
            var options = RegisteredNamedMethods_1.get(resultList).options;
            return options && options.enableInfiniteScroll;
        });
    };
    QuerySummaryUtils.buildStandardMessage = function (data, strings) {
        var numOfResults = data.results.results.length;
        var messages = {
            includingQuery: Strings_1.l('ShowingResultsOfWithQuery', strings.first, strings.last, strings.totalCount, strings.query, numOfResults),
            excludingQuery: Strings_1.l('ShowingResultsOf', strings.first, strings.last, strings.totalCount, numOfResults)
        };
        return QuerySummaryUtils.buildMessage(data, messages);
    };
    QuerySummaryUtils.buildInfiniteScrollMessage = function (data, strings) {
        var numOfResults = data.results.results.length;
        var messages = {
            includingQuery: Strings_1.l('ShowingResultsWithQuery', strings.totalCount, strings.query, numOfResults),
            excludingQuery: Strings_1.l('ShowingResults', strings.totalCount, numOfResults)
        };
        return QuerySummaryUtils.buildMessage(data, messages);
    };
    QuerySummaryUtils.buildMessage = function (data, message) {
        var numOfResults = data.results.results.length;
        var sanitizedQuery = QuerySummaryUtils.sanitizeQuery(data.query);
        if (!numOfResults) {
            return '';
        }
        return sanitizedQuery ? message.includingQuery : message.excludingQuery;
    };
    QuerySummaryUtils.getHtmlSummaryStrings = function (data) {
        var strings = QuerySummaryUtils.getSummaryStrings(data);
        return {
            first: QuerySummaryUtils.wrapWithSpanTag(strings.first, 'first'),
            last: QuerySummaryUtils.wrapWithSpanTag(strings.last, 'last'),
            totalCount: QuerySummaryUtils.wrapWithSpanTag(strings.totalCount, 'total-count'),
            query: QuerySummaryUtils.wrapWithSpanTag(strings.query, 'query')
        };
    };
    QuerySummaryUtils.wrapWithSpanTag = function (word, classSuffix) {
        return Dom_1.$$('span', { className: "coveo-highlight coveo-highlight-" + classSuffix }, word).el.outerHTML;
    };
    QuerySummaryUtils.getSummaryStrings = function (data) {
        var queryPerformed = data.query;
        var queryResults = data.results;
        var first = Globalize.format(queryPerformed.firstResult + 1, 'n0');
        var last = Globalize.format(queryPerformed.firstResult + queryResults.results.length, 'n0');
        var totalCount = Globalize.format(queryResults.totalCountFiltered, 'n0');
        var query = QuerySummaryUtils.sanitizeQuery(queryPerformed);
        return { first: first, last: last, totalCount: totalCount, query: query };
    };
    QuerySummaryUtils.sanitizeQuery = function (query) {
        return query.q ? underscore_1.escape(query.q.trim()) : '';
    };
    return QuerySummaryUtils;
}());
exports.QuerySummaryUtils = QuerySummaryUtils;


/***/ }),
/* 207 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(394);
var Dom_1 = __webpack_require__(1);
var AnalyticsActionListMeta_1 = __webpack_require__(10);
var Core_1 = __webpack_require__(20);
var SVGIcons_1 = __webpack_require__(12);
var Model_1 = __webpack_require__(18);
var QueryStateModel_1 = __webpack_require__(13);
var XRegExp = __webpack_require__(208);
var underscore_1 = __webpack_require__(0);
var AccessibilityUtils_1 = __webpack_require__(48);
var MissingTermManager = /** @class */ (function () {
    function MissingTermManager(args) {
        var _this = this;
        this.args = args;
        Dom_1.$$(args.element).on(Core_1.QueryEvents.doneBuildingQuery, function (event, args) {
            return _this.handleBuildingQuery(args);
        });
        Dom_1.$$(args.element).on("state:" + Model_1.MODEL_EVENTS.CHANGE_ONE + QueryStateModel_1.QUERY_STATE_ATTRIBUTES.Q, function (evt, args) {
            return _this.handleQueryChange(args);
        });
        Dom_1.$$(args.element).on(Core_1.BreadcrumbEvents.populateBreadcrumb, function (evt, args) {
            _this.handlePopulateBreadcrumb(args);
        });
        Dom_1.$$(args.element).on(Core_1.BreadcrumbEvents.clearBreadcrumb, function (evt, args) { return _this.handleClearBreadcrumb(); });
    }
    MissingTermManager.prototype.handleBuildingQuery = function (data) {
        var currentMissingTerm = this.args.queryStateModel.get('missingTerms');
        currentMissingTerm.forEach(function (term) {
            data.queryBuilder.advancedExpression.add(term);
        });
    };
    Object.defineProperty(MissingTermManager.prototype, "termsForcedToAppear", {
        get: function () {
            return this.args.queryStateModel.get('missingTerms').slice();
        },
        enumerable: true,
        configurable: true
    });
    MissingTermManager.prototype.setUpdateTermsForcedToAppear = function (terms) {
        this.args.queryStateModel.set('missingTerms', terms.slice());
    };
    MissingTermManager.prototype.handlePopulateBreadcrumb = function (args) {
        if (this.termsForcedToAppear.length === 0) {
            return;
        }
        var missingTerms = this.buildTermForcedToAppear();
        var BreadcrumbContainer = this.buildBreadcrumbContainer(args.headingLevel);
        missingTerms.forEach(function (term) { return Dom_1.$$(BreadcrumbContainer).append(term.el); });
        args.breadcrumbs.push({
            element: BreadcrumbContainer.el
        });
    };
    MissingTermManager.prototype.buildTermForcedToAppear = function () {
        var _this = this;
        return this.termsForcedToAppear.map(function (term) {
            var termContainer = Dom_1.$$('button', {
                type: 'button',
                className: 'coveo-missing-term-breadcrumb-value coveo-accessible-button'
            }, Dom_1.$$('span', { className: 'coveo-missing-term-breadcrumb-caption' }, underscore_1.escape(term)), Dom_1.$$('span', { className: 'coveo-missing-term-breadcrumb-clear' }, SVGIcons_1.SVGIcons.icons.mainClear));
            termContainer.on('click', function () { return _this.removeTermForcedToAppear(term); });
            return termContainer;
        });
    };
    MissingTermManager.prototype.buildBreadcrumbContainer = function (headingLevel) {
        return Dom_1.$$('div', {
            className: 'coveo-remove-term-container'
        }, Dom_1.$$(AccessibilityUtils_1.getHeadingTag(headingLevel, 'span'), {
            className: 'coveo-missing-term-breadcrumb-title'
        }, Core_1.l('MustContain')));
    };
    MissingTermManager.prototype.removeTermForcedToAppear = function (term) {
        var termsForcedToAppearCopy = this.termsForcedToAppear;
        var termIndex = termsForcedToAppearCopy.indexOf(term);
        termsForcedToAppearCopy.splice(termIndex, 1);
        this.setUpdateTermsForcedToAppear(termsForcedToAppearCopy);
        this.logAnalyticsRemoveMissingTerm(term);
        this.args.queryController.executeQuery();
    };
    MissingTermManager.prototype.logAnalyticsRemoveMissingTerm = function (term) {
        this.args.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.removeMissingTerm, {
            missingTerm: term
        });
    };
    MissingTermManager.prototype.handleClearBreadcrumb = function () {
        this.setUpdateTermsForcedToAppear([]);
    };
    MissingTermManager.prototype.handleQueryChange = function (args) {
        this.updateTermsForcedToAppearToOnlyIncludeWords(args);
        var breadcrumbSelector = document.querySelector('.CoveoBreadcrumb');
        if (!breadcrumbSelector) {
            return;
        }
        var breadcrumb = Core_1.get(breadcrumbSelector);
        if (breadcrumb) {
            breadcrumb.getBreadcrumbs();
            Dom_1.$$(this.args.element).trigger(Core_1.BreadcrumbEvents.redrawBreadcrumb);
        }
    };
    MissingTermManager.prototype.updateTermsForcedToAppearToOnlyIncludeWords = function (args) {
        var termForcedToAppearCopy = this.termsForcedToAppear;
        this.termsForcedToAppear.forEach(function (term) {
            var regex = XRegExp(MissingTermManager.wordBoundary + "(" + term + ")" + MissingTermManager.wordBoundary, 'g');
            if (!regex.test(args.value)) {
                var termIndex = termForcedToAppearCopy.indexOf(term);
                termForcedToAppearCopy.splice(termIndex, 1);
            }
        });
        this.setUpdateTermsForcedToAppear(termForcedToAppearCopy);
    };
    MissingTermManager.ID = 'MissingTermManager';
    // We only need to import one Asian characters script because what is important here is the space
    // between characters and any of those scripts will contain it.
    // p{Han}: import the unicode script for chinese caracter
    // List of script: https://www.fontspace.com/unicode/script
    MissingTermManager.wordBoundary = '(([\\p{Han}])?([^(\\p{Latin}-)])|^|$)';
    return MissingTermManager;
}());
exports.MissingTermManager = MissingTermManager;


/***/ }),
/* 208 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(37);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _xregexp = _interopRequireDefault(__webpack_require__(395));

var _build = _interopRequireDefault(__webpack_require__(438));

var _matchrecursive = _interopRequireDefault(__webpack_require__(439));

var _unicodeBase = _interopRequireDefault(__webpack_require__(440));

var _unicodeBlocks = _interopRequireDefault(__webpack_require__(441));

var _unicodeCategories = _interopRequireDefault(__webpack_require__(443));

var _unicodeProperties = _interopRequireDefault(__webpack_require__(445));

var _unicodeScripts = _interopRequireDefault(__webpack_require__(447));

(0, _build.default)(_xregexp.default);
(0, _matchrecursive.default)(_xregexp.default);
(0, _unicodeBase.default)(_xregexp.default);
(0, _unicodeBlocks.default)(_xregexp.default);
(0, _unicodeCategories.default)(_xregexp.default);
(0, _unicodeProperties.default)(_xregexp.default);
(0, _unicodeScripts.default)(_xregexp.default);
var _default = _xregexp.default;
exports.default = _default;
module.exports = exports["default"];

/***/ }),
/* 209 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var StorageUtils = /** @class */ (function () {
    function StorageUtils(id, storageProvider) {
        if (storageProvider === void 0) { storageProvider = 'local'; }
        this.id = id;
        // This check must be made in a try/catch. If cookies are disabled for a
        // browser then window.localStorage will throw an undefined exception.
        try {
            switch (storageProvider) {
                case 'local':
                    this.storage = window.localStorage;
                    break;
                case 'session':
                    this.storage = window.sessionStorage;
                    break;
                default:
                    this.storage = null;
            }
        }
        catch (error) {
            this.storage = null;
        }
    }
    StorageUtils.prototype.save = function (data) {
        if (!this.storage) {
            return;
        }
        try {
            this.storage.setItem(this.getStorageKey(), JSON.stringify(data));
        }
        catch (error) { }
    };
    StorageUtils.prototype.load = function () {
        if (!this.storage) {
            return null;
        }
        try {
            var value = this.storage.getItem(this.getStorageKey());
            return value && JSON.parse(value);
        }
        catch (error) {
            return null;
        }
    };
    StorageUtils.prototype.remove = function (key) {
        if (!this.storage) {
            return;
        }
        try {
            if (key == undefined) {
                this.storage.removeItem(this.getStorageKey());
            }
            else {
                var oldObj = this.load();
                delete oldObj[key];
                this.save(oldObj);
            }
        }
        catch (error) { }
    };
    StorageUtils.prototype.getStorageKey = function () {
        return 'coveo-' + this.id;
    };
    return StorageUtils;
}());
exports.StorageUtils = StorageUtils;


/***/ }),
/* 210 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var LiveAnalyticsClient_1 = __webpack_require__(171);
var AnalyticsActionListMeta_1 = __webpack_require__(10);
var Component_1 = __webpack_require__(7);
var SearchInterface_1 = __webpack_require__(19);
var _ = __webpack_require__(0);
var RecommendationAnalyticsClient = /** @class */ (function (_super) {
    __extends(RecommendationAnalyticsClient, _super);
    function RecommendationAnalyticsClient(endpoint, rootElement, userId, userDisplayName, anonymous, splitTestRunName, splitTestRunVersion, originLevel1, sendToCloud, bindings) {
        var _this = _super.call(this, endpoint, rootElement, userId, userDisplayName, anonymous, splitTestRunName, splitTestRunVersion, originLevel1, sendToCloud, bindings) || this;
        _this.endpoint = endpoint;
        _this.rootElement = rootElement;
        _this.userId = userId;
        _this.userDisplayName = userDisplayName;
        _this.anonymous = anonymous;
        _this.splitTestRunName = splitTestRunName;
        _this.splitTestRunVersion = splitTestRunVersion;
        _this.originLevel1 = originLevel1;
        _this.sendToCloud = sendToCloud;
        _this.bindings = bindings;
        _this.recommendation = _this.bindings.searchInterface;
        return _this;
    }
    RecommendationAnalyticsClient.prototype.logSearchEvent = function (actionCause, meta) {
        if (actionCause == AnalyticsActionListMeta_1.analyticsActionCauseList.interfaceLoad) {
            actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.recommendationInterfaceLoad;
        }
        _super.prototype.logSearchEvent.call(this, actionCause, meta);
    };
    RecommendationAnalyticsClient.prototype.logClickEvent = function (actionCause, meta, result, element) {
        if (actionCause == AnalyticsActionListMeta_1.analyticsActionCauseList.documentOpen) {
            actionCause = AnalyticsActionListMeta_1.analyticsActionCauseList.recommendationOpen;
        }
        var promises = [_super.prototype.logClickEvent.call(this, actionCause, meta, result, element)];
        if (this.recommendation.mainQuerySearchUID && this.recommendation.mainQueryPipeline != null) {
            // We log a second click associated with the main interface query to tell the analytics that the query was a success.
            var mainInterface = Component_1.Component.get(this.recommendation.options.mainSearchInterface, SearchInterface_1.SearchInterface);
            result.queryUid = this.recommendation.mainQuerySearchUID;
            result.pipeline = this.recommendation.mainQueryPipeline;
            promises.push(mainInterface.usageAnalytics.logClickEvent(actionCause, meta, result, element));
        }
        return Promise.all(promises).then(function (responses) { return _.first(responses); });
    };
    RecommendationAnalyticsClient.prototype.getOriginLevel2 = function (element) {
        return this.recommendation.getId();
    };
    return RecommendationAnalyticsClient;
}(LiveAnalyticsClient_1.LiveAnalyticsClient));
exports.RecommendationAnalyticsClient = RecommendationAnalyticsClient;


/***/ }),
/* 211 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
exports.underscoreInstance = _;
setCoveoUnderscore();
function setCoveoUnderscore() {
    if (window['Coveo'] == undefined) {
        window['Coveo'] = {};
    }
    if (window['Coveo']['_'] == undefined) {
        window['Coveo']['_'] = _;
        setTemplateSettings(window['Coveo']['_']);
        exports.underscoreInstance = window['Coveo']['_'];
    }
}
function setTemplateSettings(_a) {
    var templateSettings = _a.templateSettings;
    templateSettings.evaluate = /(?:<%|{{)([\s\S]+?)(?:%>|}})/g;
    templateSettings.interpolate = /(?:<%|{{)=([\s\S]+?)(?:%>|}})/g;
    templateSettings.escape = /(?:<%|{{)-([\s\S]+?)(?:%>|}})/g;
}
var previousUnderscore = window['_'];
window['_'] = _;
// Run Underscore.js in "noConflict" mode, returning the `_` variable to its previous owner.
// Returns a reference to the Underscore object. This method was removed from the module in v1.10.0
window['_'].noConflict = function () {
    window['_'] = previousUnderscore;
    return _;
};
setTemplateSettings(window['_']);


/***/ }),
/* 212 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsActionListMeta_1 = __webpack_require__(10);
var AnalyticsUtils = /** @class */ (function () {
    function AnalyticsUtils() {
    }
    AnalyticsUtils.addActionCauseToList = function (newActionCause) {
        if (newActionCause.name && newActionCause.type) {
            AnalyticsActionListMeta_1.analyticsActionCauseList[newActionCause.name] = newActionCause;
        }
    };
    AnalyticsUtils.removeActionCauseFromList = function (actionCauseToRemoveName) {
        delete AnalyticsActionListMeta_1.analyticsActionCauseList[actionCauseToRemoveName];
    };
    return AnalyticsUtils;
}());
exports.AnalyticsUtils = AnalyticsUtils;


/***/ }),
/* 213 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var _ = __webpack_require__(0);
if (!initCoveoJQuery()) {
    // Adding a check in case jQuery was added after the jsSearch
    // Since this event listener is registered before the Coveo.init call, JQuery should always be initiated before the Coveo.init call
    document.addEventListener('DOMContentLoaded', function () {
        initCoveoJQuery();
    });
}
function initCoveoJQuery() {
    if (!jQueryIsDefined()) {
        return false;
    }
    exports.jQueryInstance = getJQuery();
    if (window['Coveo'] == undefined) {
        window['Coveo'] = {};
    }
    if (window['Coveo']['$'] == undefined) {
        window['Coveo']['$'] = exports.jQueryInstance;
    }
    exports.jQueryInstance.fn.coveo = function () {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var returnValue;
        this.each(function (index, element) {
            var returnValueForThisElement;
            if (_.isString(args[0])) {
                var token = args[0];
                returnValueForThisElement = Initialization_1.Initialization.dispatchNamedMethodCallOrComponentCreation(token, element, args.slice(1));
            }
            else {
                // Invoking with no method name is a shortcut for the 'get' method (from Component).
                returnValueForThisElement = Initialization_1.Initialization.dispatchNamedMethodCall('get', element, args);
            }
            // Keep only the first return value we encounter
            returnValue = returnValue || returnValueForThisElement;
        });
        return returnValue;
    };
    return true;
}
exports.initCoveoJQuery = initCoveoJQuery;
function jQueryIsDefined() {
    return jQueryDefinedOnWindow() || jQueryDefinedOnCoveoObject();
}
exports.jQueryIsDefined = jQueryIsDefined;
function jQueryDefinedOnCoveoObject() {
    return window['Coveo'] != undefined && window['Coveo']['$'] != undefined;
}
function jQueryDefinedOnWindow() {
    return window['$'] != undefined && window['$'].fn != undefined && window['$'].fn.jquery != undefined;
}
function getJQuery() {
    var jQueryInstance;
    if (window['$']) {
        jQueryInstance = window['$'];
    }
    else {
        jQueryInstance = window['Coveo']['$'];
    }
    return jQueryInstance;
}


/***/ }),
/* 214 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
exports.fields = ['ytthumbnailurl'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('YouTubeThumbnail', exports.fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 215 */,
/* 216 */,
/* 217 */,
/* 218 */,
/* 219 */,
/* 220 */,
/* 221 */,
/* 222 */,
/* 223 */,
/* 224 */,
/* 225 */,
/* 226 */,
/* 227 */,
/* 228 */,
/* 229 */,
/* 230 */,
/* 231 */,
/* 232 */,
/* 233 */,
/* 234 */,
/* 235 */,
/* 236 */,
/* 237 */,
/* 238 */,
/* 239 */,
/* 240 */,
/* 241 */,
/* 242 */,
/* 243 */,
/* 244 */,
/* 245 */,
/* 246 */,
/* 247 */,
/* 248 */,
/* 249 */,
/* 250 */,
/* 251 */,
/* 252 */,
/* 253 */,
/* 254 */,
/* 255 */,
/* 256 */,
/* 257 */,
/* 258 */,
/* 259 */,
/* 260 */,
/* 261 */,
/* 262 */,
/* 263 */,
/* 264 */,
/* 265 */,
/* 266 */,
/* 267 */,
/* 268 */,
/* 269 */,
/* 270 */,
/* 271 */,
/* 272 */,
/* 273 */,
/* 274 */,
/* 275 */,
/* 276 */,
/* 277 */,
/* 278 */,
/* 279 */,
/* 280 */,
/* 281 */,
/* 282 */,
/* 283 */,
/* 284 */,
/* 285 */,
/* 286 */,
/* 287 */,
/* 288 */,
/* 289 */,
/* 290 */,
/* 291 */,
/* 292 */,
/* 293 */,
/* 294 */,
/* 295 */,
/* 296 */,
/* 297 */,
/* 298 */,
/* 299 */,
/* 300 */,
/* 301 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
// This file can be required in Browserify and Node.js for automatic polyfill
// To use it:  require('es6-promise/auto');

module.exports = __webpack_require__(302).polyfill();


/***/ }),
/* 302 */
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(process, global) {/*!
 * @overview es6-promise - a tiny implementation of Promises/A+.
 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
 * @license   Licensed under MIT license
 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
 * @version   v4.2.4+314e4831
 */

(function (global, factory) {
	 true ? module.exports = factory() :
	typeof define === 'function' && define.amd ? define(factory) :
	(global.ES6Promise = factory());
}(this, (function () { 'use strict';

function objectOrFunction(x) {
  var type = typeof x;
  return x !== null && (type === 'object' || type === 'function');
}

function isFunction(x) {
  return typeof x === 'function';
}



var _isArray = void 0;
if (Array.isArray) {
  _isArray = Array.isArray;
} else {
  _isArray = function (x) {
    return Object.prototype.toString.call(x) === '[object Array]';
  };
}

var isArray = _isArray;

var len = 0;
var vertxNext = void 0;
var customSchedulerFn = void 0;

var asap = function asap(callback, arg) {
  queue[len] = callback;
  queue[len + 1] = arg;
  len += 2;
  if (len === 2) {
    // If len is 2, that means that we need to schedule an async flush.
    // If additional callbacks are queued before the queue is flushed, they
    // will be processed by this flush that we are scheduling.
    if (customSchedulerFn) {
      customSchedulerFn(flush);
    } else {
      scheduleFlush();
    }
  }
};

function setScheduler(scheduleFn) {
  customSchedulerFn = scheduleFn;
}

function setAsap(asapFn) {
  asap = asapFn;
}

var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';

// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';

// node
function useNextTick() {
  // node version 0.10.x displays a deprecation warning when nextTick is used recursively
  // see https://github.com/cujojs/when/issues/410 for details
  return function () {
    return process.nextTick(flush);
  };
}

// vertx
function useVertxTimer() {
  if (typeof vertxNext !== 'undefined') {
    return function () {
      vertxNext(flush);
    };
  }

  return useSetTimeout();
}

function useMutationObserver() {
  var iterations = 0;
  var observer = new BrowserMutationObserver(flush);
  var node = document.createTextNode('');
  observer.observe(node, { characterData: true });

  return function () {
    node.data = iterations = ++iterations % 2;
  };
}

// web worker
function useMessageChannel() {
  var channel = new MessageChannel();
  channel.port1.onmessage = flush;
  return function () {
    return channel.port2.postMessage(0);
  };
}

function useSetTimeout() {
  // Store setTimeout reference so es6-promise will be unaffected by
  // other code modifying setTimeout (like sinon.useFakeTimers())
  var globalSetTimeout = setTimeout;
  return function () {
    return globalSetTimeout(flush, 1);
  };
}

var queue = new Array(1000);
function flush() {
  for (var i = 0; i < len; i += 2) {
    var callback = queue[i];
    var arg = queue[i + 1];

    callback(arg);

    queue[i] = undefined;
    queue[i + 1] = undefined;
  }

  len = 0;
}

function attemptVertx() {
  try {
    var vertx = Function('return this')().require('vertx');
    vertxNext = vertx.runOnLoop || vertx.runOnContext;
    return useVertxTimer();
  } catch (e) {
    return useSetTimeout();
  }
}

var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
  scheduleFlush = useNextTick();
} else if (BrowserMutationObserver) {
  scheduleFlush = useMutationObserver();
} else if (isWorker) {
  scheduleFlush = useMessageChannel();
} else if (browserWindow === undefined && "function" === 'function') {
  scheduleFlush = attemptVertx();
} else {
  scheduleFlush = useSetTimeout();
}

function then(onFulfillment, onRejection) {
  var parent = this;

  var child = new this.constructor(noop);

  if (child[PROMISE_ID] === undefined) {
    makePromise(child);
  }

  var _state = parent._state;


  if (_state) {
    var callback = arguments[_state - 1];
    asap(function () {
      return invokeCallback(_state, child, callback, parent._result);
    });
  } else {
    subscribe(parent, child, onFulfillment, onRejection);
  }

  return child;
}

/**
  `Promise.resolve` returns a promise that will become resolved with the
  passed `value`. It is shorthand for the following:

  ```javascript
  let promise = new Promise(function(resolve, reject){
    resolve(1);
  });

  promise.then(function(value){
    // value === 1
  });
  ```

  Instead of writing the above, your code now simply becomes the following:

  ```javascript
  let promise = Promise.resolve(1);

  promise.then(function(value){
    // value === 1
  });
  ```

  @method resolve
  @static
  @param {Any} value value that the returned promise will be resolved with
  Useful for tooling.
  @return {Promise} a promise that will become fulfilled with the given
  `value`
*/
function resolve$1(object) {
  /*jshint validthis:true */
  var Constructor = this;

  if (object && typeof object === 'object' && object.constructor === Constructor) {
    return object;
  }

  var promise = new Constructor(noop);
  resolve(promise, object);
  return promise;
}

var PROMISE_ID = Math.random().toString(36).substring(2);

function noop() {}

var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;

var TRY_CATCH_ERROR = { error: null };

function selfFulfillment() {
  return new TypeError("You cannot resolve a promise with itself");
}

function cannotReturnOwn() {
  return new TypeError('A promises callback cannot return that same promise.');
}

function getThen(promise) {
  try {
    return promise.then;
  } catch (error) {
    TRY_CATCH_ERROR.error = error;
    return TRY_CATCH_ERROR;
  }
}

function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
  try {
    then$$1.call(value, fulfillmentHandler, rejectionHandler);
  } catch (e) {
    return e;
  }
}

function handleForeignThenable(promise, thenable, then$$1) {
  asap(function (promise) {
    var sealed = false;
    var error = tryThen(then$$1, thenable, function (value) {
      if (sealed) {
        return;
      }
      sealed = true;
      if (thenable !== value) {
        resolve(promise, value);
      } else {
        fulfill(promise, value);
      }
    }, function (reason) {
      if (sealed) {
        return;
      }
      sealed = true;

      reject(promise, reason);
    }, 'Settle: ' + (promise._label || ' unknown promise'));

    if (!sealed && error) {
      sealed = true;
      reject(promise, error);
    }
  }, promise);
}

function handleOwnThenable(promise, thenable) {
  if (thenable._state === FULFILLED) {
    fulfill(promise, thenable._result);
  } else if (thenable._state === REJECTED) {
    reject(promise, thenable._result);
  } else {
    subscribe(thenable, undefined, function (value) {
      return resolve(promise, value);
    }, function (reason) {
      return reject(promise, reason);
    });
  }
}

function handleMaybeThenable(promise, maybeThenable, then$$1) {
  if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
    handleOwnThenable(promise, maybeThenable);
  } else {
    if (then$$1 === TRY_CATCH_ERROR) {
      reject(promise, TRY_CATCH_ERROR.error);
      TRY_CATCH_ERROR.error = null;
    } else if (then$$1 === undefined) {
      fulfill(promise, maybeThenable);
    } else if (isFunction(then$$1)) {
      handleForeignThenable(promise, maybeThenable, then$$1);
    } else {
      fulfill(promise, maybeThenable);
    }
  }
}

function resolve(promise, value) {
  if (promise === value) {
    reject(promise, selfFulfillment());
  } else if (objectOrFunction(value)) {
    handleMaybeThenable(promise, value, getThen(value));
  } else {
    fulfill(promise, value);
  }
}

function publishRejection(promise) {
  if (promise._onerror) {
    promise._onerror(promise._result);
  }

  publish(promise);
}

function fulfill(promise, value) {
  if (promise._state !== PENDING) {
    return;
  }

  promise._result = value;
  promise._state = FULFILLED;

  if (promise._subscribers.length !== 0) {
    asap(publish, promise);
  }
}

function reject(promise, reason) {
  if (promise._state !== PENDING) {
    return;
  }
  promise._state = REJECTED;
  promise._result = reason;

  asap(publishRejection, promise);
}

function subscribe(parent, child, onFulfillment, onRejection) {
  var _subscribers = parent._subscribers;
  var length = _subscribers.length;


  parent._onerror = null;

  _subscribers[length] = child;
  _subscribers[length + FULFILLED] = onFulfillment;
  _subscribers[length + REJECTED] = onRejection;

  if (length === 0 && parent._state) {
    asap(publish, parent);
  }
}

function publish(promise) {
  var subscribers = promise._subscribers;
  var settled = promise._state;

  if (subscribers.length === 0) {
    return;
  }

  var child = void 0,
      callback = void 0,
      detail = promise._result;

  for (var i = 0; i < subscribers.length; i += 3) {
    child = subscribers[i];
    callback = subscribers[i + settled];

    if (child) {
      invokeCallback(settled, child, callback, detail);
    } else {
      callback(detail);
    }
  }

  promise._subscribers.length = 0;
}

function tryCatch(callback, detail) {
  try {
    return callback(detail);
  } catch (e) {
    TRY_CATCH_ERROR.error = e;
    return TRY_CATCH_ERROR;
  }
}

function invokeCallback(settled, promise, callback, detail) {
  var hasCallback = isFunction(callback),
      value = void 0,
      error = void 0,
      succeeded = void 0,
      failed = void 0;

  if (hasCallback) {
    value = tryCatch(callback, detail);

    if (value === TRY_CATCH_ERROR) {
      failed = true;
      error = value.error;
      value.error = null;
    } else {
      succeeded = true;
    }

    if (promise === value) {
      reject(promise, cannotReturnOwn());
      return;
    }
  } else {
    value = detail;
    succeeded = true;
  }

  if (promise._state !== PENDING) {
    // noop
  } else if (hasCallback && succeeded) {
    resolve(promise, value);
  } else if (failed) {
    reject(promise, error);
  } else if (settled === FULFILLED) {
    fulfill(promise, value);
  } else if (settled === REJECTED) {
    reject(promise, value);
  }
}

function initializePromise(promise, resolver) {
  try {
    resolver(function resolvePromise(value) {
      resolve(promise, value);
    }, function rejectPromise(reason) {
      reject(promise, reason);
    });
  } catch (e) {
    reject(promise, e);
  }
}

var id = 0;
function nextId() {
  return id++;
}

function makePromise(promise) {
  promise[PROMISE_ID] = id++;
  promise._state = undefined;
  promise._result = undefined;
  promise._subscribers = [];
}

function validationError() {
  return new Error('Array Methods must be provided an Array');
}

var Enumerator = function () {
  function Enumerator(Constructor, input) {
    this._instanceConstructor = Constructor;
    this.promise = new Constructor(noop);

    if (!this.promise[PROMISE_ID]) {
      makePromise(this.promise);
    }

    if (isArray(input)) {
      this.length = input.length;
      this._remaining = input.length;

      this._result = new Array(this.length);

      if (this.length === 0) {
        fulfill(this.promise, this._result);
      } else {
        this.length = this.length || 0;
        this._enumerate(input);
        if (this._remaining === 0) {
          fulfill(this.promise, this._result);
        }
      }
    } else {
      reject(this.promise, validationError());
    }
  }

  Enumerator.prototype._enumerate = function _enumerate(input) {
    for (var i = 0; this._state === PENDING && i < input.length; i++) {
      this._eachEntry(input[i], i);
    }
  };

  Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
    var c = this._instanceConstructor;
    var resolve$$1 = c.resolve;


    if (resolve$$1 === resolve$1) {
      var _then = getThen(entry);

      if (_then === then && entry._state !== PENDING) {
        this._settledAt(entry._state, i, entry._result);
      } else if (typeof _then !== 'function') {
        this._remaining--;
        this._result[i] = entry;
      } else if (c === Promise$1) {
        var promise = new c(noop);
        handleMaybeThenable(promise, entry, _then);
        this._willSettleAt(promise, i);
      } else {
        this._willSettleAt(new c(function (resolve$$1) {
          return resolve$$1(entry);
        }), i);
      }
    } else {
      this._willSettleAt(resolve$$1(entry), i);
    }
  };

  Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
    var promise = this.promise;


    if (promise._state === PENDING) {
      this._remaining--;

      if (state === REJECTED) {
        reject(promise, value);
      } else {
        this._result[i] = value;
      }
    }

    if (this._remaining === 0) {
      fulfill(promise, this._result);
    }
  };

  Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
    var enumerator = this;

    subscribe(promise, undefined, function (value) {
      return enumerator._settledAt(FULFILLED, i, value);
    }, function (reason) {
      return enumerator._settledAt(REJECTED, i, reason);
    });
  };

  return Enumerator;
}();

/**
  `Promise.all` accepts an array of promises, and returns a new promise which
  is fulfilled with an array of fulfillment values for the passed promises, or
  rejected with the reason of the first passed promise to be rejected. It casts all
  elements of the passed iterable to promises as it runs this algorithm.

  Example:

  ```javascript
  let promise1 = resolve(1);
  let promise2 = resolve(2);
  let promise3 = resolve(3);
  let promises = [ promise1, promise2, promise3 ];

  Promise.all(promises).then(function(array){
    // The array here would be [ 1, 2, 3 ];
  });
  ```

  If any of the `promises` given to `all` are rejected, the first promise
  that is rejected will be given as an argument to the returned promises's
  rejection handler. For example:

  Example:

  ```javascript
  let promise1 = resolve(1);
  let promise2 = reject(new Error("2"));
  let promise3 = reject(new Error("3"));
  let promises = [ promise1, promise2, promise3 ];

  Promise.all(promises).then(function(array){
    // Code here never runs because there are rejected promises!
  }, function(error) {
    // error.message === "2"
  });
  ```

  @method all
  @static
  @param {Array} entries array of promises
  @param {String} label optional string for labeling the promise.
  Useful for tooling.
  @return {Promise} promise that is fulfilled when all `promises` have been
  fulfilled, or rejected if any of them become rejected.
  @static
*/
function all(entries) {
  return new Enumerator(this, entries).promise;
}

/**
  `Promise.race` returns a new promise which is settled in the same way as the
  first passed promise to settle.

  Example:

  ```javascript
  let promise1 = new Promise(function(resolve, reject){
    setTimeout(function(){
      resolve('promise 1');
    }, 200);
  });

  let promise2 = new Promise(function(resolve, reject){
    setTimeout(function(){
      resolve('promise 2');
    }, 100);
  });

  Promise.race([promise1, promise2]).then(function(result){
    // result === 'promise 2' because it was resolved before promise1
    // was resolved.
  });
  ```

  `Promise.race` is deterministic in that only the state of the first
  settled promise matters. For example, even if other promises given to the
  `promises` array argument are resolved, but the first settled promise has
  become rejected before the other promises became fulfilled, the returned
  promise will become rejected:

  ```javascript
  let promise1 = new Promise(function(resolve, reject){
    setTimeout(function(){
      resolve('promise 1');
    }, 200);
  });

  let promise2 = new Promise(function(resolve, reject){
    setTimeout(function(){
      reject(new Error('promise 2'));
    }, 100);
  });

  Promise.race([promise1, promise2]).then(function(result){
    // Code here never runs
  }, function(reason){
    // reason.message === 'promise 2' because promise 2 became rejected before
    // promise 1 became fulfilled
  });
  ```

  An example real-world use case is implementing timeouts:

  ```javascript
  Promise.race([ajax('foo.json'), timeout(5000)])
  ```

  @method race
  @static
  @param {Array} promises array of promises to observe
  Useful for tooling.
  @return {Promise} a promise which settles in the same way as the first passed
  promise to settle.
*/
function race(entries) {
  /*jshint validthis:true */
  var Constructor = this;

  if (!isArray(entries)) {
    return new Constructor(function (_, reject) {
      return reject(new TypeError('You must pass an array to race.'));
    });
  } else {
    return new Constructor(function (resolve, reject) {
      var length = entries.length;
      for (var i = 0; i < length; i++) {
        Constructor.resolve(entries[i]).then(resolve, reject);
      }
    });
  }
}

/**
  `Promise.reject` returns a promise rejected with the passed `reason`.
  It is shorthand for the following:

  ```javascript
  let promise = new Promise(function(resolve, reject){
    reject(new Error('WHOOPS'));
  });

  promise.then(function(value){
    // Code here doesn't run because the promise is rejected!
  }, function(reason){
    // reason.message === 'WHOOPS'
  });
  ```

  Instead of writing the above, your code now simply becomes the following:

  ```javascript
  let promise = Promise.reject(new Error('WHOOPS'));

  promise.then(function(value){
    // Code here doesn't run because the promise is rejected!
  }, function(reason){
    // reason.message === 'WHOOPS'
  });
  ```

  @method reject
  @static
  @param {Any} reason value that the returned promise will be rejected with.
  Useful for tooling.
  @return {Promise} a promise rejected with the given `reason`.
*/
function reject$1(reason) {
  /*jshint validthis:true */
  var Constructor = this;
  var promise = new Constructor(noop);
  reject(promise, reason);
  return promise;
}

function needsResolver() {
  throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}

function needsNew() {
  throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
}

/**
  Promise objects represent the eventual result of an asynchronous operation. The
  primary way of interacting with a promise is through its `then` method, which
  registers callbacks to receive either a promise's eventual value or the reason
  why the promise cannot be fulfilled.

  Terminology
  -----------

  - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
  - `thenable` is an object or function that defines a `then` method.
  - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
  - `exception` is a value that is thrown using the throw statement.
  - `reason` is a value that indicates why a promise was rejected.
  - `settled` the final resting state of a promise, fulfilled or rejected.

  A promise can be in one of three states: pending, fulfilled, or rejected.

  Promises that are fulfilled have a fulfillment value and are in the fulfilled
  state.  Promises that are rejected have a rejection reason and are in the
  rejected state.  A fulfillment value is never a thenable.

  Promises can also be said to *resolve* a value.  If this value is also a
  promise, then the original promise's settled state will match the value's
  settled state.  So a promise that *resolves* a promise that rejects will
  itself reject, and a promise that *resolves* a promise that fulfills will
  itself fulfill.


  Basic Usage:
  ------------

  ```js
  let promise = new Promise(function(resolve, reject) {
    // on success
    resolve(value);

    // on failure
    reject(reason);
  });

  promise.then(function(value) {
    // on fulfillment
  }, function(reason) {
    // on rejection
  });
  ```

  Advanced Usage:
  ---------------

  Promises shine when abstracting away asynchronous interactions such as
  `XMLHttpRequest`s.

  ```js
  function getJSON(url) {
    return new Promise(function(resolve, reject){
      let xhr = new XMLHttpRequest();

      xhr.open('GET', url);
      xhr.onreadystatechange = handler;
      xhr.responseType = 'json';
      xhr.setRequestHeader('Accept', 'application/json');
      xhr.send();

      function handler() {
        if (this.readyState === this.DONE) {
          if (this.status === 200) {
            resolve(this.response);
          } else {
            reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
          }
        }
      };
    });
  }

  getJSON('/posts.json').then(function(json) {
    // on fulfillment
  }, function(reason) {
    // on rejection
  });
  ```

  Unlike callbacks, promises are great composable primitives.

  ```js
  Promise.all([
    getJSON('/posts'),
    getJSON('/comments')
  ]).then(function(values){
    values[0] // => postsJSON
    values[1] // => commentsJSON

    return values;
  });
  ```

  @class Promise
  @param {Function} resolver
  Useful for tooling.
  @constructor
*/

var Promise$1 = function () {
  function Promise(resolver) {
    this[PROMISE_ID] = nextId();
    this._result = this._state = undefined;
    this._subscribers = [];

    if (noop !== resolver) {
      typeof resolver !== 'function' && needsResolver();
      this instanceof Promise ? initializePromise(this, resolver) : needsNew();
    }
  }

  /**
  The primary way of interacting with a promise is through its `then` method,
  which registers callbacks to receive either a promise's eventual value or the
  reason why the promise cannot be fulfilled.
   ```js
  findUser().then(function(user){
    // user is available
  }, function(reason){
    // user is unavailable, and you are given the reason why
  });
  ```
   Chaining
  --------
   The return value of `then` is itself a promise.  This second, 'downstream'
  promise is resolved with the return value of the first promise's fulfillment
  or rejection handler, or rejected if the handler throws an exception.
   ```js
  findUser().then(function (user) {
    return user.name;
  }, function (reason) {
    return 'default name';
  }).then(function (userName) {
    // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
    // will be `'default name'`
  });
   findUser().then(function (user) {
    throw new Error('Found user, but still unhappy');
  }, function (reason) {
    throw new Error('`findUser` rejected and we're unhappy');
  }).then(function (value) {
    // never reached
  }, function (reason) {
    // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
    // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
  });
  ```
  If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
   ```js
  findUser().then(function (user) {
    throw new PedagogicalException('Upstream error');
  }).then(function (value) {
    // never reached
  }).then(function (value) {
    // never reached
  }, function (reason) {
    // The `PedgagocialException` is propagated all the way down to here
  });
  ```
   Assimilation
  ------------
   Sometimes the value you want to propagate to a downstream promise can only be
  retrieved asynchronously. This can be achieved by returning a promise in the
  fulfillment or rejection handler. The downstream promise will then be pending
  until the returned promise is settled. This is called *assimilation*.
   ```js
  findUser().then(function (user) {
    return findCommentsByAuthor(user);
  }).then(function (comments) {
    // The user's comments are now available
  });
  ```
   If the assimliated promise rejects, then the downstream promise will also reject.
   ```js
  findUser().then(function (user) {
    return findCommentsByAuthor(user);
  }).then(function (comments) {
    // If `findCommentsByAuthor` fulfills, we'll have the value here
  }, function (reason) {
    // If `findCommentsByAuthor` rejects, we'll have the reason here
  });
  ```
   Simple Example
  --------------
   Synchronous Example
   ```javascript
  let result;
   try {
    result = findResult();
    // success
  } catch(reason) {
    // failure
  }
  ```
   Errback Example
   ```js
  findResult(function(result, err){
    if (err) {
      // failure
    } else {
      // success
    }
  });
  ```
   Promise Example;
   ```javascript
  findResult().then(function(result){
    // success
  }, function(reason){
    // failure
  });
  ```
   Advanced Example
  --------------
   Synchronous Example
   ```javascript
  let author, books;
   try {
    author = findAuthor();
    books  = findBooksByAuthor(author);
    // success
  } catch(reason) {
    // failure
  }
  ```
   Errback Example
   ```js
   function foundBooks(books) {
   }
   function failure(reason) {
   }
   findAuthor(function(author, err){
    if (err) {
      failure(err);
      // failure
    } else {
      try {
        findBoooksByAuthor(author, function(books, err) {
          if (err) {
            failure(err);
          } else {
            try {
              foundBooks(books);
            } catch(reason) {
              failure(reason);
            }
          }
        });
      } catch(error) {
        failure(err);
      }
      // success
    }
  });
  ```
   Promise Example;
   ```javascript
  findAuthor().
    then(findBooksByAuthor).
    then(function(books){
      // found books
  }).catch(function(reason){
    // something went wrong
  });
  ```
   @method then
  @param {Function} onFulfilled
  @param {Function} onRejected
  Useful for tooling.
  @return {Promise}
  */

  /**
  `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
  as the catch block of a try/catch statement.
  ```js
  function findAuthor(){
  throw new Error('couldn't find that author');
  }
  // synchronous
  try {
  findAuthor();
  } catch(reason) {
  // something went wrong
  }
  // async with promises
  findAuthor().catch(function(reason){
  // something went wrong
  });
  ```
  @method catch
  @param {Function} onRejection
  Useful for tooling.
  @return {Promise}
  */


  Promise.prototype.catch = function _catch(onRejection) {
    return this.then(null, onRejection);
  };

  /**
    `finally` will be invoked regardless of the promise's fate just as native
    try/catch/finally behaves
  
    Synchronous example:
  
    ```js
    findAuthor() {
      if (Math.random() > 0.5) {
        throw new Error();
      }
      return new Author();
    }
  
    try {
      return findAuthor(); // succeed or fail
    } catch(error) {
      return findOtherAuther();
    } finally {
      // always runs
      // doesn't affect the return value
    }
    ```
  
    Asynchronous example:
  
    ```js
    findAuthor().catch(function(reason){
      return findOtherAuther();
    }).finally(function(){
      // author was either found, or not
    });
    ```
  
    @method finally
    @param {Function} callback
    @return {Promise}
  */


  Promise.prototype.finally = function _finally(callback) {
    var promise = this;
    var constructor = promise.constructor;

    return promise.then(function (value) {
      return constructor.resolve(callback()).then(function () {
        return value;
      });
    }, function (reason) {
      return constructor.resolve(callback()).then(function () {
        throw reason;
      });
    });
  };

  return Promise;
}();

Promise$1.prototype.then = then;
Promise$1.all = all;
Promise$1.race = race;
Promise$1.resolve = resolve$1;
Promise$1.reject = reject$1;
Promise$1._setScheduler = setScheduler;
Promise$1._setAsap = setAsap;
Promise$1._asap = asap;

/*global self*/
function polyfill() {
  var local = void 0;

  if (typeof global !== 'undefined') {
    local = global;
  } else if (typeof self !== 'undefined') {
    local = self;
  } else {
    try {
      local = Function('return this')();
    } catch (e) {
      throw new Error('polyfill failed because global object is unavailable in this environment');
    }
  }

  var P = local.Promise;

  if (P) {
    var promiseToString = null;
    try {
      promiseToString = Object.prototype.toString.call(P.resolve());
    } catch (e) {
      // silently ignored
    }

    if (promiseToString === '[object Promise]' && !P.cast) {
      return;
    }
  }

  local.Promise = Promise$1;
}

// Strange compat..
Promise$1.polyfill = polyfill;
Promise$1.Promise = Promise$1;

return Promise$1;

})));





/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(203), __webpack_require__(76)))

/***/ }),
/* 303 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
var PromisesShim_1 = __webpack_require__(304);
PromisesShim_1.shim();
var CustomEventPolyfill_1 = __webpack_require__(305);
CustomEventPolyfill_1.customEventPolyfill();
// MISC
var Version_1 = __webpack_require__(104);
exports.version = Version_1.version;
var SearchEndpoint_1 = __webpack_require__(53);
exports.SearchEndpoint = SearchEndpoint_1.SearchEndpoint;
__export(__webpack_require__(26));
// Default language needs to be set after external module, since this is where l10n will be imported
var DefaultLanguage_1 = __webpack_require__(152);
DefaultLanguage_1.defaultLanguage();
var DefaultLanguage_2 = __webpack_require__(152);
exports.setLanguageAfterPageLoaded = DefaultLanguage_2.setLanguageAfterPageLoaded;


/***/ }),
/* 304 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/* istanbul ignore next */
function shim() {
    var doShim = function (promiseInstance) {
        if (typeof promiseInstance.prototype['finally'] != 'function') {
            promiseInstance.prototype['finally'] = function finallyPolyfill(callback) {
                var constructor = this.constructor;
                return this.then(function (value) {
                    return constructor.resolve(callback()).then(function () {
                        return value;
                    });
                }, function (reason) {
                    return constructor.resolve(callback()).then(function () {
                        throw reason;
                    });
                });
            };
        }
        var rethrowError = function (self) {
            self.then(null, function (err) {
                setTimeout(function () {
                    throw err;
                }, 0);
            });
        };
        if (typeof promiseInstance.prototype['done'] !== 'function') {
            promiseInstance.prototype['done'] = function (onFulfilled, onRejected) {
                var self = arguments.length ? this.then.apply(this, arguments) : this;
                rethrowError(self);
                return this;
            };
        }
        if (typeof promiseInstance.prototype['fail'] !== 'function') {
            promiseInstance.prototype['fail'] = function (onFulfilled, onRejected) {
                var self = arguments.length ? this.catch.apply(this, arguments) : this;
                rethrowError(self);
                return this;
            };
        }
    };
    var globalPromise = window['Promise'];
    var localPromise = Promise;
    if (globalPromise) {
        doShim(globalPromise);
    }
    if (localPromise) {
        doShim(localPromise);
    }
}
exports.shim = shim;


/***/ }),
/* 305 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
// CustomEvent polyfill from MDN
// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill
/* istanbul ignore next */
function customEventPolyfill() {
    // window.CustomEvent is missing from the definitions
    if (typeof window.CustomEvent === 'function') {
        return;
    }
    var CustomEvent = function (event, params) {
        params = params || { bubbles: false, cancelable: false, detail: undefined };
        var customEvent = document.createEvent('CustomEvent');
        customEvent.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
        return customEvent;
    };
    // window.Event is specific to IE
    CustomEvent.prototype = window.Event.prototype;
    window.CustomEvent = CustomEvent;
}
exports.customEventPolyfill = customEventPolyfill;


/***/ }),
/* 306 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 307 */
/***/ (function(module, exports) {


/**
 * When source maps are enabled, `style-loader` uses a link element with a data-uri to
 * embed the css on the page. This breaks all relative urls because now they are relative to a
 * bundle instead of the current page.
 *
 * One solution is to only use full urls, but that may be impossible.
 *
 * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
 *
 * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
 *
 */

module.exports = function (css) {
  // get current location
  var location = typeof window !== "undefined" && window.location;

  if (!location) {
    throw new Error("fixUrls requires window.location");
  }

	// blank or null?
	if (!css || typeof css !== "string") {
	  return css;
  }

  var baseUrl = location.protocol + "//" + location.host;
  var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");

	// convert each url(...)
	/*
	This regular expression is just a way to recursively match brackets within
	a string.

	 /url\s*\(  = Match on the word "url" with any whitespace after it and then a parens
	   (  = Start a capturing group
	     (?:  = Start a non-capturing group
	         [^)(]  = Match anything that isn't a parentheses
	         |  = OR
	         \(  = Match a start parentheses
	             (?:  = Start another non-capturing groups
	                 [^)(]+  = Match anything that isn't a parentheses
	                 |  = OR
	                 \(  = Match a start parentheses
	                     [^)(]*  = Match anything that isn't a parentheses
	                 \)  = Match a end parentheses
	             )  = End Group
              *\) = Match anything and then a close parens
          )  = Close non-capturing group
          *  = Match anything
       )  = Close capturing group
	 \)  = Match a close parens

	 /gi  = Get all matches, not the first.  Be case insensitive.
	 */
	var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
		// strip quotes (if they exist)
		var unquotedOrigUrl = origUrl
			.trim()
			.replace(/^"(.*)"$/, function(o, $1){ return $1; })
			.replace(/^'(.*)'$/, function(o, $1){ return $1; });

		// already a full url? no change
		if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
		  return fullMatch;
		}

		// convert the url to a full url
		var newUrl;

		if (unquotedOrigUrl.indexOf("//") === 0) {
		  	//TODO: should we add protocol?
			newUrl = unquotedOrigUrl;
		} else if (unquotedOrigUrl.indexOf("/") === 0) {
			// path should be relative to the base url
			newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
		} else {
			// path should be relative to current directory
			newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
		}

		// send back the fixed url(...)
		return "url(" + JSON.stringify(newUrl) + ")";
	});

	// send back the fixed css
	return fixedCss;
};


/***/ }),
/* 308 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Assert_1 = __webpack_require__(5);
var AjaxError = /** @class */ (function () {
    function AjaxError(message, status) {
        this.message = message;
        this.status = status;
        Assert_1.Assert.exists(message);
        Assert_1.Assert.exists(status);
        this.name = this.type = 'Ajax Error (status: ' + status + ')';
    }
    return AjaxError;
}());
exports.AjaxError = AjaxError;


/***/ }),
/* 309 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var MissingAuthenticationError = /** @class */ (function () {
    function MissingAuthenticationError(provider) {
        this.provider = provider;
        this.isMissingAuthentication = true;
        this.name = this.type = this.message = "Missing Authentication (provider: " + provider + ")";
    }
    return MissingAuthenticationError;
}());
exports.MissingAuthenticationError = MissingAuthenticationError;


/***/ }),
/* 310 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var analytics = __webpack_require__(146);
exports.analytics = analytics;
var SimpleAnalytics = __webpack_require__(313);
exports.SimpleAnalytics = SimpleAnalytics;
var history = __webpack_require__(147);
exports.history = history;
var donottrack = __webpack_require__(316);
exports.donottrack = donottrack;
var storage = __webpack_require__(105);
exports.storage = storage;


/***/ }),
/* 311 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var Cookie = (function () {
    function Cookie() {
    }
    Cookie.set = function (name, value, expiration) {
        var domain, domainParts, date, expires, host;
        if (expiration) {
            date = new Date();
            date.setTime(date.getTime() + expiration);
            expires = '; expires=' + date.toGMTString();
        }
        else {
            expires = '';
        }
        host = location.hostname;
        if (host.indexOf('.') === -1) {
            document.cookie = name + '=' + value + expires + '; path=/';
        }
        else {
            domainParts = host.split('.');
            domainParts.shift();
            domain = '.' + domainParts.join('.');
            document.cookie = name + '=' + value + expires + '; path=/; domain=' + domain;
            if (Cookie.get(name) == null || Cookie.get(name) != value) {
                domain = '.' + host;
                document.cookie = name + '=' + value + expires + '; path=/; domain=' + domain;
            }
        }
    };
    Cookie.get = function (name) {
        var cookiePrefix = name + '=';
        var cookieArray = document.cookie.split(';');
        for (var i = 0; i < cookieArray.length; i++) {
            var cookie = cookieArray[i];
            cookie = cookie.replace(/^\s+/, '');
            if (cookie.indexOf(cookiePrefix) == 0) {
                return cookie.substring(cookiePrefix.length, cookie.length);
            }
        }
        return null;
    };
    Cookie.erase = function (name) {
        Cookie.set(name, '', -1);
    };
    return Cookie;
}());
exports.Cookie = Cookie;


/***/ }),
/* 312 */
/***/ (function(module, exports) {

(function(self) {
  'use strict';

  if (self.fetch) {
    return
  }

  var support = {
    searchParams: 'URLSearchParams' in self,
    iterable: 'Symbol' in self && 'iterator' in Symbol,
    blob: 'FileReader' in self && 'Blob' in self && (function() {
      try {
        new Blob()
        return true
      } catch(e) {
        return false
      }
    })(),
    formData: 'FormData' in self,
    arrayBuffer: 'ArrayBuffer' in self
  }

  if (support.arrayBuffer) {
    var viewClasses = [
      '[object Int8Array]',
      '[object Uint8Array]',
      '[object Uint8ClampedArray]',
      '[object Int16Array]',
      '[object Uint16Array]',
      '[object Int32Array]',
      '[object Uint32Array]',
      '[object Float32Array]',
      '[object Float64Array]'
    ]

    var isDataView = function(obj) {
      return obj && DataView.prototype.isPrototypeOf(obj)
    }

    var isArrayBufferView = ArrayBuffer.isView || function(obj) {
      return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
    }
  }

  function normalizeName(name) {
    if (typeof name !== 'string') {
      name = String(name)
    }
    if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
      throw new TypeError('Invalid character in header field name')
    }
    return name.toLowerCase()
  }

  function normalizeValue(value) {
    if (typeof value !== 'string') {
      value = String(value)
    }
    return value
  }

  // Build a destructive iterator for the value list
  function iteratorFor(items) {
    var iterator = {
      next: function() {
        var value = items.shift()
        return {done: value === undefined, value: value}
      }
    }

    if (support.iterable) {
      iterator[Symbol.iterator] = function() {
        return iterator
      }
    }

    return iterator
  }

  function Headers(headers) {
    this.map = {}

    if (headers instanceof Headers) {
      headers.forEach(function(value, name) {
        this.append(name, value)
      }, this)
    } else if (Array.isArray(headers)) {
      headers.forEach(function(header) {
        this.append(header[0], header[1])
      }, this)
    } else if (headers) {
      Object.getOwnPropertyNames(headers).forEach(function(name) {
        this.append(name, headers[name])
      }, this)
    }
  }

  Headers.prototype.append = function(name, value) {
    name = normalizeName(name)
    value = normalizeValue(value)
    var oldValue = this.map[name]
    this.map[name] = oldValue ? oldValue+','+value : value
  }

  Headers.prototype['delete'] = function(name) {
    delete this.map[normalizeName(name)]
  }

  Headers.prototype.get = function(name) {
    name = normalizeName(name)
    return this.has(name) ? this.map[name] : null
  }

  Headers.prototype.has = function(name) {
    return this.map.hasOwnProperty(normalizeName(name))
  }

  Headers.prototype.set = function(name, value) {
    this.map[normalizeName(name)] = normalizeValue(value)
  }

  Headers.prototype.forEach = function(callback, thisArg) {
    for (var name in this.map) {
      if (this.map.hasOwnProperty(name)) {
        callback.call(thisArg, this.map[name], name, this)
      }
    }
  }

  Headers.prototype.keys = function() {
    var items = []
    this.forEach(function(value, name) { items.push(name) })
    return iteratorFor(items)
  }

  Headers.prototype.values = function() {
    var items = []
    this.forEach(function(value) { items.push(value) })
    return iteratorFor(items)
  }

  Headers.prototype.entries = function() {
    var items = []
    this.forEach(function(value, name) { items.push([name, value]) })
    return iteratorFor(items)
  }

  if (support.iterable) {
    Headers.prototype[Symbol.iterator] = Headers.prototype.entries
  }

  function consumed(body) {
    if (body.bodyUsed) {
      return Promise.reject(new TypeError('Already read'))
    }
    body.bodyUsed = true
  }

  function fileReaderReady(reader) {
    return new Promise(function(resolve, reject) {
      reader.onload = function() {
        resolve(reader.result)
      }
      reader.onerror = function() {
        reject(reader.error)
      }
    })
  }

  function readBlobAsArrayBuffer(blob) {
    var reader = new FileReader()
    var promise = fileReaderReady(reader)
    reader.readAsArrayBuffer(blob)
    return promise
  }

  function readBlobAsText(blob) {
    var reader = new FileReader()
    var promise = fileReaderReady(reader)
    reader.readAsText(blob)
    return promise
  }

  function readArrayBufferAsText(buf) {
    var view = new Uint8Array(buf)
    var chars = new Array(view.length)

    for (var i = 0; i < view.length; i++) {
      chars[i] = String.fromCharCode(view[i])
    }
    return chars.join('')
  }

  function bufferClone(buf) {
    if (buf.slice) {
      return buf.slice(0)
    } else {
      var view = new Uint8Array(buf.byteLength)
      view.set(new Uint8Array(buf))
      return view.buffer
    }
  }

  function Body() {
    this.bodyUsed = false

    this._initBody = function(body) {
      this._bodyInit = body
      if (!body) {
        this._bodyText = ''
      } else if (typeof body === 'string') {
        this._bodyText = body
      } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
        this._bodyBlob = body
      } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
        this._bodyFormData = body
      } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
        this._bodyText = body.toString()
      } else if (support.arrayBuffer && support.blob && isDataView(body)) {
        this._bodyArrayBuffer = bufferClone(body.buffer)
        // IE 10-11 can't handle a DataView body.
        this._bodyInit = new Blob([this._bodyArrayBuffer])
      } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
        this._bodyArrayBuffer = bufferClone(body)
      } else {
        throw new Error('unsupported BodyInit type')
      }

      if (!this.headers.get('content-type')) {
        if (typeof body === 'string') {
          this.headers.set('content-type', 'text/plain;charset=UTF-8')
        } else if (this._bodyBlob && this._bodyBlob.type) {
          this.headers.set('content-type', this._bodyBlob.type)
        } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
          this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
        }
      }
    }

    if (support.blob) {
      this.blob = function() {
        var rejected = consumed(this)
        if (rejected) {
          return rejected
        }

        if (this._bodyBlob) {
          return Promise.resolve(this._bodyBlob)
        } else if (this._bodyArrayBuffer) {
          return Promise.resolve(new Blob([this._bodyArrayBuffer]))
        } else if (this._bodyFormData) {
          throw new Error('could not read FormData body as blob')
        } else {
          return Promise.resolve(new Blob([this._bodyText]))
        }
      }

      this.arrayBuffer = function() {
        if (this._bodyArrayBuffer) {
          return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
        } else {
          return this.blob().then(readBlobAsArrayBuffer)
        }
      }
    }

    this.text = function() {
      var rejected = consumed(this)
      if (rejected) {
        return rejected
      }

      if (this._bodyBlob) {
        return readBlobAsText(this._bodyBlob)
      } else if (this._bodyArrayBuffer) {
        return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
      } else if (this._bodyFormData) {
        throw new Error('could not read FormData body as text')
      } else {
        return Promise.resolve(this._bodyText)
      }
    }

    if (support.formData) {
      this.formData = function() {
        return this.text().then(decode)
      }
    }

    this.json = function() {
      return this.text().then(JSON.parse)
    }

    return this
  }

  // HTTP methods whose capitalization should be normalized
  var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']

  function normalizeMethod(method) {
    var upcased = method.toUpperCase()
    return (methods.indexOf(upcased) > -1) ? upcased : method
  }

  function Request(input, options) {
    options = options || {}
    var body = options.body

    if (input instanceof Request) {
      if (input.bodyUsed) {
        throw new TypeError('Already read')
      }
      this.url = input.url
      this.credentials = input.credentials
      if (!options.headers) {
        this.headers = new Headers(input.headers)
      }
      this.method = input.method
      this.mode = input.mode
      if (!body && input._bodyInit != null) {
        body = input._bodyInit
        input.bodyUsed = true
      }
    } else {
      this.url = String(input)
    }

    this.credentials = options.credentials || this.credentials || 'omit'
    if (options.headers || !this.headers) {
      this.headers = new Headers(options.headers)
    }
    this.method = normalizeMethod(options.method || this.method || 'GET')
    this.mode = options.mode || this.mode || null
    this.referrer = null

    if ((this.method === 'GET' || this.method === 'HEAD') && body) {
      throw new TypeError('Body not allowed for GET or HEAD requests')
    }
    this._initBody(body)
  }

  Request.prototype.clone = function() {
    return new Request(this, { body: this._bodyInit })
  }

  function decode(body) {
    var form = new FormData()
    body.trim().split('&').forEach(function(bytes) {
      if (bytes) {
        var split = bytes.split('=')
        var name = split.shift().replace(/\+/g, ' ')
        var value = split.join('=').replace(/\+/g, ' ')
        form.append(decodeURIComponent(name), decodeURIComponent(value))
      }
    })
    return form
  }

  function parseHeaders(rawHeaders) {
    var headers = new Headers()
    rawHeaders.split(/\r?\n/).forEach(function(line) {
      var parts = line.split(':')
      var key = parts.shift().trim()
      if (key) {
        var value = parts.join(':').trim()
        headers.append(key, value)
      }
    })
    return headers
  }

  Body.call(Request.prototype)

  function Response(bodyInit, options) {
    if (!options) {
      options = {}
    }

    this.type = 'default'
    this.status = 'status' in options ? options.status : 200
    this.ok = this.status >= 200 && this.status < 300
    this.statusText = 'statusText' in options ? options.statusText : 'OK'
    this.headers = new Headers(options.headers)
    this.url = options.url || ''
    this._initBody(bodyInit)
  }

  Body.call(Response.prototype)

  Response.prototype.clone = function() {
    return new Response(this._bodyInit, {
      status: this.status,
      statusText: this.statusText,
      headers: new Headers(this.headers),
      url: this.url
    })
  }

  Response.error = function() {
    var response = new Response(null, {status: 0, statusText: ''})
    response.type = 'error'
    return response
  }

  var redirectStatuses = [301, 302, 303, 307, 308]

  Response.redirect = function(url, status) {
    if (redirectStatuses.indexOf(status) === -1) {
      throw new RangeError('Invalid status code')
    }

    return new Response(null, {status: status, headers: {location: url}})
  }

  self.Headers = Headers
  self.Request = Request
  self.Response = Response

  self.fetch = function(input, init) {
    return new Promise(function(resolve, reject) {
      var request = new Request(input, init)
      var xhr = new XMLHttpRequest()

      xhr.onload = function() {
        var options = {
          status: xhr.status,
          statusText: xhr.statusText,
          headers: parseHeaders(xhr.getAllResponseHeaders() || '')
        }
        options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
        var body = 'response' in xhr ? xhr.response : xhr.responseText
        resolve(new Response(body, options))
      }

      xhr.onerror = function() {
        reject(new TypeError('Network request failed'))
      }

      xhr.ontimeout = function() {
        reject(new TypeError('Network request failed'))
      }

      xhr.open(request.method, request.url, true)

      if (request.credentials === 'include') {
        xhr.withCredentials = true
      }

      if ('responseType' in xhr && support.blob) {
        xhr.responseType = 'blob'
      }

      request.headers.forEach(function(value, name) {
        xhr.setRequestHeader(name, value)
      })

      xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
    })
  }
  self.fetch.polyfill = true
})(typeof self !== 'undefined' ? self : this);


/***/ }),
/* 313 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var analytics = __webpack_require__(146);
var objectassign_1 = __webpack_require__(314);
var utils_1 = __webpack_require__(315);
var SimpleAPI = (function () {
    function SimpleAPI() {
    }
    SimpleAPI.prototype.init = function (token, endpoint) {
        if (typeof token === 'undefined') {
            throw new Error("You must pass your token when you call 'init'");
        }
        if (typeof token === 'string') {
            endpoint = endpoint || analytics.Endpoints.default;
            this.client = new analytics.Client({
                token: token,
                endpoint: endpoint
            });
        }
        else if (typeof token === 'object' && typeof token.sendEvent !== 'undefined') {
            this.client = token;
        }
        else {
            throw new Error("You must pass either your token or a valid object when you call 'init'");
        }
    };
    SimpleAPI.prototype.send = function (event, customData) {
        if (typeof this.client == 'undefined') {
            throw new Error("You must call init before sending an event");
        }
        customData = objectassign_1.default({}, {
            hash: window.location.hash
        }, customData);
        switch (event) {
            case 'pageview':
                this.client.sendViewEvent({
                    location: window.location.toString(),
                    referrer: document.referrer,
                    language: document.documentElement.lang,
                    title: document.title,
                    contentIdKey: utils_1.popFromObject(customData, 'contentIdKey'),
                    contentIdValue: utils_1.popFromObject(customData, 'contentIdValue'),
                    contentType: utils_1.popFromObject(customData, 'contentType'),
                    anonymous: utils_1.popFromObject(customData, 'anonymous'),
                    customData: customData
                });
                return;
            default:
                throw new Error("Event type: '" + event + "' not implemented");
        }
    };
    SimpleAPI.prototype.onLoad = function (callback) {
        if (typeof callback == 'undefined') {
            throw new Error("You must pass a function when you call 'onLoad'");
        }
        callback();
    };
    return SimpleAPI;
}());
exports.SimpleAPI = SimpleAPI;
var simpleAPI = new SimpleAPI();
exports.SimpleAnalytics = function (action) {
    var params = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        params[_i - 1] = arguments[_i];
    }
    var actionFunction = simpleAPI[action];
    if (actionFunction) {
        return actionFunction.apply(simpleAPI, params);
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = exports.SimpleAnalytics;


/***/ }),
/* 314 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var hasOwnProperty = Object.prototype.hasOwnProperty;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
var objectAssignPonyfill = function (target) {
    var sources = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        sources[_i - 1] = arguments[_i];
    }
    if (target === undefined || target === null) {
        throw new TypeError('Cannot convert undefined or null to object');
    }
    var output = Object(target);
    sources.forEach(function (source) {
        var from = Object(source);
        for (var key in from) {
            if (hasOwnProperty.call(from, key)) {
                output[key] = from[key];
            }
        }
        if (getOwnPropertySymbols) {
            var symbols = getOwnPropertySymbols(from);
            symbols.forEach(function (symbol) {
                if (propIsEnumerable.call(from, symbol)) {
                    output[symbol] = from[symbol];
                }
            });
        }
    });
    return output;
};
exports.ponyfill = objectAssignPonyfill;
exports.assign = typeof Object.assign === 'function' ? Object.assign : objectAssignPonyfill;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = exports.assign;


/***/ }),
/* 315 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function popFromObject(object, key) {
    if (object) {
        var value = object[key];
        delete object[key];
        return value;
    }
}
exports.popFromObject = popFromObject;


/***/ }),
/* 316 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

exports.doNotTrack = [true, 'yes', '1'].indexOf(navigator.doNotTrack || navigator.msDoNotTrack || window.doNotTrack);
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = exports.doNotTrack;


/***/ }),
/* 317 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var exponential_backoff_1 = __webpack_require__(318);
var backOff = exponential_backoff_1.backOff;
function setBackOffModule(newModule) {
    backOff = newModule || exponential_backoff_1.backOff;
}
exports.setBackOffModule = setBackOffModule;
var BackOffRequest = /** @class */ (function () {
    function BackOffRequest() {
    }
    BackOffRequest.enqueue = function (request) {
        return new Promise(function (resolve, reject) {
            BackOffRequest.enqueueRequest(request, resolve, reject);
            BackOffRequest.clearQueueIfNotAlready();
        });
    };
    BackOffRequest.enqueueRequest = function (request, resolve, reject) {
        var req = function () {
            return backOff(request.fn, request.options)
                .then(resolve)
                .catch(reject);
        };
        BackOffRequest.queue.push(req);
    };
    BackOffRequest.clearQueueIfNotAlready = function () {
        return __awaiter(this, void 0, void 0, function () {
            var request;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (BackOffRequest.clearingQueue) {
                            return [2 /*return*/];
                        }
                        BackOffRequest.clearingQueue = true;
                        _a.label = 1;
                    case 1:
                        if (!BackOffRequest.queue.length) return [3 /*break*/, 3];
                        request = BackOffRequest.queue.shift();
                        return [4 /*yield*/, request()];
                    case 2:
                        _a.sent();
                        return [3 /*break*/, 1];
                    case 3:
                        BackOffRequest.clearingQueue = false;
                        return [2 /*return*/];
                }
            });
        });
    };
    BackOffRequest.queue = [];
    BackOffRequest.clearingQueue = false;
    return BackOffRequest;
}());
exports.BackOffRequest = BackOffRequest;


/***/ }),
/* 318 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var options_1 = __webpack_require__(150);
var delay_factory_1 = __webpack_require__(319);
function backOff(request, options) {
    if (options === void 0) { options = {}; }
    return __awaiter(this, void 0, void 0, function () {
        var sanitizedOptions, backOff;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    sanitizedOptions = options_1.getSanitizedOptions(options);
                    backOff = new BackOff(request, sanitizedOptions);
                    return [4 /*yield*/, backOff.execute()];
                case 1: return [2 /*return*/, _a.sent()];
            }
        });
    });
}
exports.backOff = backOff;
var BackOff = /** @class */ (function () {
    function BackOff(request, options) {
        this.request = request;
        this.options = options;
        this.attemptNumber = 0;
    }
    BackOff.prototype.execute = function () {
        return __awaiter(this, void 0, void 0, function () {
            var e_1, shouldRetry;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!this.attemptLimitReached) return [3 /*break*/, 6];
                        _a.label = 1;
                    case 1:
                        _a.trys.push([1, 4, , 5]);
                        return [4 /*yield*/, this.applyDelay()];
                    case 2:
                        _a.sent();
                        return [4 /*yield*/, this.request()];
                    case 3: return [2 /*return*/, _a.sent()];
                    case 4:
                        e_1 = _a.sent();
                        this.attemptNumber++;
                        shouldRetry = this.options.retry(e_1, this.attemptNumber);
                        if (!shouldRetry || this.attemptLimitReached) {
                            throw e_1;
                        }
                        return [3 /*break*/, 5];
                    case 5: return [3 /*break*/, 0];
                    case 6: throw new Error("Something went wrong.");
                }
            });
        });
    };
    Object.defineProperty(BackOff.prototype, "attemptLimitReached", {
        get: function () {
            return this.attemptNumber >= this.options.numOfAttempts;
        },
        enumerable: true,
        configurable: true
    });
    BackOff.prototype.applyDelay = function () {
        return __awaiter(this, void 0, void 0, function () {
            var delay;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        delay = delay_factory_1.DelayFactory(this.options, this.attemptNumber);
                        return [4 /*yield*/, delay.apply()];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    return BackOff;
}());
//# sourceMappingURL=backoff.js.map

/***/ }),
/* 319 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var skip_first_delay_1 = __webpack_require__(320);
var always_delay_1 = __webpack_require__(324);
function DelayFactory(options, attempt) {
    var delay = initDelayClass(options);
    delay.setAttemptNumber(attempt);
    return delay;
}
exports.DelayFactory = DelayFactory;
function initDelayClass(options) {
    if (!options.delayFirstAttempt) {
        return new skip_first_delay_1.SkipFirstDelay(options);
    }
    return new always_delay_1.AlwaysDelay(options);
}
//# sourceMappingURL=delay.factory.js.map

/***/ }),
/* 320 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
Object.defineProperty(exports, "__esModule", { value: true });
var delay_base_1 = __webpack_require__(151);
var SkipFirstDelay = /** @class */ (function (_super) {
    __extends(SkipFirstDelay, _super);
    function SkipFirstDelay() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SkipFirstDelay.prototype.apply = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                return [2 /*return*/, this.isFirstAttempt ? true : _super.prototype.apply.call(this)];
            });
        });
    };
    Object.defineProperty(SkipFirstDelay.prototype, "isFirstAttempt", {
        get: function () {
            return this.attempt === 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SkipFirstDelay.prototype, "numOfDelayedAttempts", {
        get: function () {
            return this.attempt - 1;
        },
        enumerable: true,
        configurable: true
    });
    return SkipFirstDelay;
}(delay_base_1.Delay));
exports.SkipFirstDelay = SkipFirstDelay;
//# sourceMappingURL=skip-first.delay.js.map

/***/ }),
/* 321 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var options_1 = __webpack_require__(150);
var full_jitter_1 = __webpack_require__(322);
var no_jitter_1 = __webpack_require__(323);
function JitterFactory(options) {
    switch (options.jitter) {
        case options_1.JitterTypes.Full:
            return full_jitter_1.fullJitter;
        case options_1.JitterTypes.None:
        default:
            return no_jitter_1.noJitter;
    }
}
exports.JitterFactory = JitterFactory;
//# sourceMappingURL=jitter.factory.js.map

/***/ }),
/* 322 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
function fullJitter(delay) {
    var jitteredDelay = Math.random() * delay;
    return Math.round(jitteredDelay);
}
exports.fullJitter = fullJitter;
//# sourceMappingURL=full.jitter.js.map

/***/ }),
/* 323 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
function noJitter(delay) {
    return delay;
}
exports.noJitter = noJitter;
//# sourceMappingURL=no.jitter.js.map

/***/ }),
/* 324 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var delay_base_1 = __webpack_require__(151);
var AlwaysDelay = /** @class */ (function (_super) {
    __extends(AlwaysDelay, _super);
    function AlwaysDelay() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return AlwaysDelay;
}(delay_base_1.Delay));
exports.AlwaysDelay = AlwaysDelay;
//# sourceMappingURL=always.delay.js.map

/***/ }),
/* 325 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
 * The plan of execution of a search request.
 */
var ExecutionPlan = /** @class */ (function () {
    function ExecutionPlan(response) {
        this.response = response;
    }
    Object.defineProperty(ExecutionPlan.prototype, "basicExpression", {
        /**
         * Gets the final value of the basic expression (`q`) after the search request has been processed in the query pipeline, but before it is sent to the index.
         */
        get: function () {
            return this.response.parsedInput.basicExpression;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ExecutionPlan.prototype, "largeExpression", {
        /**
         * Gets the final value of the large expression (`lq`) after the search request has been processed in the query pipeline, but before it is sent to the index.
         */
        get: function () {
            return this.response.parsedInput.largeExpression;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ExecutionPlan.prototype, "redirectionURL", {
        /**
         * Gets the URL to redirect the browser to, if the search request satisfies the condition of a `redirect` trigger rule in the query pipeline.
         *
         * Returns `null` otherwise.
         */
        get: function () {
            var redirects = this.response.preprocessingOutput.triggers.filter(function (trigger) { return trigger.type === 'redirect'; });
            return redirects.length ? redirects[0].content : null;
        },
        enumerable: true,
        configurable: true
    });
    return ExecutionPlan;
}());
exports.ExecutionPlan = ExecutionPlan;


/***/ }),
/* 326 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var CookieUtils_1 = __webpack_require__(92);
var LocalStorageUtils_1 = __webpack_require__(41);
// Copied from https://github.com/coveo/coveo.analytics.js/blob/master/src/storage.ts
var CookieAndLocalStorage = /** @class */ (function () {
    function CookieAndLocalStorage() {
        this.safeLocalStorage = new LocalStorageUtils_1.SafeLocalStorage();
    }
    CookieAndLocalStorage.prototype.getItem = function (key) {
        return this.safeLocalStorage.getItem(key) || CookieUtils_1.ScopedCookie.get(key);
    };
    CookieAndLocalStorage.prototype.removeItem = function (key) {
        this.safeLocalStorage.removeItem(key);
        CookieUtils_1.ScopedCookie.erase(key);
    };
    CookieAndLocalStorage.prototype.setItem = function (key, data) {
        this.safeLocalStorage.setItem(key, data);
        CookieUtils_1.ScopedCookie.set(key, data, 31556926000); // 1 year first party cookie
    };
    return CookieAndLocalStorage;
}());
exports.CookieAndLocalStorage = CookieAndLocalStorage;


/***/ }),
/* 327 */
/***/ (function(module, exports) {

var Coveo;!function(e){!function(e){function c(e,l){e.className=e.className.replace(new RegExp("(^|\\s)"+l+"(\\s|\\b)","g"),"$1")}!function(e){e[e.OK=1]="OK",e[e.APPLY=2]="APPLY",e[e.YES=4]="YES",e[e.NO=8]="NO",e[e.CANCEL=16]="CANCEL"}(e.BUTTON||(e.BUTTON={}));var l=e.BUTTON,d=[];e.open=function o(e,s){void 0===s&&(s={});var r=s.body||document.body;r.className?-1==r.className.indexOf("coveo-modal-opened")&&(r.className+=" coveo-modal-opened"):r.className="coveo-modal-opened";var i=document.createElement("div");i.className="coveo-modal-container coveo-opened ","small"==s.sizeMod&&(i.className+=" coveo-mod-small"),"big"==s.sizeMod&&(i.className+=" coveo-mod-big"),setTimeout((function(){i.className+=" coveo-mod-fade-in-scale"}),0),r.appendChild(i),!0===s.fullscreen&&(i.className+=" coveo-fullscreen");var v=document.createElement("div");v.className="coveo-modal-backdrop coveo-modal-transparent",r.appendChild(v),setTimeout((function(){c(v,"coveo-modal-transparent")}),0);var u=document.createElement("div");u.className="coveo-modal-content",i.appendChild(u);var m=function(e,l){if(void 0===e&&(e=0),void 0===l&&(l=!1),!1!==(null==s.validation||s.validation(e))||l){i.parentElement&&i.parentElement.removeChild(i);var u=d.indexOf(m);return document.removeEventListener("keyup",N),u>=0&&d.splice(u,1),null==r.querySelector(".coveo-modal-container")&&c(r,"coveo-modal-opened"),v.parentNode&&v.parentNode.removeChild(v),!0}return!1},p=function a(e,l){var d=document.createElement("header");if(d.className="coveo-modal-header",null!=e.title){var s=document.createElement("h1");d.appendChild(s),e.title instanceof HTMLElement?s.appendChild(e.title):s.innerHTML=e.title,!0===e.titleClose&&s.addEventListener("click",(function(){return l()}))}var r=document.createElement("span");r.className="coveo-small-close",d.appendChild(r);var i='<svg viewBox="0 0 22 22" class="coveo-icon coveo-fill-pure-white">\n                    <g transform="matrix(.7071-.7071.7071.7071-3.142 11)">\n                        <path d="m9-3.4h2v26.9h-2z"></path>\n                        <path d="m-3.4 9h26.9v2h-26.9z"></path>\n                    </g>\n                </svg>';return r.innerHTML=i,{header:d,closeIcon:r}}(s,m),f=p.header,C=p.closeIcon;u.appendChild(f),u.appendChild(function t(e,l){var d=document.createElement("div");return d.className="coveo-modal-body coveo-mod-header-paddding coveo-mod-form-top-bottom-padding",d.appendChild(l),d}(0,e)),C.addEventListener("click",(function(){m()})),v.addEventListener("click",(function(){m()}));var N=function(e){27==e.keyCode&&-1!=r.className.indexOf("coveo-modal-opened")&&m()};document.addEventListener("keyup",N);var E,h=function(e,l){var d=document.createElement("button");d.className="coveo-btn",d.textContent=e,d.addEventListener("click",(function(){return m(l)})),E.appendChild(d)};return null!=s.buttons&&((E=document.createElement("footer")).className="coveo-modal-footer",u.appendChild(E),s.buttons&l.OK&&h("Ok",l.OK),s.buttons&l.APPLY&&h("Apply",l.APPLY),s.buttons&l.YES&&h("Yes",l.YES),s.buttons&l.NO&&h("No",l.NO),s.buttons&l.CANCEL&&h("Cancel",l.CANCEL)),d.push(m),null!=s.className&&(i.className+=" "+s.className),{modalBox:i,wrapper:u,buttons:E,content:u,overlay:v,close:m}},e.close=function n(e){void 0===e&&(e=!1);for(var l=0;d.length>l;){d[l](0,e)||l++}}}(e.ModalBox||(e.ModalBox={}))}(Coveo||(Coveo={}));

/*** EXPORTS FROM exports-loader ***/
module.exports = Coveo.ModalBox;

/***/ }),
/* 328 */
/***/ (function(module, exports) {

!function(){"use strict";var t,e,n="undefined",r="string",i=self.navigator,o=String,a=Object.prototype.hasOwnProperty,l={},u={},s=!1,f=!0,c=/^\s*application\/(?:vnd\.oftn\.|x-)?l10n\+json\s*(?:$|;)/i,p="locale",g="defaultLocale",h="toLocaleString",y="toLowerCase",v=Array.prototype.indexOf||function(t){for(var e=this.length,n=0;e>n;n++)if(n in this&&this[n]===t)return n;return-1},d=function(e){var n=new t;return n.open("GET",e,s),n.send(null),200!==n.status?(setTimeout(function(){var t=new Error("Unable to load localization data: "+e);throw t.name="Localization Error",t},0),{}):JSON.parse(n.responseText)},m=o[h]=function(t){if(arguments.length>0&&"number"!=typeof t)if(typeof t===r)m(d(t));else if(t===s)u={};else{var e,n,i;for(e in t)if(a.call(t,e)){if(n=t[e],e=e[y](),e in u&&n!==s||(u[e]={}),n===s)continue;if(typeof n===r){if(0!==o[p][y]().indexOf(e)){e in l||(l[e]=[]),l[e].push(n);continue}n=d(n)}for(i in n)a.call(n,i)&&(u[e][i]=n[i])}}return Function.prototype[h].apply(o,arguments)},w=function(t){for(var e,n=l[t],r=0,i=n.length;i>r;r++)e={},e[t]=d(n[r]),m(e);delete l[t]},b=o.prototype[h]=function(){var t,n=e,r=o[n?g:p],i=r[y]().split("-"),a=i.length,c=this.valueOf();e=s;do if(t=i.slice(0,a).join("-"),t in l&&w(t),t in u&&c in u[t])return u[t][c];while(a-->1);return!n&&o[g]?(e=f,b.call(c)):c};if(typeof XMLHttpRequest===n&&typeof ActiveXObject!==n){var L=ActiveXObject;t=function(){try{return new L("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new L("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new L("Msxml2.XMLHTTP")}catch(n){}throw new Error("XMLHttpRequest not supported by this browser.")}}else t=XMLHttpRequest;if(o[g]=o[g]||"",o[p]=i&&(i.language||i.userLanguage)||"",typeof document!==n)for(var T,M=document.getElementsByTagName("link"),O=M.length;O--;){var X=M[O],x=(X.getAttribute("rel")||"")[y]().split(/\s+/);c.test(X.type)&&(-1!==v.call(x,"localizations")?m(X.getAttribute("href")):-1!==v.call(x,"localization")&&(T={},T[(X.getAttribute("hreflang")||"")[y]()]=X.getAttribute("href"),m(T)))}}();

/*** EXPORTS FROM exports-loader ***/
module.exports = window.String.toLocaleString;

/***/ }),
/* 329 */
/***/ (function(module, exports, __webpack_require__) {

/*! globalize - v0.1.1 - 2013-04-30
* https://github.com/jquery/globalize
* Copyright 2013 ; Licensed MIT */
var Globalize = (function(e,r){var t,n,a,s,u,l,i,c,o,f,d,p,h,g,b,m,y,M,v,k,z,F,A,x;t=function(e){return new t.prototype.init(e)}, true?module.exports=t:e.Globalize=t,t.cultures={},t.prototype={constructor:t,init:function(e){return this.cultures=t.cultures,this.cultureSelector=e,this}},t.prototype.init.prototype=t.prototype,t.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:!1,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss"}}},messages:{}},t.cultures["default"].calendar=t.cultures["default"].calendars.standard,t.cultures.en=t.cultures["default"],t.cultureSelector="en",n=/^0x[a-f0-9]+$/i,a=/^[+\-]?infinity$/i,s=/^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/,u=/^\s+|\s+$/g,l=function(e,r){if(e.indexOf)return e.indexOf(r);for(var t=0,n=e.length;n>t;t++)if(e[t]===r)return t;return-1},i=function(e,r){return e.substr(e.length-r.length)===r},c=function(){var e,t,n,a,s,u,l=arguments[0]||{},i=1,p=arguments.length,h=!1;for("boolean"==typeof l&&(h=l,l=arguments[1]||{},i=2),"object"==typeof l||f(l)||(l={});p>i;i++)if(null!=(e=arguments[i]))for(t in e)n=l[t],a=e[t],l!==a&&(h&&a&&(d(a)||(s=o(a)))?(s?(s=!1,u=n&&o(n)?n:[]):u=n&&d(n)?n:{},l[t]=c(h,u,a)):a!==r&&(l[t]=a));return l},o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},f=function(e){return"[object Function]"===Object.prototype.toString.call(e)},d=function(e){return"[object Object]"===Object.prototype.toString.call(e)},p=function(e,r){return 0===e.indexOf(r)},h=function(e){return(e+"").replace(u,"")},g=function(e){return isNaN(e)?0/0:Math[0>e?"ceil":"floor"](e)},b=function(e,r,t){var n;for(n=e.length;r>n;n+=1)e=t?"0"+e:e+"0";return e},m=function(e,r){for(var t=0,n=!1,a=0,s=e.length;s>a;a++){var u=e.charAt(a);switch(u){case"'":n?r.push("'"):t++,n=!1;break;case"\\":n&&r.push("\\"),n=!n;break;default:r.push(u),n=!1}}return t},y=function(e,r){r=r||"F";var t,n=e.patterns,a=r.length;if(1===a){if(t=n[r],!t)throw"Invalid date format string '"+r+"'.";r=t}else 2===a&&"%"===r.charAt(0)&&(r=r.charAt(1));return r},M=function(e,r,t){function n(e,r){var t,n=e+"";return r>1&&r>n.length?(t=v[r-2]+n,t.substr(t.length-r,r)):t=n}function a(){return h||g?h:(h=A.test(r),g=!0,h)}function s(e,r){if(b)return b[r];switch(r){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate();default:throw"Invalid part value "+r}}var u,l=t.calendar,i=l.convert;if(!r||!r.length||"i"===r){if(t&&t.name.length)if(i)u=M(e,l.patterns.F,t);else{var c=new Date(e.getTime()),o=z(e,l.eras);c.setFullYear(F(e,l,o)),u=c.toLocaleString()}else u=""+e;return u}var f=l.eras,d="s"===r;r=y(l,r),u=[];var p,h,g,b,v=["0","00","000"],A=/([^d]|^)(d|dd)([^d]|$)/g,x=0,I=k();for(!d&&i&&(b=i.fromGregorian(e));;){var S=I.lastIndex,w=I.exec(r),C=r.slice(S,w?w.index:r.length);if(x+=m(C,u),!w)break;if(x%2)u.push(w[0]);else{var D=w[0],H=D.length;switch(D){case"ddd":case"dddd":var O=3===H?l.days.namesAbbr:l.days.names;u.push(O[e.getDay()]);break;case"d":case"dd":h=!0,u.push(n(s(e,2),H));break;case"MMM":case"MMMM":var N=s(e,1);u.push(l.monthsGenitive&&a()?l.monthsGenitive[3===H?"namesAbbr":"names"][N]:l.months[3===H?"namesAbbr":"names"][N]);break;case"M":case"MM":u.push(n(s(e,1)+1,H));break;case"y":case"yy":case"yyyy":N=b?b[0]:F(e,l,z(e,f),d),4>H&&(N%=100),u.push(n(N,H));break;case"h":case"hh":p=e.getHours()%12,0===p&&(p=12),u.push(n(p,H));break;case"H":case"HH":u.push(n(e.getHours(),H));break;case"m":case"mm":u.push(n(e.getMinutes(),H));break;case"s":case"ss":u.push(n(e.getSeconds(),H));break;case"t":case"tt":N=12>e.getHours()?l.AM?l.AM[0]:" ":l.PM?l.PM[0]:" ",u.push(1===H?N.charAt(0):N);break;case"f":case"ff":case"fff":u.push(n(e.getMilliseconds(),3).substr(0,H));break;case"z":case"zz":p=e.getTimezoneOffset()/60,u.push((0>=p?"+":"-")+n(Math.floor(Math.abs(p)),H));break;case"zzz":p=e.getTimezoneOffset()/60,u.push((0>=p?"+":"-")+n(Math.floor(Math.abs(p)),2)+":"+n(Math.abs(e.getTimezoneOffset()%60),2));break;case"g":case"gg":l.eras&&u.push(l.eras[z(e,f)].name);break;case"/":u.push(l["/"]);break;default:throw"Invalid date format pattern '"+D+"'."}}}return u.join("")},function(){var e;e=function(e,r,t){var n=t.groupSizes,a=n[0],s=1,u=Math.pow(10,r),l=Math.round(e*u)/u;isFinite(l)||(l=e),e=l;var i=e+"",c="",o=i.split(/e/i),f=o.length>1?parseInt(o[1],10):0;i=o[0],o=i.split("."),i=o[0],c=o.length>1?o[1]:"",f>0?(c=b(c,f,!1),i+=c.slice(0,f),c=c.substr(f)):0>f&&(f=-f,i=b(i,f+1,!0),c=i.slice(-f,i.length)+c,i=i.slice(0,-f)),c=r>0?t["."]+(c.length>r?c.slice(0,r):b(c,r)):"";for(var d=i.length-1,p=t[","],h="";d>=0;){if(0===a||a>d)return i.slice(0,d+1)+(h.length?p+h+c:c);h=i.slice(d-a+1,d+1)+(h.length?p+h:""),d-=a,n.length>s&&(a=n[s],s++)}return i.slice(0,d+1)+p+h+c},v=function(r,t,n){if(!isFinite(r))return 1/0===r?n.numberFormat.positiveInfinity:r===-1/0?n.numberFormat.negativeInfinity:n.numberFormat.NaN;if(!t||"i"===t)return n.name.length?r.toLocaleString():""+r;t=t||"D";var a,s=n.numberFormat,u=Math.abs(r),l=-1;t.length>1&&(l=parseInt(t.slice(1),10));var i,c=t.charAt(0).toUpperCase();switch(c){case"D":a="n",u=g(u),-1!==l&&(u=b(""+u,l,!0)),0>r&&(u="-"+u);break;case"N":i=s;case"C":i=i||s.currency;case"P":i=i||s.percent,a=0>r?i.pattern[0]:i.pattern[1]||"n",-1===l&&(l=i.decimals),u=e(u*("P"===c?100:1),l,i);break;default:throw"Bad number format specifier: "+c}for(var o=/n|\$|-|%/g,f="";;){var d=o.lastIndex,p=o.exec(a);if(f+=a.slice(d,p?p.index:a.length),!p)break;switch(p[0]){case"n":f+=u;break;case"$":f+=s.currency.symbol;break;case"-":/[1-9]/.test(u)&&(f+=s["-"]);break;case"%":f+=s.percent.symbol}}return f}}(),k=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},z=function(e,r){if(!r)return 0;for(var t,n=e.getTime(),a=0,s=r.length;s>a;a++)if(t=r[a].start,null===t||n>=t)return a;return 0},F=function(e,r,t,n){var a=e.getFullYear();return!n&&r.eras&&(a-=r.eras[t].offset),a},function(){var e,r,t,n,a,s,u;e=function(e,r){if(100>r){var t=new Date,n=z(t),a=F(t,e,n),s=e.twoDigitYearMax;s="string"==typeof s?(new Date).getFullYear()%100+parseInt(s,10):s,r+=a-a%100,r>s&&(r-=100)}return r},r=function(e,r,t){var n,a=e.days,i=e._upperDays;return i||(e._upperDays=i=[u(a.names),u(a.namesAbbr),u(a.namesShort)]),r=s(r),t?(n=l(i[1],r),-1===n&&(n=l(i[2],r))):n=l(i[0],r),n},t=function(e,r,t){var n=e.months,a=e.monthsGenitive||e.months,i=e._upperMonths,c=e._upperMonthsGen;i||(e._upperMonths=i=[u(n.names),u(n.namesAbbr)],e._upperMonthsGen=c=[u(a.names),u(a.namesAbbr)]),r=s(r);var o=l(t?i[1]:i[0],r);return 0>o&&(o=l(t?c[1]:c[0],r)),o},n=function(e,r){var t=e._parseRegExp;if(t){var n=t[r];if(n)return n}else e._parseRegExp=t={};for(var a,s=y(e,r).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),u=["^"],l=[],i=0,c=0,o=k();null!==(a=o.exec(s));){var f=s.slice(i,a.index);if(i=o.lastIndex,c+=m(f,u),c%2)u.push(a[0]);else{var d,p=a[0],h=p.length;switch(p){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":d="(\\D+)";break;case"tt":case"t":d="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":d="(\\d{"+h+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":d="(\\d\\d?)";break;case"zzz":d="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":d="([+-]?\\d\\d?)";break;case"/":d="(\\/)";break;default:throw"Invalid date format pattern '"+p+"'."}d&&u.push(d),l.push(a[0])}}m(s.slice(i),u),u.push("$");var g=u.join("").replace(/\s+/g,"\\s+"),b={regExp:g,groups:l};return t[r]=b},a=function(e,r,t){return r>e||e>t},s=function(e){return e.split("\u00a0").join(" ").toUpperCase()},u=function(e){for(var r=[],t=0,n=e.length;n>t;t++)r[t]=s(e[t]);return r},A=function(s,u,l){s=h(s);var i=l.calendar,c=n(i,u),o=RegExp(c.regExp).exec(s);if(null===o)return null;for(var f,d=c.groups,g=null,b=null,m=null,y=null,M=null,v=0,k=0,z=0,F=0,A=null,x=!1,I=0,S=d.length;S>I;I++){var w=o[I+1];if(w){var C=d[I],D=C.length,H=parseInt(w,10);switch(C){case"dd":case"d":if(y=H,a(y,1,31))return null;break;case"MMM":case"MMMM":if(m=t(i,w,3===D),a(m,0,11))return null;break;case"M":case"MM":if(m=H-1,a(m,0,11))return null;break;case"y":case"yy":case"yyyy":if(b=4>D?e(i,H):H,a(b,0,9999))return null;break;case"h":case"hh":if(v=H,12===v&&(v=0),a(v,0,11))return null;break;case"H":case"HH":if(v=H,a(v,0,23))return null;break;case"m":case"mm":if(k=H,a(k,0,59))return null;break;case"s":case"ss":if(z=H,a(z,0,59))return null;break;case"tt":case"t":if(x=i.PM&&(w===i.PM[0]||w===i.PM[1]||w===i.PM[2]),!x&&(!i.AM||w!==i.AM[0]&&w!==i.AM[1]&&w!==i.AM[2]))return null;break;case"f":case"ff":case"fff":if(F=H*Math.pow(10,3-D),a(F,0,999))return null;break;case"ddd":case"dddd":if(M=r(i,w,3===D),a(M,0,6))return null;break;case"zzz":var O=w.split(/:/);if(2!==O.length)return null;if(f=parseInt(O[0],10),a(f,-12,13))return null;var N=parseInt(O[1],10);if(a(N,0,59))return null;A=60*f+(p(w,"-")?-N:N);break;case"z":case"zz":if(f=H,a(f,-12,13))return null;A=60*f;break;case"g":case"gg":var T=w;if(!T||!i.eras)return null;T=h(T.toLowerCase());for(var j=0,$=i.eras.length;$>j;j++)if(T===i.eras[j].name.toLowerCase()){g=j;break}if(null===g)return null}}}var P,G=new Date,E=i.convert;if(P=E?E.fromGregorian(G)[0]:G.getFullYear(),null===b?b=P:i.eras&&(b+=i.eras[g||0].offset),null===m&&(m=0),null===y&&(y=1),E){if(G=E.toGregorian(b,m,y),null===G)return null}else{if(G.setFullYear(b,m,y),G.getDate()!==y)return null;if(null!==M&&G.getDay()!==M)return null}if(x&&12>v&&(v+=12),G.setHours(v,k,z,F),null!==A){var Y=G.getMinutes()-(A+G.getTimezoneOffset());G.setHours(G.getHours()+parseInt(Y/60,10),Y%60)}return G}}(),x=function(e,r,t){var n,a=r["-"],s=r["+"];switch(t){case"n -":a=" "+a,s=" "+s;case"n-":i(e,a)?n=["-",e.substr(0,e.length-a.length)]:i(e,s)&&(n=["+",e.substr(0,e.length-s.length)]);break;case"- n":a+=" ",s+=" ";case"-n":p(e,a)?n=["-",e.substr(a.length)]:p(e,s)&&(n=["+",e.substr(s.length)]);break;case"(n)":p(e,"(")&&i(e,")")&&(n=["-",e.substr(1,e.length-2)])}return n||["",e]},t.prototype.findClosestCulture=function(e){return t.findClosestCulture.call(this,e)},t.prototype.format=function(e,r,n){return t.format.call(this,e,r,n)},t.prototype.localize=function(e,r){return t.localize.call(this,e,r)},t.prototype.parseInt=function(e,r,n){return t.parseInt.call(this,e,r,n)},t.prototype.parseFloat=function(e,r,n){return t.parseFloat.call(this,e,r,n)},t.prototype.culture=function(e){return t.culture.call(this,e)},t.addCultureInfo=function(e,r,t){var n={},a=!1;"string"!=typeof e?(t=e,e=this.culture().name,n=this.cultures[e]):"string"!=typeof r?(t=r,a=null==this.cultures[e],n=this.cultures[e]||this.cultures["default"]):(a=!0,n=this.cultures[r]),this.cultures[e]=c(!0,{},n,t),a&&(this.cultures[e].calendar=this.cultures[e].calendars.standard)},t.findClosestCulture=function(e){var r;if(!e)return this.findClosestCulture(this.cultureSelector)||this.cultures["default"];if("string"==typeof e&&(e=e.split(",")),o(e)){var t,n,a=this.cultures,s=e,u=s.length,l=[];for(n=0;u>n;n++){e=h(s[n]);var i,c=e.split(";");t=h(c[0]),1===c.length?i=1:(e=h(c[1]),0===e.indexOf("q=")?(e=e.substr(2),i=parseFloat(e),i=isNaN(i)?0:i):i=1),l.push({lang:t,pri:i})}for(l.sort(function(e,r){return e.pri<r.pri?1:e.pri>r.pri?-1:0}),n=0;u>n;n++)if(t=l[n].lang,r=a[t])return r;for(n=0;u>n;n++)for(t=l[n].lang;;){var f=t.lastIndexOf("-");if(-1===f)break;if(t=t.substr(0,f),r=a[t])return r}for(n=0;u>n;n++){t=l[n].lang;for(var d in a){var p=a[d];if(p.language===t)return p}}}else if("object"==typeof e)return e;return r||null},t.format=function(e,r,t){var n=this.findClosestCulture(t);return e instanceof Date?e=M(e,r,n):"number"==typeof e&&(e=v(e,r,n)),e},t.localize=function(e,r){return this.findClosestCulture(r).messages[e]||this.cultures["default"].messages[e]},t.parseDate=function(e,r,t){t=this.findClosestCulture(t);var n,a,s;if(r){if("string"==typeof r&&(r=[r]),r.length)for(var u=0,l=r.length;l>u;u++){var i=r[u];if(i&&(n=A(e,i,t)))break}}else{s=t.calendar.patterns;for(a in s)if(n=A(e,s[a],t))break}return n||null},t.parseInt=function(e,r,n){return g(t.parseFloat(e,r,n))},t.parseFloat=function(e,r,t){"number"!=typeof r&&(t=r,r=10);var u=this.findClosestCulture(t),l=0/0,i=u.numberFormat;if(e.indexOf(u.numberFormat.currency.symbol)>-1&&(e=e.replace(u.numberFormat.currency.symbol,""),e=e.replace(u.numberFormat.currency["."],u.numberFormat["."])),e.indexOf(u.numberFormat.percent.symbol)>-1&&(e=e.replace(u.numberFormat.percent.symbol,"")),e=e.replace(/ /g,""),a.test(e))l=parseFloat(e);else if(!r&&n.test(e))l=parseInt(e,16);else{var c=x(e,i,i.pattern[0]),o=c[0],f=c[1];""===o&&"(n)"!==i.pattern[0]&&(c=x(e,i,"(n)"),o=c[0],f=c[1]),""===o&&"-n"!==i.pattern[0]&&(c=x(e,i,"-n"),o=c[0],f=c[1]),o=o||"+";var d,p,h=f.indexOf("e");0>h&&(h=f.indexOf("E")),0>h?(p=f,d=null):(p=f.substr(0,h),d=f.substr(h+1));var g,b,m=i["."],y=p.indexOf(m);0>y?(g=p,b=null):(g=p.substr(0,y),b=p.substr(y+m.length));var M=i[","];g=g.split(M).join("");var v=M.replace(/\u00A0/g," ");M!==v&&(g=g.split(v).join(""));var k=o+g;if(null!==b&&(k+="."+b),null!==d){var z=x(d,i,"-n");k+="e"+(z[0]||"+")+z[1]}s.test(k)&&(l=parseFloat(k))}return l},t.culture=function(e){return e!==r&&(this.cultureSelector=e),this.findClosestCulture(e)||this.cultures["default"]}; return Globalize;}(this));

/***/ }),
/* 330 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var AnalyticsEndpoint_1 = __webpack_require__(154);
exports.AnalyticsEndpoint = AnalyticsEndpoint_1.AnalyticsEndpoint;
var EndpointCaller_1 = __webpack_require__(91);
exports.EndpointCaller = EndpointCaller_1.EndpointCaller;
var QueryError_1 = __webpack_require__(145);
exports.QueryError = QueryError_1.QueryError;


/***/ }),
/* 331 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var EndpointCaller_1 = __webpack_require__(91);
var UrlUtils_1 = __webpack_require__(43);
var AnalyticsEndpointCaller = /** @class */ (function () {
    function AnalyticsEndpointCaller(options) {
        if (options === void 0) { options = {}; }
        this.options = options;
        this.passthrough = new EndpointCaller_1.EndpointCaller(options);
    }
    AnalyticsEndpointCaller.prototype.call = function (params) {
        if (this.shouldSendAsBeacon(params)) {
            this.sendBeacon(params);
            return;
        }
        return this.passthrough.call(params);
    };
    Object.defineProperty(AnalyticsEndpointCaller.prototype, "beaconApiIsUsable", {
        get: function () {
            return typeof navigator.sendBeacon === 'function';
        },
        enumerable: true,
        configurable: true
    });
    AnalyticsEndpointCaller.prototype.sendBeacon = function (params) {
        var queryAsString = params.queryString.concat(this.additionalQueryStringParams);
        var url = UrlUtils_1.UrlUtils.normalizeAsString({ paths: params.url, queryAsString: queryAsString });
        var data = EndpointCaller_1.EndpointCaller.convertJsonToFormBody({ clickEvent: params.requestData });
        navigator.sendBeacon(url, new Blob([data], { type: 'application/x-www-form-urlencoded' }));
    };
    Object.defineProperty(AnalyticsEndpointCaller.prototype, "additionalQueryStringParams", {
        get: function () {
            var tokenParam = this.accessTokenAsQueryString;
            return tokenParam ? [tokenParam] : [];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AnalyticsEndpointCaller.prototype, "accessTokenAsQueryString", {
        get: function () {
            var token = this.options.accessToken;
            return token ? "access_token=" + token : '';
        },
        enumerable: true,
        configurable: true
    });
    AnalyticsEndpointCaller.prototype.shouldSendAsBeacon = function (params) {
        return params.url.indexOf('/click') != -1 && this.beaconApiIsUsable;
    };
    return AnalyticsEndpointCaller;
}());
exports.AnalyticsEndpointCaller = AnalyticsEndpointCaller;


/***/ }),
/* 332 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var SearchEndpointWithDefaultCallOptions = /** @class */ (function () {
    function SearchEndpointWithDefaultCallOptions(endpoint, callOptions) {
        this.endpoint = endpoint;
        this.callOptions = callOptions;
        this.options = endpoint.options;
    }
    Object.defineProperty(SearchEndpointWithDefaultCallOptions.prototype, "accessToken", {
        get: function () {
            return this.endpoint.accessToken;
        },
        enumerable: true,
        configurable: true
    });
    SearchEndpointWithDefaultCallOptions.prototype.getBaseUri = function () {
        return this.endpoint.getBaseUri();
    };
    SearchEndpointWithDefaultCallOptions.prototype.getBaseAlertsUri = function () {
        return this.endpoint.getBaseAlertsUri();
    };
    SearchEndpointWithDefaultCallOptions.prototype.getAuthenticationProviderUri = function (provider, returnUri, message) {
        return this.endpoint.getAuthenticationProviderUri(provider, returnUri, message);
    };
    SearchEndpointWithDefaultCallOptions.prototype.isJsonp = function () {
        return this.endpoint.isJsonp();
    };
    SearchEndpointWithDefaultCallOptions.prototype.search = function (query, callOptions) {
        return this.endpoint.search(query, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.fetchBinary = function (query, callOptions) {
        return this.endpoint.fetchBinary(query, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.plan = function (query, callOptions) {
        return this.endpoint.plan(query, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getExportToExcelLink = function (query, numberOfResults, callOptions) {
        return this.endpoint.getExportToExcelLink(query, numberOfResults, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.tagDocument = function (taggingRequest, callOptions) {
        return this.endpoint.tagDocument(taggingRequest, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getQuerySuggest = function (request, callOptions) {
        return this.endpoint.getQuerySuggest(request, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.facetSearch = function (request, callOptions) {
        return this.endpoint.facetSearch(request, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.rateDocument = function (ratingRequest, callOptions) {
        return this.endpoint.rateDocument(ratingRequest, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getRawDataStream = function (documentUniqueId, dataStreamType, callOptions) {
        return this.endpoint.getRawDataStream(documentUniqueId, dataStreamType, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getDocument = function (documentUniqueId, callOptions) {
        return this.endpoint.getDocument(documentUniqueId, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getDocumentText = function (documentUniqueID, callOptions) {
        return this.endpoint.getDocumentText(documentUniqueID, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getDocumentHtml = function (documentUniqueID, callOptions) {
        return this.endpoint.getDocumentHtml(documentUniqueID, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getViewAsHtmlUri = function (documentUniqueID, callOptions) {
        return this.endpoint.getViewAsHtmlUri(documentUniqueID, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.getViewAsDatastreamUri = function (documentUniqueID, dataStreamType, callOptions) {
        return this.endpoint.getViewAsDatastreamUri(documentUniqueID, dataStreamType, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.listFieldValuesBatch = function (request, callOptions) {
        return this.endpoint.listFieldValuesBatch(request, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.listFieldValues = function (request, callOptions) {
        return this.endpoint.listFieldValues(request, this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.listFields = function (callOptions) {
        return this.endpoint.listFields(this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.extensions = function (callOptions) {
        return this.endpoint.extensions(this.enrichCallOptions(callOptions));
    };
    SearchEndpointWithDefaultCallOptions.prototype.follow = function (request) {
        return this.endpoint.follow(request);
    };
    SearchEndpointWithDefaultCallOptions.prototype.listSubscriptions = function (page) {
        return this.endpoint.listSubscriptions(page);
    };
    SearchEndpointWithDefaultCallOptions.prototype.updateSubscription = function (subscription) {
        return this.endpoint.updateSubscription(subscription);
    };
    SearchEndpointWithDefaultCallOptions.prototype.deleteSubscription = function (subscription) {
        return this.endpoint.deleteSubscription(subscription);
    };
    SearchEndpointWithDefaultCallOptions.prototype.logError = function (sentryLog) {
        return this.endpoint.logError(sentryLog);
    };
    SearchEndpointWithDefaultCallOptions.prototype.exchangeHandshakeToken = function (options) {
        return this.endpoint.exchangeHandshakeToken(options);
    };
    SearchEndpointWithDefaultCallOptions.prototype.enrichCallOptions = function (callOptions) {
        return _.extend({}, callOptions, this.callOptions);
    };
    return SearchEndpointWithDefaultCallOptions;
}());
exports.SearchEndpointWithDefaultCallOptions = SearchEndpointWithDefaultCallOptions;


/***/ }),
/* 333 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(__webpack_require__(30));
var IComponentOptions_1 = __webpack_require__(51);
exports.ComponentOptionsType = IComponentOptions_1.ComponentOptionsType;
var ComponentOptions_1 = __webpack_require__(8);
exports.ComponentOptions = ComponentOptions_1.ComponentOptions;
var Component_1 = __webpack_require__(7);
exports.Component = Component_1.Component;
var BaseComponent_1 = __webpack_require__(36);
exports.BaseComponent = BaseComponent_1.BaseComponent;
var RootComponent_1 = __webpack_require__(45);
exports.RootComponent = RootComponent_1.RootComponent;
var QueryBuilder_1 = __webpack_require__(49);
exports.QueryBuilder = QueryBuilder_1.QueryBuilder;
var ExpressionBuilder_1 = __webpack_require__(75);
exports.ExpressionBuilder = ExpressionBuilder_1.ExpressionBuilder;
// Export Initialization under both name, for legacy reason and old code in the wild that
// reference the old CoveoJQuery module
var Initialization_1 = __webpack_require__(2);
exports.Initialization = Initialization_1.Initialization;
var Initialization_2 = __webpack_require__(2);
exports.CoveoJQuery = Initialization_2.Initialization;
var CoveoJQuery_1 = __webpack_require__(213);
exports.initCoveoJQuery = CoveoJQuery_1.initCoveoJQuery;
var DatePicker_1 = __webpack_require__(90);
exports.DatePicker = DatePicker_1.DatePicker;
var ResponsiveComponentsManager_1 = __webpack_require__(62);
exports.ResponsiveComponentsManager = ResponsiveComponentsManager_1.ResponsiveComponentsManager;
var ResponsiveDropdown_1 = __webpack_require__(124);
exports.ResponsiveDropdown = ResponsiveDropdown_1.ResponsiveDropdown;
var ResponsiveDropdownHeader_1 = __webpack_require__(136);
exports.ResponsiveDropdownHeader = ResponsiveDropdownHeader_1.ResponsiveDropdownHeader;
var ResponsiveDropdownContent_1 = __webpack_require__(94);
exports.ResponsiveDropdownContent = ResponsiveDropdownContent_1.ResponsiveDropdownContent;


/***/ }),
/* 334 */
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root) {/*global exports, Intl*/
/**
 * This script gives you the zone info key representing your device's time zone setting.
 *
 * @name jsTimezoneDetect
 * @version 1.0.6
 * @author Jon Nylander
 * @license MIT License - https://bitbucket.org/pellepim/jstimezonedetect/src/default/LICENCE.txt
 *
 * For usage and examples, visit:
 * http://pellepim.bitbucket.org/jstz/
 *
 * Copyright (c) Jon Nylander
 */


/**
 * Namespace to hold all the code for timezone detection.
 */
var jstz = (function () {
    'use strict';
    var HEMISPHERE_SOUTH = 's',

        consts = {
            DAY: 86400000,
            HOUR: 3600000,
            MINUTE: 60000,
            SECOND: 1000,
            BASELINE_YEAR: 2014,
            MAX_SCORE: 864000000, // 10 days
            AMBIGUITIES: {
                'America/Denver':       ['America/Mazatlan'],
                'Europe/London':        ['Africa/Casablanca'],
                'America/Chicago':      ['America/Mexico_City'],
                'America/Asuncion':     ['America/Campo_Grande', 'America/Santiago'],
                'America/Montevideo':   ['America/Sao_Paulo', 'America/Santiago'],
                // Europe/Minsk should not be in this list... but Windows.
                'Asia/Beirut':          ['Asia/Amman', 'Asia/Jerusalem', 'Europe/Helsinki', 'Asia/Damascus', 'Africa/Cairo', 'Asia/Gaza', 'Europe/Minsk'],
                'Pacific/Auckland':     ['Pacific/Fiji'],
                'America/Los_Angeles':  ['America/Santa_Isabel'],
                'America/New_York':     ['America/Havana'],
                'America/Halifax':      ['America/Goose_Bay'],
                'America/Godthab':      ['America/Miquelon'],
                'Asia/Dubai':           ['Asia/Yerevan'],
                'Asia/Jakarta':         ['Asia/Krasnoyarsk'],
                'Asia/Shanghai':        ['Asia/Irkutsk', 'Australia/Perth'],
                'Australia/Sydney':     ['Australia/Lord_Howe'],
                'Asia/Tokyo':           ['Asia/Yakutsk'],
                'Asia/Dhaka':           ['Asia/Omsk'],
                // In the real world Yerevan is not ambigous for Baku... but Windows.
                'Asia/Baku':            ['Asia/Yerevan'],
                'Australia/Brisbane':   ['Asia/Vladivostok'],
                'Pacific/Noumea':       ['Asia/Vladivostok'],
                'Pacific/Majuro':       ['Asia/Kamchatka', 'Pacific/Fiji'],
                'Pacific/Tongatapu':    ['Pacific/Apia'],
                'Asia/Baghdad':         ['Europe/Minsk', 'Europe/Moscow'],
                'Asia/Karachi':         ['Asia/Yekaterinburg'],
                'Africa/Johannesburg':  ['Asia/Gaza', 'Africa/Cairo']
            }
        },

        /**
         * Gets the offset in minutes from UTC for a certain date.
         * @param {Date} date
         * @returns {Number}
         */
        get_date_offset = function get_date_offset(date) {
            var offset = -date.getTimezoneOffset();
            return (offset !== null ? offset : 0);
        },

        /**
         * This function does some basic calculations to create information about
         * the user's timezone. It uses REFERENCE_YEAR as a solid year for which
         * the script has been tested rather than depend on the year set by the
         * client device.
         *
         * Returns a key that can be used to do lookups in jstz.olson.timezones.
         * eg: "720,1,2".
         *
         * @returns {String}
         */
        lookup_key = function lookup_key() {
            var january_offset = get_date_offset(new Date(consts.BASELINE_YEAR, 0, 2)),
                june_offset = get_date_offset(new Date(consts.BASELINE_YEAR, 5, 2)),
                diff = january_offset - june_offset;

            if (diff < 0) {
                return january_offset + ",1";
            } else if (diff > 0) {
                return june_offset + ",1," + HEMISPHERE_SOUTH;
            }

            return january_offset + ",0";
        },


        /**
         * Tries to get the time zone key directly from the operating system for those
         * environments that support the ECMAScript Internationalization API.
         */
        get_from_internationalization_api = function get_from_internationalization_api() {
            var format, timezone;
            if (typeof Intl === "undefined" || typeof Intl.DateTimeFormat === "undefined") {
                return;
            }

            format = Intl.DateTimeFormat();

            if (typeof format === "undefined" || typeof format.resolvedOptions === "undefined") {
                return;
            }

            timezone = format.resolvedOptions().timeZone;

            if (timezone && (timezone.indexOf("/") > -1 || timezone === 'UTC')) {
                return timezone;
            }

        },

        /**
         * Starting point for getting all the DST rules for a specific year
         * for the current timezone (as described by the client system).
         *
         * Returns an object with start and end attributes, or false if no
         * DST rules were found for the year.
         *
         * @param year
         * @returns {Object} || {Boolean}
         */
        dst_dates = function dst_dates(year) {
            var yearstart = new Date(year, 0, 1, 0, 0, 1, 0).getTime();
            var yearend = new Date(year, 12, 31, 23, 59, 59).getTime();
            var current = yearstart;
            var offset = (new Date(current)).getTimezoneOffset();
            var dst_start = null;
            var dst_end = null;

            while (current < yearend - 86400000) {
                var dateToCheck = new Date(current);
                var dateToCheckOffset = dateToCheck.getTimezoneOffset();

                if (dateToCheckOffset !== offset) {
                    if (dateToCheckOffset < offset) {
                        dst_start = dateToCheck;
                    }
                    if (dateToCheckOffset > offset) {
                        dst_end = dateToCheck;
                    }
                    offset = dateToCheckOffset;
                }

                current += 86400000;
            }

            if (dst_start && dst_end) {
                return {
                    s: find_dst_fold(dst_start).getTime(),
                    e: find_dst_fold(dst_end).getTime()
                };
            }

            return false;
        },

        /**
         * Probably completely unnecessary function that recursively finds the
         * exact (to the second) time when a DST rule was changed.
         *
         * @param a_date - The candidate Date.
         * @param padding - integer specifying the padding to allow around the candidate
         *                  date for finding the fold.
         * @param iterator - integer specifying how many milliseconds to iterate while
         *                   searching for the fold.
         *
         * @returns {Date}
         */
        find_dst_fold = function find_dst_fold(a_date, padding, iterator) {
            if (typeof padding === 'undefined') {
                padding = consts.DAY;
                iterator = consts.HOUR;
            }

            var date_start = new Date(a_date.getTime() - padding).getTime();
            var date_end = a_date.getTime() + padding;
            var offset = new Date(date_start).getTimezoneOffset();

            var current = date_start;

            var dst_change = null;
            while (current < date_end - iterator) {
                var dateToCheck = new Date(current);
                var dateToCheckOffset = dateToCheck.getTimezoneOffset();

                if (dateToCheckOffset !== offset) {
                    dst_change = dateToCheck;
                    break;
                }
                current += iterator;
            }

            if (padding === consts.DAY) {
                return find_dst_fold(dst_change, consts.HOUR, consts.MINUTE);
            }

            if (padding === consts.HOUR) {
                return find_dst_fold(dst_change, consts.MINUTE, consts.SECOND);
            }

            return dst_change;
        },

        windows7_adaptations = function windows7_adaptions(rule_list, preliminary_timezone, score, sample) {
            if (score !== 'N/A') {
                return score;
            }
            if (preliminary_timezone === 'Asia/Beirut') {
                if (sample.name === 'Africa/Cairo') {
                    if (rule_list[6].s === 1398376800000 && rule_list[6].e === 1411678800000) {
                        return 0;
                    }
                }
                if (sample.name === 'Asia/Jerusalem') {
                    if (rule_list[6].s === 1395964800000 && rule_list[6].e === 1411858800000) {
                        return 0;
                }
            }
            } else if (preliminary_timezone === 'America/Santiago') {
                if (sample.name === 'America/Asuncion') {
                    if (rule_list[6].s === 1412481600000 && rule_list[6].e === 1397358000000) {
                        return 0;
                    }
                }
                if (sample.name === 'America/Campo_Grande') {
                    if (rule_list[6].s === 1413691200000 && rule_list[6].e === 1392519600000) {
                        return 0;
                    }
                }
            } else if (preliminary_timezone === 'America/Montevideo') {
                if (sample.name === 'America/Sao_Paulo') {
                    if (rule_list[6].s === 1413687600000 && rule_list[6].e === 1392516000000) {
                        return 0;
                    }
                }
            } else if (preliminary_timezone === 'Pacific/Auckland') {
                if (sample.name === 'Pacific/Fiji') {
                    if (rule_list[6].s === 1414245600000 && rule_list[6].e === 1396101600000) {
                        return 0;
                    }
                }
            }

            return score;
        },

        /**
         * Takes the DST rules for the current timezone, and proceeds to find matches
         * in the jstz.olson.dst_rules.zones array.
         *
         * Compares samples to the current timezone on a scoring basis.
         *
         * Candidates are ruled immediately if either the candidate or the current zone
         * has a DST rule where the other does not.
         *
         * Candidates are ruled out immediately if the current zone has a rule that is
         * outside the DST scope of the candidate.
         *
         * Candidates are included for scoring if the current zones rules fall within the
         * span of the samples rules.
         *
         * Low score is best, the score is calculated by summing up the differences in DST
         * rules and if the consts.MAX_SCORE is overreached the candidate is ruled out.
         *
         * Yah follow? :)
         *
         * @param rule_list
         * @param preliminary_timezone
         * @returns {*}
         */
        best_dst_match = function best_dst_match(rule_list, preliminary_timezone) {
            var score_sample = function score_sample(sample) {
                var score = 0;

                for (var j = 0; j < rule_list.length; j++) {

                    // Both sample and current time zone report DST during the year.
                    if (!!sample.rules[j] && !!rule_list[j]) {

                        // The current time zone's DST rules are inside the sample's. Include.
                        if (rule_list[j].s >= sample.rules[j].s && rule_list[j].e <= sample.rules[j].e) {
                            score = 0;
                            score += Math.abs(rule_list[j].s - sample.rules[j].s);
                            score += Math.abs(sample.rules[j].e - rule_list[j].e);

                        // The current time zone's DST rules are outside the sample's. Discard.
                        } else {
                            score = 'N/A';
                            break;
                        }

                        // The max score has been reached. Discard.
                        if (score > consts.MAX_SCORE) {
                            score = 'N/A';
                            break;
                        }
                    }
                }

                score = windows7_adaptations(rule_list, preliminary_timezone, score, sample);

                return score;
            };
            var scoreboard = {};
            var dst_zones = jstz.olson.dst_rules.zones;
            var dst_zones_length = dst_zones.length;
            var ambiguities = consts.AMBIGUITIES[preliminary_timezone];

            for (var i = 0; i < dst_zones_length; i++) {
                var sample = dst_zones[i];
                var score = score_sample(dst_zones[i]);

                if (score !== 'N/A') {
                    scoreboard[sample.name] = score;
                }
            }

            for (var tz in scoreboard) {
                if (scoreboard.hasOwnProperty(tz)) {
                    for (var j = 0; j < ambiguities.length; j++) {
                        if (ambiguities[j] === tz) {
                            return tz;
                        }
                    }
                }
            }

            return preliminary_timezone;
        },

        /**
         * Takes the preliminary_timezone as detected by lookup_key().
         *
         * Builds up the current timezones DST rules for the years defined
         * in the jstz.olson.dst_rules.years array.
         *
         * If there are no DST occurences for those years, immediately returns
         * the preliminary timezone. Otherwise proceeds and tries to solve
         * ambiguities.
         *
         * @param preliminary_timezone
         * @returns {String} timezone_name
         */
        get_by_dst = function get_by_dst(preliminary_timezone) {
            var get_rules = function get_rules() {
                var rule_list = [];
                for (var i = 0; i < jstz.olson.dst_rules.years.length; i++) {
                    var year_rules = dst_dates(jstz.olson.dst_rules.years[i]);
                    rule_list.push(year_rules);
                }
                return rule_list;
            };
            var check_has_dst = function check_has_dst(rules) {
                for (var i = 0; i < rules.length; i++) {
                    if (rules[i] !== false) {
                        return true;
                    }
                }
                return false;
            };
            var rules = get_rules();
            var has_dst = check_has_dst(rules);

            if (has_dst) {
                return best_dst_match(rules, preliminary_timezone);
            }

            return preliminary_timezone;
        },

        /**
         * Uses get_timezone_info() to formulate a key to use in the olson.timezones dictionary.
         *
         * Returns an object with one function ".name()"
         *
         * @returns Object
         */
        determine = function determine() {
            var preliminary_tz = get_from_internationalization_api();

            if (!preliminary_tz) {
                preliminary_tz = jstz.olson.timezones[lookup_key()];

                if (typeof consts.AMBIGUITIES[preliminary_tz] !== 'undefined') {
                    preliminary_tz = get_by_dst(preliminary_tz);
                }
            }

            return {
                name: function () {
                    return preliminary_tz;
                }
            };
        };

    return {
        determine: determine
    };
}());


jstz.olson = jstz.olson || {};

/**
 * The keys in this dictionary are comma separated as such:
 *
 * First the offset compared to UTC time in minutes.
 *
 * Then a flag which is 0 if the timezone does not take daylight savings into account and 1 if it
 * does.
 *
 * Thirdly an optional 's' signifies that the timezone is in the southern hemisphere,
 * only interesting for timezones with DST.
 *
 * The mapped arrays is used for constructing the jstz.TimeZone object from within
 * jstz.determine();
 */
jstz.olson.timezones = {
    '-720,0': 'Etc/GMT+12',
    '-660,0': 'Pacific/Pago_Pago',
    '-660,1,s': 'Pacific/Apia', // Why? Because windows... cry!
    '-600,1': 'America/Adak',
    '-600,0': 'Pacific/Honolulu',
    '-570,0': 'Pacific/Marquesas',
    '-540,0': 'Pacific/Gambier',
    '-540,1': 'America/Anchorage',
    '-480,1': 'America/Los_Angeles',
    '-480,0': 'Pacific/Pitcairn',
    '-420,0': 'America/Phoenix',
    '-420,1': 'America/Denver',
    '-360,0': 'America/Guatemala',
    '-360,1': 'America/Chicago',
    '-360,1,s': 'Pacific/Easter',
    '-300,0': 'America/Bogota',
    '-300,1': 'America/New_York',
    '-270,0': 'America/Caracas',
    '-240,1': 'America/Halifax',
    '-240,0': 'America/Santo_Domingo',
    '-240,1,s': 'America/Asuncion',
    '-210,1': 'America/St_Johns',
    '-180,1': 'America/Godthab',
    '-180,0': 'America/Argentina/Buenos_Aires',
    '-180,1,s': 'America/Montevideo',
    '-120,0': 'America/Noronha',
    '-120,1': 'America/Noronha',
    '-60,1': 'Atlantic/Azores',
    '-60,0': 'Atlantic/Cape_Verde',
    '0,0': 'UTC',
    '0,1': 'Europe/London',
    '60,1': 'Europe/Berlin',
    '60,0': 'Africa/Lagos',
    '60,1,s': 'Africa/Windhoek',
    '120,1': 'Asia/Beirut',
    '120,0': 'Africa/Johannesburg',
    '180,0': 'Asia/Baghdad',
    '180,1': 'Europe/Moscow',
    '210,1': 'Asia/Tehran',
    '240,0': 'Asia/Dubai',
    '240,1': 'Asia/Baku',
    '270,0': 'Asia/Kabul',
    '300,1': 'Asia/Yekaterinburg',
    '300,0': 'Asia/Karachi',
    '330,0': 'Asia/Kolkata',
    '345,0': 'Asia/Kathmandu',
    '360,0': 'Asia/Dhaka',
    '360,1': 'Asia/Omsk',
    '390,0': 'Asia/Rangoon',
    '420,1': 'Asia/Krasnoyarsk',
    '420,0': 'Asia/Jakarta',
    '480,0': 'Asia/Shanghai',
    '480,1': 'Asia/Irkutsk',
    '525,0': 'Australia/Eucla',
    '525,1,s': 'Australia/Eucla',
    '540,1': 'Asia/Yakutsk',
    '540,0': 'Asia/Tokyo',
    '570,0': 'Australia/Darwin',
    '570,1,s': 'Australia/Adelaide',
    '600,0': 'Australia/Brisbane',
    '600,1': 'Asia/Vladivostok',
    '600,1,s': 'Australia/Sydney',
    '630,1,s': 'Australia/Lord_Howe',
    '660,1': 'Asia/Kamchatka',
    '660,0': 'Pacific/Noumea',
    '690,0': 'Pacific/Norfolk',
    '720,1,s': 'Pacific/Auckland',
    '720,0': 'Pacific/Majuro',
    '765,1,s': 'Pacific/Chatham',
    '780,0': 'Pacific/Tongatapu',
    '780,1,s': 'Pacific/Apia',
    '840,0': 'Pacific/Kiritimati'
};

/* Build time: 2015-11-02 13:01:00Z Build by invoking python utilities/dst.py generate */
jstz.olson.dst_rules = {
    "years": [
        2008,
        2009,
        2010,
        2011,
        2012,
        2013,
        2014
    ],
    "zones": [
        {
            "name": "Africa/Cairo",
            "rules": [
                {
                    "e": 1219957200000,
                    "s": 1209074400000
                },
                {
                    "e": 1250802000000,
                    "s": 1240524000000
                },
                {
                    "e": 1285880400000,
                    "s": 1284069600000
                },
                false,
                false,
                false,
                {
                    "e": 1411678800000,
                    "s": 1406844000000
                }
            ]
        },
        {
            "name": "Africa/Casablanca",
            "rules": [
                {
                    "e": 1220223600000,
                    "s": 1212278400000
                },
                {
                    "e": 1250809200000,
                    "s": 1243814400000
                },
                {
                    "e": 1281222000000,
                    "s": 1272758400000
                },
                {
                    "e": 1312066800000,
                    "s": 1301788800000
                },
                {
                    "e": 1348970400000,
                    "s": 1345428000000
                },
                {
                    "e": 1382839200000,
                    "s": 1376100000000
                },
                {
                    "e": 1414288800000,
                    "s": 1406944800000
                }
            ]
        },
        {
            "name": "America/Asuncion",
            "rules": [
                {
                    "e": 1205031600000,
                    "s": 1224388800000
                },
                {
                    "e": 1236481200000,
                    "s": 1255838400000
                },
                {
                    "e": 1270954800000,
                    "s": 1286078400000
                },
                {
                    "e": 1302404400000,
                    "s": 1317528000000
                },
                {
                    "e": 1333854000000,
                    "s": 1349582400000
                },
                {
                    "e": 1364094000000,
                    "s": 1381032000000
                },
                {
                    "e": 1395543600000,
                    "s": 1412481600000
                }
            ]
        },
        {
            "name": "America/Campo_Grande",
            "rules": [
                {
                    "e": 1203217200000,
                    "s": 1224388800000
                },
                {
                    "e": 1234666800000,
                    "s": 1255838400000
                },
                {
                    "e": 1266721200000,
                    "s": 1287288000000
                },
                {
                    "e": 1298170800000,
                    "s": 1318737600000
                },
                {
                    "e": 1330225200000,
                    "s": 1350792000000
                },
                {
                    "e": 1361070000000,
                    "s": 1382241600000
                },
                {
                    "e": 1392519600000,
                    "s": 1413691200000
                }
            ]
        },
        {
            "name": "America/Goose_Bay",
            "rules": [
                {
                    "e": 1225594860000,
                    "s": 1205035260000
                },
                {
                    "e": 1257044460000,
                    "s": 1236484860000
                },
                {
                    "e": 1289098860000,
                    "s": 1268539260000
                },
                {
                    "e": 1320555600000,
                    "s": 1299988860000
                },
                {
                    "e": 1352005200000,
                    "s": 1331445600000
                },
                {
                    "e": 1383454800000,
                    "s": 1362895200000
                },
                {
                    "e": 1414904400000,
                    "s": 1394344800000
                }
            ]
        },
        {
            "name": "America/Havana",
            "rules": [
                {
                    "e": 1224997200000,
                    "s": 1205643600000
                },
                {
                    "e": 1256446800000,
                    "s": 1236488400000
                },
                {
                    "e": 1288501200000,
                    "s": 1268542800000
                },
                {
                    "e": 1321160400000,
                    "s": 1300597200000
                },
                {
                    "e": 1352005200000,
                    "s": 1333256400000
                },
                {
                    "e": 1383454800000,
                    "s": 1362891600000
                },
                {
                    "e": 1414904400000,
                    "s": 1394341200000
                }
            ]
        },
        {
            "name": "America/Mazatlan",
            "rules": [
                {
                    "e": 1225008000000,
                    "s": 1207472400000
                },
                {
                    "e": 1256457600000,
                    "s": 1238922000000
                },
                {
                    "e": 1288512000000,
                    "s": 1270371600000
                },
                {
                    "e": 1319961600000,
                    "s": 1301821200000
                },
                {
                    "e": 1351411200000,
                    "s": 1333270800000
                },
                {
                    "e": 1382860800000,
                    "s": 1365325200000
                },
                {
                    "e": 1414310400000,
                    "s": 1396774800000
                }
            ]
        },
        {
            "name": "America/Mexico_City",
            "rules": [
                {
                    "e": 1225004400000,
                    "s": 1207468800000
                },
                {
                    "e": 1256454000000,
                    "s": 1238918400000
                },
                {
                    "e": 1288508400000,
                    "s": 1270368000000
                },
                {
                    "e": 1319958000000,
                    "s": 1301817600000
                },
                {
                    "e": 1351407600000,
                    "s": 1333267200000
                },
                {
                    "e": 1382857200000,
                    "s": 1365321600000
                },
                {
                    "e": 1414306800000,
                    "s": 1396771200000
                }
            ]
        },
        {
            "name": "America/Miquelon",
            "rules": [
                {
                    "e": 1225598400000,
                    "s": 1205038800000
                },
                {
                    "e": 1257048000000,
                    "s": 1236488400000
                },
                {
                    "e": 1289102400000,
                    "s": 1268542800000
                },
                {
                    "e": 1320552000000,
                    "s": 1299992400000
                },
                {
                    "e": 1352001600000,
                    "s": 1331442000000
                },
                {
                    "e": 1383451200000,
                    "s": 1362891600000
                },
                {
                    "e": 1414900800000,
                    "s": 1394341200000
                }
            ]
        },
        {
            "name": "America/Santa_Isabel",
            "rules": [
                {
                    "e": 1225011600000,
                    "s": 1207476000000
                },
                {
                    "e": 1256461200000,
                    "s": 1238925600000
                },
                {
                    "e": 1288515600000,
                    "s": 1270375200000
                },
                {
                    "e": 1319965200000,
                    "s": 1301824800000
                },
                {
                    "e": 1351414800000,
                    "s": 1333274400000
                },
                {
                    "e": 1382864400000,
                    "s": 1365328800000
                },
                {
                    "e": 1414314000000,
                    "s": 1396778400000
                }
            ]
        },
        {
            "name": "America/Santiago",
            "rules": [
                {
                    "e": 1206846000000,
                    "s": 1223784000000
                },
                {
                    "e": 1237086000000,
                    "s": 1255233600000
                },
                {
                    "e": 1270350000000,
                    "s": 1286683200000
                },
                {
                    "e": 1304823600000,
                    "s": 1313899200000
                },
                {
                    "e": 1335668400000,
                    "s": 1346558400000
                },
                {
                    "e": 1367118000000,
                    "s": 1378612800000
                },
                {
                    "e": 1398567600000,
                    "s": 1410062400000
                }
            ]
        },
        {
            "name": "America/Sao_Paulo",
            "rules": [
                {
                    "e": 1203213600000,
                    "s": 1224385200000
                },
                {
                    "e": 1234663200000,
                    "s": 1255834800000
                },
                {
                    "e": 1266717600000,
                    "s": 1287284400000
                },
                {
                    "e": 1298167200000,
                    "s": 1318734000000
                },
                {
                    "e": 1330221600000,
                    "s": 1350788400000
                },
                {
                    "e": 1361066400000,
                    "s": 1382238000000
                },
                {
                    "e": 1392516000000,
                    "s": 1413687600000
                }
            ]
        },
        {
            "name": "Asia/Amman",
            "rules": [
                {
                    "e": 1225404000000,
                    "s": 1206655200000
                },
                {
                    "e": 1256853600000,
                    "s": 1238104800000
                },
                {
                    "e": 1288303200000,
                    "s": 1269554400000
                },
                {
                    "e": 1319752800000,
                    "s": 1301608800000
                },
                false,
                false,
                {
                    "e": 1414706400000,
                    "s": 1395957600000
                }
            ]
        },
        {
            "name": "Asia/Damascus",
            "rules": [
                {
                    "e": 1225486800000,
                    "s": 1207260000000
                },
                {
                    "e": 1256850000000,
                    "s": 1238104800000
                },
                {
                    "e": 1288299600000,
                    "s": 1270159200000
                },
                {
                    "e": 1319749200000,
                    "s": 1301608800000
                },
                {
                    "e": 1351198800000,
                    "s": 1333058400000
                },
                {
                    "e": 1382648400000,
                    "s": 1364508000000
                },
                {
                    "e": 1414702800000,
                    "s": 1395957600000
                }
            ]
        },
        {
            "name": "Asia/Dubai",
            "rules": [
                false,
                false,
                false,
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Gaza",
            "rules": [
                {
                    "e": 1219957200000,
                    "s": 1206655200000
                },
                {
                    "e": 1252015200000,
                    "s": 1238104800000
                },
                {
                    "e": 1281474000000,
                    "s": 1269640860000
                },
                {
                    "e": 1312146000000,
                    "s": 1301608860000
                },
                {
                    "e": 1348178400000,
                    "s": 1333058400000
                },
                {
                    "e": 1380229200000,
                    "s": 1364508000000
                },
                {
                    "e": 1414098000000,
                    "s": 1395957600000
                }
            ]
        },
        {
            "name": "Asia/Irkutsk",
            "rules": [
                {
                    "e": 1224957600000,
                    "s": 1206813600000
                },
                {
                    "e": 1256407200000,
                    "s": 1238263200000
                },
                {
                    "e": 1288461600000,
                    "s": 1269712800000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Jerusalem",
            "rules": [
                {
                    "e": 1223161200000,
                    "s": 1206662400000
                },
                {
                    "e": 1254006000000,
                    "s": 1238112000000
                },
                {
                    "e": 1284246000000,
                    "s": 1269561600000
                },
                {
                    "e": 1317510000000,
                    "s": 1301616000000
                },
                {
                    "e": 1348354800000,
                    "s": 1333065600000
                },
                {
                    "e": 1382828400000,
                    "s": 1364515200000
                },
                {
                    "e": 1414278000000,
                    "s": 1395964800000
                }
            ]
        },
        {
            "name": "Asia/Kamchatka",
            "rules": [
                {
                    "e": 1224943200000,
                    "s": 1206799200000
                },
                {
                    "e": 1256392800000,
                    "s": 1238248800000
                },
                {
                    "e": 1288450800000,
                    "s": 1269698400000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Krasnoyarsk",
            "rules": [
                {
                    "e": 1224961200000,
                    "s": 1206817200000
                },
                {
                    "e": 1256410800000,
                    "s": 1238266800000
                },
                {
                    "e": 1288465200000,
                    "s": 1269716400000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Omsk",
            "rules": [
                {
                    "e": 1224964800000,
                    "s": 1206820800000
                },
                {
                    "e": 1256414400000,
                    "s": 1238270400000
                },
                {
                    "e": 1288468800000,
                    "s": 1269720000000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Vladivostok",
            "rules": [
                {
                    "e": 1224950400000,
                    "s": 1206806400000
                },
                {
                    "e": 1256400000000,
                    "s": 1238256000000
                },
                {
                    "e": 1288454400000,
                    "s": 1269705600000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Yakutsk",
            "rules": [
                {
                    "e": 1224954000000,
                    "s": 1206810000000
                },
                {
                    "e": 1256403600000,
                    "s": 1238259600000
                },
                {
                    "e": 1288458000000,
                    "s": 1269709200000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Yekaterinburg",
            "rules": [
                {
                    "e": 1224968400000,
                    "s": 1206824400000
                },
                {
                    "e": 1256418000000,
                    "s": 1238274000000
                },
                {
                    "e": 1288472400000,
                    "s": 1269723600000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Asia/Yerevan",
            "rules": [
                {
                    "e": 1224972000000,
                    "s": 1206828000000
                },
                {
                    "e": 1256421600000,
                    "s": 1238277600000
                },
                {
                    "e": 1288476000000,
                    "s": 1269727200000
                },
                {
                    "e": 1319925600000,
                    "s": 1301176800000
                },
                false,
                false,
                false
            ]
        },
        {
            "name": "Australia/Lord_Howe",
            "rules": [
                {
                    "e": 1207407600000,
                    "s": 1223134200000
                },
                {
                    "e": 1238857200000,
                    "s": 1254583800000
                },
                {
                    "e": 1270306800000,
                    "s": 1286033400000
                },
                {
                    "e": 1301756400000,
                    "s": 1317483000000
                },
                {
                    "e": 1333206000000,
                    "s": 1349537400000
                },
                {
                    "e": 1365260400000,
                    "s": 1380987000000
                },
                {
                    "e": 1396710000000,
                    "s": 1412436600000
                }
            ]
        },
        {
            "name": "Australia/Perth",
            "rules": [
                {
                    "e": 1206813600000,
                    "s": 1224957600000
                },
                false,
                false,
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Europe/Helsinki",
            "rules": [
                {
                    "e": 1224982800000,
                    "s": 1206838800000
                },
                {
                    "e": 1256432400000,
                    "s": 1238288400000
                },
                {
                    "e": 1288486800000,
                    "s": 1269738000000
                },
                {
                    "e": 1319936400000,
                    "s": 1301187600000
                },
                {
                    "e": 1351386000000,
                    "s": 1332637200000
                },
                {
                    "e": 1382835600000,
                    "s": 1364691600000
                },
                {
                    "e": 1414285200000,
                    "s": 1396141200000
                }
            ]
        },
        {
            "name": "Europe/Minsk",
            "rules": [
                {
                    "e": 1224979200000,
                    "s": 1206835200000
                },
                {
                    "e": 1256428800000,
                    "s": 1238284800000
                },
                {
                    "e": 1288483200000,
                    "s": 1269734400000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Europe/Moscow",
            "rules": [
                {
                    "e": 1224975600000,
                    "s": 1206831600000
                },
                {
                    "e": 1256425200000,
                    "s": 1238281200000
                },
                {
                    "e": 1288479600000,
                    "s": 1269730800000
                },
                false,
                false,
                false,
                false
            ]
        },
        {
            "name": "Pacific/Apia",
            "rules": [
                false,
                false,
                false,
                {
                    "e": 1301752800000,
                    "s": 1316872800000
                },
                {
                    "e": 1333202400000,
                    "s": 1348927200000
                },
                {
                    "e": 1365256800000,
                    "s": 1380376800000
                },
                {
                    "e": 1396706400000,
                    "s": 1411826400000
                }
            ]
        },
        {
            "name": "Pacific/Fiji",
            "rules": [
                false,
                false,
                {
                    "e": 1269698400000,
                    "s": 1287842400000
                },
                {
                    "e": 1327154400000,
                    "s": 1319292000000
                },
                {
                    "e": 1358604000000,
                    "s": 1350741600000
                },
                {
                    "e": 1390050000000,
                    "s": 1382796000000
                },
                {
                    "e": 1421503200000,
                    "s": 1414850400000
                }
            ]
        },
        {
            "name": "Europe/London",
            "rules": [
                {
                    "e": 1224982800000,
                    "s": 1206838800000
                },
                {
                    "e": 1256432400000,
                    "s": 1238288400000
                },
                {
                    "e": 1288486800000,
                    "s": 1269738000000
                },
                {
                    "e": 1319936400000,
                    "s": 1301187600000
                },
                {
                    "e": 1351386000000,
                    "s": 1332637200000
                },
                {
                    "e": 1382835600000,
                    "s": 1364691600000
                },
                {
                    "e": 1414285200000,
                    "s": 1396141200000
                }
            ]
        }
    ]
};
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
    module.exports = jstz;
} else if (("function" !== 'undefined' && __webpack_require__(335) !== null) && (__webpack_require__(336) != null)) {
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
        return jstz;
    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {
    if (typeof root === 'undefined') {
        window.jstz = jstz;
    } else {
        root.jstz = jstz;
    }
}
}());


/***/ }),
/* 335 */
/***/ (function(module, exports) {

module.exports = function() {
	throw new Error("define cannot be used indirect");
};


/***/ }),
/* 336 */
/***/ (function(module, exports) {

/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
module.exports = __webpack_amd_options__;

/* WEBPACK VAR INJECTION */}.call(exports, {}))

/***/ }),
/* 337 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 338 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 339 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 340 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 341 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var NoopHistoryController = /** @class */ (function () {
    function NoopHistoryController() {
    }
    NoopHistoryController.prototype.setState = function (state) { };
    NoopHistoryController.prototype.replaceState = function (state) { };
    return NoopHistoryController;
}());
exports.NoopHistoryController = NoopHistoryController;


/***/ }),
/* 342 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__webpack_require__(343);
var Dom_1 = __webpack_require__(1);
var QueryEvents_1 = __webpack_require__(11);
var QuerySummaryUtils_1 = __webpack_require__(206);
var Strings_1 = __webpack_require__(6);
var EventsModules_1 = __webpack_require__(102);
var AriaLive = /** @class */ (function () {
    function AriaLive(root) {
        this.root = root;
        this.initAriaLiveEl();
        this.appendToRoot();
        this.addQueryEventListeners();
    }
    AriaLive.prototype.updateText = function (text) {
        var liveText = text === Dom_1.$$(this.ariaLiveEl).text() ? text + "\u00A0" : text;
        Dom_1.$$(this.ariaLiveEl).text(liveText);
    };
    AriaLive.prototype.appendToRoot = function () {
        this.root.appendChild(this.ariaLiveEl);
    };
    AriaLive.prototype.initAriaLiveEl = function () {
        this.ariaLiveEl = Dom_1.$$('div', {
            'aria-live': 'polite',
            className: 'coveo-visible-to-screen-reader-only'
        }).el;
    };
    AriaLive.prototype.addQueryEventListeners = function () {
        var _this = this;
        var root = Dom_1.$$(this.root);
        root.on(QueryEvents_1.QueryEvents.duringQuery, function () { return _this.onDuringQuery(); });
        root.on(QueryEvents_1.QueryEvents.querySuccess, function (e, args) { return _this.onQuerySuccess(args); });
        root.on(QueryEvents_1.QueryEvents.queryError, function (e, args) { return _this.onQueryError(args); });
        root.on(EventsModules_1.OmniboxEvents.querySuggestRendered, function (e, args) {
            if (args.numberOfSuggestions > 0) {
                _this.onQuerySuggest(args.numberOfSuggestions);
                return;
            }
            _this.onNoQuerySuggest();
        });
    };
    AriaLive.prototype.onDuringQuery = function () {
        var message = Strings_1.l('UpdatingResults');
        this.updateText(message);
    };
    AriaLive.prototype.onQuerySuccess = function (args) {
        var message = this.messageForResultCount(args);
        this.updateText(message);
    };
    AriaLive.prototype.onQuerySuggest = function (numberOfSuggestions) {
        var message = Strings_1.l('QuerySuggestionsAvailable', numberOfSuggestions, numberOfSuggestions);
        this.updateText(message);
    };
    AriaLive.prototype.onNoQuerySuggest = function () {
        var message = Strings_1.l('QuerySuggestionsUnavailable');
        this.updateText(message);
    };
    AriaLive.prototype.messageForResultCount = function (args) {
        var hasResults = args.results.results.length;
        if (hasResults) {
            return QuerySummaryUtils_1.QuerySummaryUtils.message(this.root, args);
        }
        return this.noResultMessage(args.query.q);
    };
    AriaLive.prototype.noResultMessage = function (query) {
        var noResultsMessage = Strings_1.l('noResultFor', '${query}');
        var sanitizedQuery = escape(query);
        return QuerySummaryUtils_1.QuerySummaryUtils.replaceQueryTags(noResultsMessage, sanitizedQuery);
    };
    AriaLive.prototype.onQueryError = function (args) {
        var message = Strings_1.l('QueryException', args.error.message);
        this.updateText(message);
    };
    return AriaLive;
}());
exports.AriaLive = AriaLive;


/***/ }),
/* 343 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 344 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 20 20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Search\"><title>Search</title><g fill=\"currentColor\"><path class=\"coveo-magnifier-circle-svg\" d=\"m8.368 16.736c-4.614 0-8.368-3.754-8.368-8.368s3.754-8.368 8.368-8.368 8.368 3.754 8.368 8.368-3.754 8.368-8.368 8.368m0-14.161c-3.195 0-5.793 2.599-5.793 5.793s2.599 5.793 5.793 5.793 5.793-2.599 5.793-5.793-2.599-5.793-5.793-5.793\"></path><path d=\"m18.713 20c-.329 0-.659-.126-.91-.377l-4.552-4.551c-.503-.503-.503-1.318 0-1.82.503-.503 1.318-.503 1.82 0l4.552 4.551c.503.503.503 1.318 0 1.82-.252.251-.581.377-.91.377\"></path></g></svg>"

/***/ }),
/* 345 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"More\"><title>More</title><g fill=\"currentColor\"><path class=\"coveo-more-background-svg\" fill-opacity=\"0\" d=\"m8.03.819c3.987 0 7.227 3.222 7.227 7.181s-3.239 7.181-7.227 7.181c-3.976 0-7.209-3.222-7.209-7.181s3.237-7.181 7.209-7.181\"></path><path d=\"m0 8c0 4.416 3.572 8 7.991 8 4.425 0 8.009-3.581 8.009-8 0-4.416-3.581-8-8.009-8-4.416 0-7.991 3.581-7.991 8m8.031-6.4c3.553 0 6.441 2.872 6.441 6.4s-2.887 6.4-6.441 6.4c-3.544 0-6.425-2.872-6.425-6.4s2.885-6.4 6.425-6.4\"></path><path d=\"m10.988 9.024c.551 0 1-.449 1-1s-.449-1-1-1-1 .449-1 1 .449 1 1 1\"></path><path d=\"m7.991 9c .551 0 1-.449 1-1s-.449-1-1-1-1 .449-1 1 .449 1 1 1\"></path><path d=\"m4.994 9c .551 0 1-.449 1-1s-.449-1-1-1-1 .449-1 1 .449 1 1 1\"></path></g></svg>"

/***/ }),
/* 346 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 18 18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Loading\"><title>Loading</title><g fill=\"currentColor\"><path d=\"m16.76 8.051c-.448 0-.855-.303-.969-.757-.78-3.117-3.573-5.294-6.791-5.294s-6.01 2.177-6.79 5.294c-.134.537-.679.861-1.213.727-.536-.134-.861-.677-.728-1.212 1.004-4.009 4.594-6.809 8.731-6.809 4.138 0 7.728 2.8 8.73 6.809.135.536-.191 1.079-.727 1.213-.081.02-.162.029-.243.029z\"></path><path d=\"m9 18c-4.238 0-7.943-3.007-8.809-7.149-.113-.541.234-1.071.774-1.184.541-.112 1.071.232 1.184.773.674 3.222 3.555 5.56 6.851 5.56s6.178-2.338 6.852-5.56c.113-.539.634-.892 1.184-.773.54.112.887.643.773 1.184-.866 4.142-4.57 7.149-8.809 7.149z\"></path></g></svg>"

/***/ }),
/* 347 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Toggle\"><title>Toggle</title><g class=\"coveo-more-svg\" fill=\"none\"><path d=\"m10.083 4.583h-3.666v-3.666c0-.524-.393-.917-.917-.917s-.917.393-.917.917v3.667h-3.666c-.524-.001-.917.392-.917.916s.393.917.917.917h3.667v3.667c-.001.523.392.916.916.916s.917-.393.917-.917v-3.666h3.667c.523 0 .916-.393.916-.917-.001-.524-.394-.917-.917-.917z\"></path></g><g class=\"coveo-line-svg\" fill=\"none\"><path d=\"m10 6.5h-9c-.552 0-1-.448-1-1 0-.552.448-1 1-1h9c .552 0 1 .448 1 1 0 .552-.448 1-1 1z\"></path></g><g class=\"coveo-exclusion-svg\" fill=\"none\"><path d=\"m9.233 7.989-2.489-2.489 2.489-2.489c.356-.356.356-.889 0-1.244-.356-.356-.889-.356-1.244 0l-2.489 2.489-2.489-2.489c-.356-.356-.889-.356-1.244 0-.356.356-.356.889 0 1.244l2.489 2.489-2.489 2.489c-.356.356-.356.889 0 1.244.356.356.889.356 1.244 0l2.489-2.489 2.489 2.489c.356.356.889.356 1.244 0 .356-.355.356-.889 0-1.244z\"></path></g><g class=\"coveo-hook-svg\" fill=\"none\"><path d=\"m10.252 2.213c-.155-.142-.354-.211-.573-.213-.215.005-.414.091-.561.24l-4.873 4.932-2.39-2.19c-.154-.144-.385-.214-.57-.214-.214.004-.415.09-.563.24-.148.147-.227.343-.222.549.005.207.093.4.249.542l2.905 2.662c.168.154.388.239.618.239h.022.003c.237-.007.457-.101.618-.266l5.362-5.428c.148-.148.228-.344.223-.551s-.093-.399-.248-.542z\"></path></g></svg>"

/***/ }),
/* 348 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 10 6\" viewBox=\"0 0 10 6\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Arrow Up\"><title>Arrow Up</title><g fill=\"currentColor\"><path d=\"m5 .068c.222 0 .443.084.612.253l4.134 4.134c.338.338.338.886 0 1.224s-.886.338-1.224 0l-3.522-3.521-3.523 3.521c-.336.338-.886.338-1.224 0s-.337-.886.001-1.224l4.134-4.134c.168-.169.39-.253.612-.253z\"></path></g></svg>"

/***/ }),
/* 349 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 10 6\" viewBox=\"0 0 10 6\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Arrow Down\"><title>Arrow Down</title><g fill=\"currentColor\"><path d=\"m5 5.932c-.222 0-.443-.084-.612-.253l-4.134-4.134c-.338-.338-.338-.886 0-1.224s.886-.338 1.224 0l3.522 3.521 3.523-3.521c.336-.338.886-.338 1.224 0s .337.886-.001 1.224l-4.135 4.134c-.168.169-.39.253-.611.253z\"></path></g></svg>"

/***/ }),
/* 350 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 13 13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Clear\"><title>Clear</title><g fill=\"currentColor\"><path d=\"m7.881 6.501 4.834-4.834c.38-.38.38-1.001 0-1.381s-1.001-.38-1.381 0l-4.834 4.834-4.834-4.835c-.38-.38-1.001-.38-1.381 0s-.38 1.001 0 1.381l4.834 4.834-4.834 4.834c-.38.38-.38 1.001 0 1.381s1.001.38 1.381 0l4.834-4.834 4.834 4.834c.38.38 1.001.38 1.381 0s .38-1.001 0-1.381z\"></path></g></svg>"

/***/ }),
/* 351 */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m9 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7m0-16c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9\"></path><path d=\"m11.1 5.5-2.1 2.1-2.1-2.1-1.4 1.4 2.1 2.1-2.1 2.1 1.4 1.4 2.1-2.1 2.1 2.1 1.4-1.4-2.1-2.1 2.1-2.1z\"></path></svg>"

/***/ }),
/* 352 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Clear\"><title>Clear</title><g class=\"coveo-exclusion-svg\" fill=\"none\"><path d=\"m9.233 7.989-2.489-2.489 2.489-2.489c.356-.356.356-.889 0-1.244-.356-.356-.889-.356-1.244 0l-2.489 2.489-2.489-2.489c-.356-.356-.889-.356-1.244 0-.356.356-.356.889 0 1.244l2.489 2.489-2.489 2.489c-.356.356-.356.889 0 1.244.356.356.889.356 1.244 0l2.489-2.489 2.489 2.489c.356.356.889.356 1.244 0 .356-.355.356-.889 0-1.244z\"></path></g></svg>"

/***/ }),
/* 353 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Close\"><title>Close</title><g class=\"coveo-exclusion-svg\" fill=\"none\"><path d=\"m9.233 7.989-2.489-2.489 2.489-2.489c.356-.356.356-.889 0-1.244-.356-.356-.889-.356-1.244 0l-2.489 2.489-2.489-2.489c-.356-.356-.889-.356-1.244 0-.356.356-.356.889 0 1.244l2.489 2.489-2.489 2.489c-.356.356-.356.889 0 1.244.356.356.889.356 1.244 0l2.489-2.489 2.489 2.489c.356.356.889.356 1.244 0 .356-.355.356-.889 0-1.244z\"></path></g></svg>"

/***/ }),
/* 354 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Delete\"><title>Delete</title><g class=\"coveo-exclusion-svg\" fill=\"none\"><path d=\"m9.233 7.989-2.489-2.489 2.489-2.489c.356-.356.356-.889 0-1.244-.356-.356-.889-.356-1.244 0l-2.489 2.489-2.489-2.489c-.356-.356-.889-.356-1.244 0-.356.356-.356.889 0 1.244l2.489 2.489-2.489 2.489c-.356.356-.356.889 0 1.244.356.356.889.356 1.244 0l2.489-2.489 2.489 2.489c.356.356.889.356 1.244 0 .356-.355.356-.889 0-1.244z\"></path></g></svg>"

/***/ }),
/* 355 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 11\" viewBox=\"0 0 11 11\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Save\"><title>Save</title><g class=\"coveo-hook-svg\" fill=\"none\"><path d=\"m10.252 2.213c-.155-.142-.354-.211-.573-.213-.215.005-.414.091-.561.24l-4.873 4.932-2.39-2.19c-.154-.144-.385-.214-.57-.214-.214.004-.415.09-.563.24-.148.147-.227.343-.222.549.005.207.093.4.249.542l2.905 2.662c.168.154.388.239.618.239h.022.003c.237-.007.457-.101.618-.266l5.362-5.428c.148-.148.228-.344.223-.551s-.093-.399-.248-.542z\"></path></g></svg>"

/***/ }),
/* 356 */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 96 96\" xmlns=\"http://www.w3.org/2000/svg\"><g><path d=\"m48 .5c-26.2 0-47.5 21.3-47.5 47.5s21.3 47.5 47.5 47.5 47.5-21.3 47.5-47.5-21.3-47.5-47.5-47.5zm0 86.6c-21.6 0-39.1-17.5-39.1-39.1s17.5-39.1 39.1-39.1 39.1 17.5 39.1 39.1-17.5 39.1-39.1 39.1z\"></path><path d=\"m42.1 51.6-11.3-11.4-10 9.9 21.3 21.3 33.4-33.4-9.9-9.9z\"></path></g></svg>"

/***/ }),
/* 357 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 18 18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Or/And Operator\"><title>Or/And Operator</title><g fill=\"currentColor\"><path class=\"coveo-and-svg\" d=\"m13.769 5.294h-1.063v-1.063c0-2.329-1.894-4.231-4.231-4.231h-4.244c-2.329 0-4.231 1.894-4.231 4.231v4.244c0 2.329 1.894 4.231 4.231 4.231h1.063v1.063c0 2.329 1.894 4.231 4.231 4.231h4.244c2.329 0 4.231-1.894 4.231-4.231v-4.244c0-2.329-1.894-4.231-4.231-4.231zm2.731 8.475c0 1.506-1.225 2.731-2.731 2.731h-4.244c-1.506 0-2.731-1.225-2.731-2.731v-2.563h-2.563c-1.506 0-2.731-1.225-2.731-2.731v-4.244c0-1.506 1.225-2.731 2.731-2.731h4.244c1.506 0 2.731 1.225 2.731 2.731v2.563h2.563c1.506 0 2.731 1.225 2.731 2.731z\"></path><path class=\"coveo-or-svg\" d=\"m11.206 6.794v1.909c0 1.38-1.123 2.503-2.503 2.503h-1.909v-1.909c0-1.38 1.123-2.503 2.503-2.503zm1.5-1.5h-3.409c-2.209 0-4.003 1.792-4.003 4.003v3.409h3.409c2.209 0 4.003-1.792 4.003-4.003z\"></path></g></svg>"

/***/ }),
/* 358 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 15 14\" viewBox=\"0 0 15 14\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Sort\"><title>Sort</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m13.002 4.076 0 0c0 .536-.439.975-.975.975h-2.925c-.536 0-.975-.439-.975-.975l0 0c0-.536.439-.975.975-.975h2.925c.537 0 .975.438.975.975z\"></path><path class=\"coveo-active-shape-svg\" d=\"m13.002 9.925 0 0c0 .536-.439.975-.975.975h-2.925c-.536 0-.975-.439-.975-.975l0 0c0-.536.439-.975.975-.975h2.925c.537 0 .975.439.975.975z\"></path><path class=\"coveo-active-shape-svg\" d=\"m15 7 0 0c0 .536-.439.975-.975.975h-4.923c-.536 0-.974-.438-.974-.975l0 0c0-.536.439-.975.975-.975h4.923c.535.001.974.439.974.975z\"></path><path d=\"m4.956 9.837-.671.671v-7.015l.671.671c.381.381.997.381 1.379 0 .381-.38.381-.997 0-1.379l-2.335-2.336c-.183-.184-.431-.286-.69-.286s-.506.102-.689.286l-2.335 2.336c-.381.381-.381.997 0 1.379s.997.381 1.379 0l .671-.671v7.015l-.671-.671c-.381-.381-.997-.381-1.379 0-.381.38-.381.997 0 1.379l2.335 2.336c.182.183.431.286.689.286s.506-.103.69-.287l2.335-2.336c.381-.381.381-.997 0-1.379-.382-.381-.998-.381-1.379.001z\"></path></g></svg>"

/***/ }),
/* 359 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 15 12\" viewBox=\"0 0 15 12\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Ascending\"><title>Ascending</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m10.936 2.021 0 0c0 .549-.452.998-1.004.998h-1.004c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h1.004c.552 0 1.004.449 1.004.998z\"></path><path class=\"coveo-active-shape-svg\" d=\"m12.943 5.015 0 0c0 .549-.452.998-1.004.998h-3.011c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h3.011c.553 0 1.004.449 1.004.998z\"></path><path class=\"coveo-active-shape-svg\" d=\"m15 8.008 0 0c0 .549-.452.998-1.004.998h-5.068c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h5.068c.552 0 1.004.449 1.004.998z\"></path><path d=\"m6.521 2.683-2.403-2.391c-.188-.187-.444-.292-.71-.292s-.521.105-.71.292l-2.404 2.391c-.392.39-.392 1.021 0 1.411s1.027.39 1.419 0l .691-.687v7.594c0 .55.452.999 1.004.999s1.004-.449 1.004-.998v-7.594l.691.687c.392.39 1.027.39 1.419 0s .392-1.021-.001-1.412z\"></path></g></svg>"

/***/ }),
/* 360 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 15 12\" viewBox=\"0 0 15 12\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Descending\"><title>Descending</title><g fill=\"currentColor\"><path d=\"m6.521 7.906c-.392-.39-1.027-.39-1.419 0l-.69.686v-7.594c0-.549-.452-.998-1.004-.998s-1.004.449-1.004.998v7.594l-.69-.686c-.392-.39-1.027-.39-1.419 0-.392.39-.392 1.021 0 1.411l2.404 2.391c.188.187.443.292.709.292s.522-.105.71-.292l2.404-2.391c.392-.391.392-1.022-.001-1.411z\"></path><path class=\"coveo-active-shape-svg\" d=\"m9.932 11.001h-1.004c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h1.004c.552 0 1.004.449 1.004.998l0 0c0 .549-.452.998-1.004.998z\"></path><path class=\"coveo-active-shape-svg\" d=\"m11.94 8.007h-3.012c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h3.011c.552 0 1.004.449 1.004.998l0 0c0 .549-.451.998-1.003.998z\"></path><path class=\"coveo-active-shape-svg\" d=\"m13.996 5.014h-5.068c-.552 0-1.004-.449-1.004-.998l0 0c0-.549.452-.998 1.004-.998h5.068c.552 0 1.004.449 1.004.998l0 0c0 .548-.452.998-1.004.998z\"></path></g></svg>"

/***/ }),
/* 361 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown More\"><title>Dropdown More</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m14 2v12h-12v-12zm1.306-2h-14.607c-.386 0-.699.318-.699.694v14.607c0 .384.315.699.699.699h14.602c.385 0 .699-.316.699-.694v-14.612c0-.383-.311-.694-.694-.694z\"></path><path d=\"m10.969 7.055h-1.97v-1.968c0-.571-.448-1.032-1-1.032s-1 .462-1 1.032v1.969h-1.969c-.57 0-1.032.448-1.032 1s .463 1 1.032 1h1.97v1.969c0 .57.448 1.032 1 1.032s1-.463 1-1.032v-1.97h1.969c.571 0 1.032-.448 1.032-1 .001-.552-.462-1-1.032-1z\"></path></g></svg>"

/***/ }),
/* 362 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Less\"><title>Dropdown Less</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m14 2v12h-11.999v-12zm1.306-2h-14.607c-.386 0-.699.318-.699.694v14.607c0 .384.315.699.699.699h14.602c.385 0 .699-.316.699-.694v-14.612c0-.383-.311-.694-.694-.694z\"></path><path d=\"m10.969 9.055h-5.939c-.569 0-1.032-.448-1.032-1s .462-1 1.032-1h5.938c.57 0 1.032.448 1.032 1 .001.552-.46 1-1.031 1\"></path></g></svg>"

/***/ }),
/* 363 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Collapse\"><title>Collapse</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m8.01 0c-4.425 0-8.01 3.581-8.01 7.992 0 4.425 3.581 8.01 7.999 8.01l.003-.003c4.417 0 7.999-3.581 7.999-7.999 0-4.417-3.581-7.999-7.992-7.999m.002 1.5c3.58 0 6.493 2.916 6.493 6.5s-2.916 6.5-6.5 6.5h-.172c-3.506-.09-6.331-2.975-6.331-6.508 0-3.58 2.92-6.493 6.51-6.492\"></path><path d=\"m11.04 10.27c-.192 0-.384-.073-.53-.22l-2.51-2.51-2.51 2.51c-.293.293-.768.293-1.061 0s-.293-.768 0-1.061l3.041-3.04c.141-.14.332-.219.53-.219l0 0c .199 0 .39.079.53.22l3.04 3.041c.293.293.293.768 0 1.061-.146.145-.337.218-.53.218z\"></path></g></svg>"

/***/ }),
/* 364 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Expand\"><title>Expand</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m7.991 16.002c4.425 0 8.01-3.581 8.01-7.992 0-4.425-3.581-8.01-7.999-8.01l-.003.003c-4.417 0-7.999 3.581-7.999 7.999 0 4.417 3.581 7.999 7.992 7.999m-.002-1.5c-3.58 0-6.493-2.916-6.493-6.5s2.916-6.5 6.5-6.5h.172c3.506.09 6.331 2.975 6.331 6.508 0 3.58-2.92 6.493-6.51 6.493\"></path><path d=\"m4.961 5.732c.192 0 .384.073.53.22l2.51 2.51 2.51-2.51c.293-.293.768-.293 1.061 0s .293.768 0 1.061l-3.041 3.04c-.141.14-.332.219-.53.219l0 0c-.199 0-.39-.079-.53-.22l-3.04-3.041c-.293-.293-.293-.768 0-1.061.146-.145.337-.218.53-.218z\"></path></g></svg>"

/***/ }),
/* 365 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" viewBox=\"0 0 18 14\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Share Query\"><title>Dropdown Share Query</title><g fill=\"currentColor\" fill-rule=\"evenodd\"><path class=\"coveo-active-shape-svg\" d=\"m12.1 13.5c-.426 0-.771-.332-.771-.74 0-.409.346-.74.771-.74h1.862c1.374 0 2.49-1.136 2.49-2.534v-.193c0-1.144-.756-2.15-1.839-2.448l-.488-.134-.066-.484c-.132-.979-1.11-1.673-2.041-1.458l-.635.143-.253-.578c-.626-1.429-2.024-2.352-3.562-2.352-2.147 0-3.892 1.769-3.892 3.944 0 .082.002.164.007.246l.032.541-.529.192c-.986.359-1.65 1.319-1.65 2.388v.192c0 1.398 1.117 2.535 2.49 2.535h.782c.426 0 .771.332.771.74 0 .409-.346.74-.771.74h-.782c-2.224 0-4.03-1.802-4.03-4.02v-.192c0-1.496.842-2.861 2.143-3.549.097-2.908 2.496-5.243 5.432-5.243 1.968 0 3.767 1.061 4.726 2.747 1.501-.024 2.798.945 3.198 2.327 1.495.61 2.501 2.077 2.501 3.717v.193c0 2.215-1.808 4.02-4.03 4.02h-1.863\"></path><path d=\"m9 5.234c-.098-.149-.3-.233-.511-.234-.212 0-.413.084-.561.232l-3.193 3.176c-.311.309-.312.812-.003 1.123.155.156.359.233.563.233.202 0 .406-.076.56-.231l1.822-1.813v5.485c0 .438.356.794.794.794.438 0 .794-.356.794-.794v-5.504l1.82 1.83c.309.311.812.312 1.122.002.31-.309.312-.812.002-1.123l-3.21-3.176\"></path></g></svg>"

/***/ }),
/* 366 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 22 22\" viewBox=\"0 0 22 22\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Preferences\"><title>Dropdown Preferences</title><g fill=\"currentColor\"><path class=\"coveo-active-shape-svg\" d=\"m12.989 21.947h-3.978c-.752 0-1.388-.557-1.48-1.295l-.298-2.075c-.309-.154-.611-.33-.905-.526l-1.968.79c-.722.268-1.508-.028-1.858-.668l-1.977-3.419c-.366-.671-.207-1.47.365-1.922l1.669-1.306c-.013-.186-.019-.359-.019-.526s.006-.34.02-.526l-1.665-1.303c-.586-.462-.742-1.292-.365-1.932l1.985-3.434c.343-.633 1.136-.923 1.836-.65l1.98.796c.3-.2.6-.375.901-.527l.301-2.096c.089-.719.726-1.275 1.478-1.275h3.979c.753 0 1.39.557 1.479 1.296l.298 2.074c.31.154.611.33.905.526l1.968-.791c.721-.263 1.508.028 1.857.667l1.979 3.421c.365.671.207 1.47-.365 1.922l-1.669 1.305c.012.166.02.342.02.527s-.008.361-.02.526l1.665 1.302c.576.457.734 1.256.381 1.903l-2 3.463c-.35.636-1.146.922-1.84.649l-1.978-.794c-.301.199-.6.374-.902.526l-.3 2.095c-.088.72-.725 1.277-1.478 1.277m-3.539-2h3.1l.396-2.762.529-.217c.485-.2.964-.478 1.461-.851l.45-.337 2.585 1.038 1.554-2.688-2.198-1.718.071-.563c.035-.277.062-.555.062-.85s-.027-.572-.062-.85l-.071-.563 2.198-1.718-1.555-2.688-2.592 1.042-.452-.348c-.466-.358-.94-.633-1.451-.843l-.529-.217-.396-2.761h-3.1l-.396 2.762-.53.217c-.485.199-.962.477-1.46.85l-.451.337-2.584-1.038-1.554 2.688 2.196 1.718-.07.562c-.034.277-.061.564-.061.851s.027.573.062.852l.07.562-2.196 1.718 1.554 2.688 2.591-1.041.452.348c.465.356.939.632 1.452.843l.529.217z\"></path><path d=\"m11 15c-2.206 0-4-1.794-4-4s1.794-4 4-4 4 1.794 4 4-1.794 4-4 4m0-6c-1.103 0-2 .897-2 2s .897 2 2 2 2-.897 2-2-.897-2-2-2\"></path></g></svg>"

/***/ }),
/* 367 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 12 16\" viewBox=\"0 0 12 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Authenticate\"><title>Dropdown Authenticate</title><g class=\"coveo-dropdown-authenticate-svg\" fill=\"none\"><path d=\"m10 5h-8c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2m0 1.5c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5h-8c-.3 0-.5-.2-.5-.5v-5c0-.3.2-.5.5-.5z\"></path><path d=\"m10 5h-1.6v-1.1c0-1.3-1.1-2.4-2.4-2.4s-2.4 1.1-2.4 2.4v1.1h-1.6v-1.1c0-2.1 1.8-3.9 4-3.9s4 1.8 4 3.9z\"></path></g><g class=\"coveo-dropdown-authenticate-hover-svg\" fill=\"none\"><path class=\"coveo-active-shape-svg\" d=\"m10 7h-8c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2m0 1.5c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5h-8c-.3 0-.5-.2-.5-.5v-5c0-.3.2-.5.5-.5z\"></path><path d=\"m5.1.1c-1.8.4-3.1 2.1-3.1 4v2.9h1.6v-3.1c0-1.7 1.8-3 3.6-2.1.8.4 1.2 1.3 1.2 2.2v.6c0 .4.4.8.8.8s.8-.4.8-.8v-.7c0-2.4-2.3-4.4-4.9-3.8z\"></path></g></svg>"

/***/ }),
/* 368 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 14 14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Export\"><title>Dropdown Export</title><g fill=\"currentColor\" transform=\"matrix(0 1 -1 0 20 0)\"><path d=\"m7.699 8.591 1.05 1.05c.49.49 1.05 0 1.05 0s .49-.56 0-1.05l-2.31-2.381c-.28-.28-.7-.28-.98 0l-2.309 2.451c-.49.49 0 .98 0 .98s.56.49 1.05 0l1.05-1.05v7.91c0 .42.35.7.7.7s.7-.35.7-.7z\"></path><path class=\"coveo-active-shape-svg\" d=\"m10.5 12.301h2.033l.065 6.301h-11.198v-6.301h2.1c.386 0 .7-.314.7-.7l0 0c0-.386-.314-.7-.7-.7h-2.806c-.383-.001-.694.31-.694.694v7.706c0 .385.318.699.694.699h12.607c.384 0 .699-.315.699-.699v-7.7c0-.386-.316-.699-.694-.699h-2.806c-.386 0-.7.314-.7.7l0 0c0 .385.314.699.7.699z\"></path></g></svg>"

/***/ }),
/* 369 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 15 12\" viewBox=\"0 0 15 12\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Dropdown Follow Query\"><title>Dropdown Follow Query</title><g fill=\"currentColor\"><path d=\"m9.224 11.999c-.198 0-.496-.103-.694-.308-.397-.411-.397-1.025 0-1.436l3.965-4.409-3.966-4.102c-.397-.411-.397-1.025 0-1.436s.991-.411 1.388 0l4.859 4.922c.298.308.298.718 0 1.025l-4.859 5.435c-.198.206-.496.309-.693.309\"></path><path class=\"coveo-active-shape-svg\" d=\"m4.958.411c-.397-.411-.991-.411-1.388 0s-.397 1.025 0 1.436l2.973 2.974h-5.552c-.594 0-.991.41-.991 1.025s.397 1.025.991 1.025h5.651l-3.074 3.384c-.397.411-.397 1.025 0 1.436.199.206.398.309.695.309.298 0 .495-.103.694-.308l4.859-5.333c.298-.308.298-.718 0-1.025z\"></path></g></svg>"

/***/ }),
/* 370 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 20 12\" viewBox=\"0 0 20 12\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Quickview\"><title>Quickview</title><g fill=\"currentColor\"><path d=\"m10 4.3c-1 0-1.7.8-1.7 1.7 0 1 .8 1.7 1.7 1.7 1 0 1.7-.8 1.7-1.7 0-1-.7-1.7-1.7-1.7m0 4.7c-1.6 0-3-1.4-3-3s1.4-3 3-3 3 1.4 3 3-1.4 3-3 3\"></path><path d=\"m19.8 6.4v-.001c.069-.117.109-.253.109-.399s-.04-.282-.109-.399v-.001c-.005-.008.005.007 0 0-2.203-3.473-5.917-5.6-9.8-5.6-3.884 0-7.655 2.091-9.8 5.602l0 0c-.069.117-.109.253-.109.398s.04.281.109.398c0 0-.001-.002 0 0 2.203 3.475 5.916 5.602 9.8 5.602 3.883 0 7.597-2.127 9.8-5.6.005-.007-.005.008 0 0zm-9.8 4.1c-3.236 0-6.28-1.635-8.189-4.339-.067-.095-.067-.228-.002-.324 1.908-2.797 4.953-4.337 8.191-4.337 3.235 0 6.278 1.634 8.187 4.337.068.096.068.231 0 .327-1.909 2.702-4.952 4.336-8.187 4.336z\"></path></g></svg>"

/***/ }),
/* 371 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 20\" viewBox=\"0 0 11 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Right Arrow\"><title>Right Arrow</title><g fill=\"currentColor\"><path d=\"m .308 18.189c-.412.413-.411 1.086 0 1.5.2.201.465.311.746.311.282 0 .547-.11.747-.31l8.891-8.939c.199-.2.307-.466.307-.75 0-.286-.109-.551-.305-.748l-8.893-8.942c-.199-.2-.465-.311-.747-.311-.001 0-.001 0-.001 0-.281 0-.546.11-.745.309-.198.201-.308.468-.308.753 0 .284.11.548.306.745l8.145 8.193z\"></path></g></svg>"

/***/ }),
/* 372 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 11 20\" viewBox=\"0 0 11 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Left Arrow\"><title>Left Arrow</title><g fill=\"currentColor\"><path d=\"m10.692 1.811c.412-.413.411-1.086 0-1.5-.2-.201-.465-.311-.746-.311-.283 0-.548.11-.747.31l-8.892 8.939c-.198.2-.307.466-.307.75 0 .286.109.551.305.748l8.893 8.941c.2.201.466.312.748.312h.001c.281 0 .546-.11.745-.309.199-.201.308-.468.308-.753 0-.284-.109-.548-.306-.745l-8.146-8.194z\"></path></g></svg>"

/***/ }),
/* 373 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Replies\"><title>Replies</title><g fill=\"currentColor\" fill-rule=\"evenodd\" transform=\"translate(1)\"><path d=\"m4 5h7v1h-7v-1m0 3h7v1h-7v-1m0 3h7v1h-7v-1\"></path><path d=\"m15 1c.009-.525.066-1-1-1h-12.998c-.651 0-1 .33-1 1v15c0 .66.351 1 1 1h1.998v2c.075.546.383 1 1 1h13c.718 0 1-.295 1-1v-16c.001-.468-.406-.99-1-1h-2v-1m-13 14v-13h11v13h-11m14 3h-11v-.995l9-.005c.5.005.976-.428 1-1l.021-12h.979v14\"></path></g></svg>"

/***/ }),
/* 374 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 60 60\" viewBox=\"0 0 60 60\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Video\"><title>Video</title><path clip-rule=\"evenodd\" d=\"m3.753 60c-2.073 0-3.753-1.667-3.753-3.753v-52.494c0-2.073 1.667-3.753 3.753-3.753h52.494c2.073 0 3.753 1.667 3.753 3.753v52.493c0 2.074-1.667 3.754-3.753 3.754z\" fill=\"#cc0d00\" fill-rule=\"evenodd\"></path><path d=\"m42.8 21.536h-8.96c-.267-.64-.64-1.173-1.12-1.653l3.36-4.32c.533-.693.427-1.707-.267-2.24-.693-.533-1.707-.427-2.24.267l-3.733 4.8c-.32 0-.587-.053-.907-.053s-.587.053-.853.053l-3.733-4.8c-.533-.693-1.547-.8-2.24-.267s-.8 1.547-.267 2.24l3.36 4.32c-.48.48-.853 1.013-1.12 1.653h-6.88c-1.76 0-3.2 1.44-3.2 3.2v14.933c0 1.76 1.44 3.2 3.2 3.2h25.6c1.76 0 3.2-1.44 3.2-3.2v-14.933c0-1.76-1.44-3.2-3.2-3.2zm-4.267 17.067c0 .587-.48 1.067-1.067 1.067h-19.2c-.587 0-1.067-.48-1.067-1.067v-12.8c0-.587.48-1.067 1.067-1.067h19.2c.587 0 1.067.48 1.067 1.067zm3.734-5.334c-.907 0-1.6-.693-1.6-1.6s.693-1.6 1.6-1.6 1.6.693 1.6 1.6-.694 1.6-1.6 1.6zm0-5.333c-.907 0-1.6-.693-1.6-1.6s.693-1.6 1.6-1.6 1.6.693 1.6 1.6-.694 1.6-1.6 1.6z\" fill=\"#fff\"></path></svg>"

/***/ }),
/* 375 */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" id=\"prefix__Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0\" y=\"0\" viewBox=\"0 0 409.4 103.6\" xml:space=\"preserve\" aria-label=\"Coveo Logo\"><style>.prefix__st0{fill:#333357}</style><path class=\"prefix__st0\" d=\"M164.6 36.2l-4.9 5.2c-3.3-3.3-7-5.2-11.9-5.2-8.5 0-14.9 6.7-14.9 16.1s6.4 16.1 14.9 16.1c4.9 0 9.1-2.1 12.2-5.2l4.6 5.2c-4 4.6-9.7 7-16.4 7-14 0-23.1-10-23.1-23.1 0-13.4 9.1-23.4 23.1-23.4 6.6 0 12.4 2.7 16.4 7.3zM219.3 52.3c0 13.1-10 23.1-23.4 23.1-13.7 0-23.7-10-23.7-23.1 0-13.4 10-23.4 23.7-23.4 13.3 0 23.4 10 23.4 23.4zm-39.2 0c0 9.4 6.7 16.1 15.8 16.1 8.8 0 15.5-6.7 15.5-16.1s-6.7-16.1-15.5-16.1c-9.2 0-15.8 6.7-15.8 16.1zM252.1 74.5H243l-18.9-44.4h8.5l14.9 36.8 14.9-36.8h8.2l-18.5 44.4zM318.6 52v3h-35c.9 9.1 7.3 13.7 14.9 13.7 5.5 0 10-1.8 14-5.2l4 5.2c-5.5 5.2-11.5 6.7-18.2 6.7-13.4 0-22.8-9.1-22.8-23.1 0-13.7 9.4-23.4 22.2-23.4 12.1 0 20.9 9.7 20.9 23.1zm-34.9-3.4h27.4c-.9-7.6-6.1-12.8-13.4-12.8-7.9.1-12.8 5.2-14 12.8zM375.8 52.3c0 13.1-10 23.1-23.4 23.1-13.7 0-23.7-10-23.7-23.1 0-13.4 10-23.4 23.7-23.4 13.4 0 23.4 10 23.4 23.4zm-39.2 0c0 9.4 6.7 16.1 15.8 16.1 8.8 0 15.5-6.7 15.5-16.1s-6.7-16.1-15.5-16.1c-9.1 0-15.8 6.7-15.8 16.1z\"></path><g><path class=\"prefix__st0\" d=\"M394 30.2h-9v1.7h3.6V43h1.9V31.9h3.5v-1.7M409.4 30.2h-2l-3.7 8-3.7-8h-2V43h2v-8.6l3 6.3h1.5l2.9-6.3V43h2V30.2\"></path></g><g><path d=\"M88.1 15C79.2 6.1 67.9 1.1 56.2 0 54.8-.1 54 1.6 55 2.6l18.7 18.7c.1.1 0 .3-.2.2-5.3-3.9-11.5-6.1-17.8-6.7-1-.1-1.5 1.1-.8 1.8l12.7 12.7c.1.1 0 .3-.2.2-3.5-2.4-7.5-3.8-11.6-4.2-.7-.1-1.1.8-.6 1.2l21.6 21.6c.5.5 1.3.1 1.2-.6-.4-4.1-1.8-8-4.2-11.5-.1-.1.1-.3.2-.2L86.2 48c.7.7 1.9.1 1.8-.8-.6-6.3-2.8-12.4-6.7-17.8-.1-.1.1-.3.2-.2L100.4 48c1 1 2.7.2 2.6-1.2-1-11.6-6-22.9-14.9-31.8\" fill=\"#00adff\"></path><path d=\"M15 15C23.9 6.1 35.2 1.1 46.8 0 48.2-.1 49 1.6 48 2.6L29.4 21.3c-.1.1 0 .3.2.2 5.3-3.9 11.5-6.1 17.8-6.7 1-.1 1.5 1.1.8 1.8L35.4 29.3c-.1.1 0 .3.2.2 3.5-2.4 7.5-3.8 11.6-4.2.7-.1 1.1.8.6 1.2L26.1 48.2c-.5.5-1.3.1-1.2-.6.4-4.1 1.8-8 4.2-11.5.1-.1-.1-.3-.2-.2L16.6 48.1c-.7.7-1.9.1-1.8-.8.6-6.3 2.8-12.4 6.7-17.8.1-.1-.1-.3-.2-.2L2.6 48c-1 1-2.7.2-2.6-1.2C1.1 35.2 6.1 23.9 15 15\" fill=\"#f05245\"></path><path d=\"M15 88.7c8.9 8.9 20.2 13.9 31.9 15 1.4.1 2.2-1.6 1.2-2.6L29.4 82.4c-.1-.1 0-.3.2-.2 5.3 3.9 11.5 6.1 17.8 6.7 1 .1 1.5-1.1.8-1.8L35.4 74.3c-.1-.1 0-.3.2-.2 3.5 2.4 7.5 3.8 11.6 4.2.7.1 1.1-.8.6-1.2L26.1 55.4c-.5-.5-1.3-.1-1.2.6.4 4.1 1.8 8 4.2 11.5.1.1-.1.3-.2.2L16.6 55.5c-.7-.7-1.9-.1-1.8.8.6 6.3 2.8 12.4 6.7 17.8.1.1-.1.3-.2.2L2.6 55.6c-1-1-2.7-.2-2.6 1.2 1.1 11.7 6.1 23 15 31.9\" fill=\"#1cebcf\"></path><path d=\"M88.1 88.7c-8.9 8.9-20.2 13.9-31.9 15-1.4.1-2.2-1.6-1.2-2.6l18.7-18.7c.1-.1 0-.3-.2-.2-5.3 3.8-11.5 6.1-17.8 6.6-1 .1-1.5-1.1-.8-1.8l12.7-12.7c.1-.1 0-.3-.2-.2-3.5 2.4-7.5 3.8-11.6 4.2-.7.1-1.1-.8-.6-1.2l21.6-21.6c.5-.5 1.3-.1 1.2.6-.4 4.1-1.8 8-4.2 11.5-.1.1.1.3.2.2l12.2-12.2c.7-.7 1.9-.1 1.8.8-.6 6.3-2.8 12.4-6.7 17.8-.1.1.1.3.2.2l18.7-18.7c1-1 2.7-.2 2.6 1.2-.8 11.6-5.8 22.9-14.7 31.8\" fill=\"#ffe300\"></path></g></svg>"

/***/ }),
/* 376 */
/***/ (function(module, exports) {

module.exports = "<svg version=\"1.1\" id=\"prefix__Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0\" y=\"0\" viewBox=\"0 0 409.4 103.6\" xml:space=\"preserve\" aria-label=\"Powered By Coveo Logo\"><style>.prefix__st0{fill:#282829}</style><path class=\"prefix__st0\" d=\"M164.6 36.2l-4.9 5.2c-3.3-3.3-7-5.2-11.9-5.2-8.5 0-14.9 6.7-14.9 16.1s6.4 16.1 14.9 16.1c4.9 0 9.1-2.1 12.2-5.2l4.6 5.2c-4 4.6-9.7 7-16.4 7-14 0-23.1-10-23.1-23.1 0-13.4 9.1-23.4 23.1-23.4 6.6 0 12.4 2.7 16.4 7.3zM219.3 52.3c0 13.1-10 23.1-23.4 23.1-13.7 0-23.7-10-23.7-23.1 0-13.4 10-23.4 23.7-23.4 13.3 0 23.4 10 23.4 23.4zm-39.2 0c0 9.4 6.7 16.1 15.8 16.1 8.8 0 15.5-6.7 15.5-16.1s-6.7-16.1-15.5-16.1c-9.2 0-15.8 6.7-15.8 16.1zM252.1 74.5H243l-18.9-44.4h8.5l14.9 36.8 14.9-36.8h8.2zM318.6 52v3h-35c.9 9.1 7.3 13.7 14.9 13.7 5.5 0 10-1.8 14-5.2l4 5.2c-5.5 5.2-11.5 6.7-18.2 6.7-13.4 0-22.8-9.1-22.8-23.1 0-13.7 9.4-23.4 22.2-23.4 12.1 0 20.9 9.7 20.9 23.1zm-34.9-3.4h27.4c-.9-7.6-6.1-12.8-13.4-12.8-7.9.1-12.8 5.2-14 12.8zM375.8 52.3c0 13.1-10 23.1-23.4 23.1-13.7 0-23.7-10-23.7-23.1 0-13.4 10-23.4 23.7-23.4 13.4 0 23.4 10 23.4 23.4zm-39.2 0c0 9.4 6.7 16.1 15.8 16.1 8.8 0 15.5-6.7 15.5-16.1s-6.7-16.1-15.5-16.1c-9.1 0-15.8 6.7-15.8 16.1z\"></path><g><path class=\"prefix__st0\" d=\"M394 30.2h-9v1.7h3.6V43h1.9V31.9h3.5v-1.7M409.4 30.2h-2l-3.7 8-3.7-8h-2V43h2v-8.6l3 6.3h1.5l2.9-6.3V43h2V30.2\"></path></g><g><path class=\"prefix__st0\" d=\"M88.1 15C79.2 6.1 67.9 1.1 56.2 0 54.8-.1 54 1.6 55 2.6l18.7 18.7c.1.1 0 .3-.2.2-5.3-3.9-11.5-6.1-17.8-6.7-1-.1-1.5 1.1-.8 1.8l12.7 12.7c.1.1 0 .3-.2.2-3.5-2.4-7.5-3.8-11.6-4.2-.7-.1-1.1.8-.6 1.2l21.6 21.6c.5.5 1.3.1 1.2-.6-.4-4.1-1.8-8-4.2-11.5-.1-.1.1-.3.2-.2L86.2 48c.7.7 1.9.1 1.8-.8-.6-6.3-2.8-12.4-6.7-17.8-.1-.1.1-.3.2-.2L100.4 48c1 1 2.7.2 2.6-1.2-1-11.6-6-22.9-14.9-31.8M15 15C23.9 6.1 35.2 1.1 46.8 0 48.2-.1 49 1.6 48 2.6L29.4 21.3c-.1.1 0 .3.2.2 5.3-3.9 11.5-6.1 17.8-6.7 1-.1 1.5 1.1.8 1.8L35.4 29.3c-.1.1 0 .3.2.2 3.5-2.4 7.5-3.8 11.6-4.2.7-.1 1.1.8.6 1.2L26.1 48.2c-.5.5-1.3.1-1.2-.6.4-4.1 1.8-8 4.2-11.5.1-.1-.1-.3-.2-.2L16.6 48.1c-.7.7-1.9.1-1.8-.8.6-6.3 2.8-12.4 6.7-17.8.1-.1-.1-.3-.2-.2L2.6 48c-1 1-2.7.2-2.6-1.2C1.1 35.2 6.1 23.9 15 15M15 88.7c8.9 8.9 20.2 13.9 31.9 15 1.4.1 2.2-1.6 1.2-2.6L29.4 82.4c-.1-.1 0-.3.2-.2 5.3 3.9 11.5 6.1 17.8 6.7 1 .1 1.5-1.1.8-1.8L35.4 74.3c-.1-.1 0-.3.2-.2 3.5 2.4 7.5 3.8 11.6 4.2.7.1 1.1-.8.6-1.2L26.1 55.4c-.5-.5-1.3-.1-1.2.6.4 4.1 1.8 8 4.2 11.5.1.1-.1.3-.2.2L16.6 55.5c-.7-.7-1.9-.1-1.8.8.6 6.3 2.8 12.4 6.7 17.8.1.1-.1.3-.2.2L2.6 55.6c-1-1-2.7-.2-2.6 1.2 1.1 11.7 6.1 23 15 31.9M88.1 88.7c-8.9 8.9-20.2 13.9-31.9 15-1.4.1-2.2-1.6-1.2-2.6l18.7-18.7c.1-.1 0-.3-.2-.2-5.3 3.8-11.5 6.1-17.8 6.6-1 .1-1.5-1.1-.8-1.8l12.7-12.7c.1-.1 0-.3-.2-.2-3.5 2.4-7.5 3.8-11.6 4.2-.7.1-1.1-.8-.6-1.2l21.6-21.6c.5-.5 1.3-.1 1.2.6-.4 4.1-1.8 8-4.2 11.5-.1.1.1.3.2.2l12.2-12.2c.7-.7 1.9-.1 1.8.8-.6 6.3-2.8 12.4-6.7 17.8-.1.1.1.3.2.2l18.7-18.7c1-1 2.7-.2 2.6 1.2-.8 11.6-5.8 22.9-14.7 31.8\"></path></g></svg>"

/***/ }),
/* 377 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 9 7\" viewBox=\"0 0 9 7\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Tagging Ok\"><title>Tagging Ok</title><g fill=\"currentColor\"><path d=\"m8.755.446c-.154-.145-.35-.216-.567-.218-.212.005-.409.093-.555.246l-4.176 4.422-2.117-2.003c-.152-.147-.381-.22-.564-.22-.211.004-.41.092-.556.247-.147.151-.225.352-.22.563.005.213.092.41.246.557l2.627 2.487c.166.158.384.245.611.245h.022.003c.234-.007.452-.103.611-.272l4.66-4.931c.146-.153.225-.354.22-.566-.005-.213-.092-.41-.245-.557z\"></path></g></svg>"

/***/ }),
/* 378 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 20 20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Edit\"><title>Edit</title><g fill=\"currentColor\"><path d=\"m1 4c0-.552.448-1 1-1h7c .552 0 1 .448 1 1v0c0 .552-.448 1-1 1h-6v12h12v-6c0-.552.448-1 1-1h0c .552 0 1 .448 1 1v7c0 .552-.448 1-1 1h-14c-.552 0-1-.448-1-1z\"></path><path d=\"m17.8.8c-.2-.2-.5-.2-.7 0l-1.7 1.7 2 2 1.7-1.7c.2-.2.2-.5 0-.7z\"></path><path d=\"m14.5 3.5-6.9 6.9c-.1.1-.2.2-.2.3l-1.2 2.8c-.1.2.1.4.3.3l2.8-1.2c.1 0 .2-.1.3-.2l6.9-6.9z\"></path></g></svg>"

/***/ }),
/* 379 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 16 16\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Star\"><title>Star</title><g fill=\"currentColor\"><path d=\"m8.683.852 1.558 4.794h5.041c.695 0 .985.889.421 1.298l-4.077 2.963 1.558 4.794c.215.661-.542 1.211-1.104.802l-4.08-2.962-4.077 2.963c-.562.409-1.32-.141-1.104-.802l1.558-4.794-4.079-2.963c-.563-.409-.274-1.298.421-1.298h5.041l1.558-4.794c.214-.662 1.15-.662 1.365-.001z\"></path></g></svg>"

/***/ }),
/* 380 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" enable-background=\"new 0 0 19 14\" viewBox=\"0 0 19 14\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"List Layout\"><title>List Layout</title><g fill=\"currentColor\"><path d=\"m19 12c0 .552-.397 1-.813 1h-11.375c-.416 0-.813-.448-.813-1s .397-1 .813-1h11.375c.416 0 .813.448.813 1\"></path><path d=\"m19 7c0 .552-.397 1-.813 1h-11.375c-.416 0-.813-.448-.813-1s .397-1 .813-1h11.375c.416 0 .813.448.813 1\"></path><path d=\"m19 2c0 .552-.397 1-.813 1h-11.375c-.416 0-.813-.448-.813-1s .397-1 .813-1h11.375c.416 0 .813.448.813 1\"></path><path d=\"m2 10c1.105 0 2 .895 2 2s-.895 2-2 2-2-.895-2-2 .895-2 2-2\"></path><path d=\"m2 5c1.105 0 2 .895 2 2s-.895 2-2 2-2-.895-2-2 .895-2 2-2\"></path><path d=\"m2 0c1.105 0 2 .895 2 2s-.895 2-2 2-2-.895-2-2 .895-2 2-2\"></path></g></svg>"

/***/ }),
/* 381 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Card Layout\"><title>Card Layout</title><g fill=\"currentColor\" fill-rule=\"evenodd\"><rect x=\"12\" y=\"12\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"6\" y=\"12\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect y=\"12\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"12\" y=\"6\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"6\" y=\"6\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect y=\"6\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"12\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect x=\"6\" width=\"4\" height=\"4\" rx=\"1\"></rect><rect width=\"4\" height=\"4\" rx=\"1\"></rect></g></svg>"

/***/ }),
/* 382 */
/***/ (function(module, exports) {

module.exports = "<svg focusable=\"false\" viewBox=\"0 0 18 13\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Table Layout\"><title>Table Layout</title><g fill=\"currentColor\" fill-rule=\"evenodd\"><rect x=\"11\" y=\"10\" width=\"7\" height=\"3\" rx=\"1\"></rect><rect x=\"11\" y=\"5\" width=\"7\" height=\"3\" rx=\"1\"></rect><rect x=\"11\" width=\"7\" height=\"3\" rx=\"1\"></rect><rect y=\"10\" width=\"9\" height=\"3\" rx=\"1\"></rect><rect y=\"5\" width=\"9\" height=\"3\" rx=\"1\"></rect><rect width=\"9\" height=\"3\" rx=\"1\"></rect></g></svg>"

/***/ }),
/* 383 */
/***/ (function(module, exports) {

module.exports = "<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-label=\"Plus\"><title>Plus</title><path d=\"M496 208H304V16h-96v192H16v96h192v192h96V304h192\"></path></svg>"

/***/ }),
/* 384 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var Logger_1 = __webpack_require__(9);
var Utils_1 = __webpack_require__(4);
var IComponentOptions_1 = __webpack_require__(51);
var ComponentOptionLoader = /** @class */ (function () {
    function ComponentOptionLoader(element, values, optionName, optionDefinition) {
        this.element = element;
        this.values = values;
        this.optionName = optionName;
        this.optionDefinition = optionDefinition;
        this.logger = new Logger_1.Logger(this);
    }
    ComponentOptionLoader.prototype.load = function () {
        return this.findFirstValidValue(this.loadFromAttribute.bind(this), this.loadFromOptionsDictionnary.bind(this), this.loadFromDefaultValue.bind(this), this.loadFromDefaultFunction.bind(this));
    };
    ComponentOptionLoader.prototype.loadFromAttribute = function () {
        return this.optionDefinition.load ? this.optionDefinition.load(this.element, this.optionName, this.optionDefinition) : null;
    };
    ComponentOptionLoader.prototype.loadFromOptionsDictionnary = function () {
        return this.values[this.optionName];
    };
    ComponentOptionLoader.prototype.loadFromDefaultValue = function () {
        if (this.optionDefinition.type == IComponentOptions_1.ComponentOptionsType.LOCALIZED_STRING) {
            return this.loadDefaultLocalizedString();
        }
        if (Utils_1.Utils.isNullOrUndefined(this.optionDefinition.defaultValue)) {
            return null;
        }
        switch (this.optionDefinition.type) {
            case IComponentOptions_1.ComponentOptionsType.LIST:
                return this.optionDefinition.defaultValue.slice();
            case IComponentOptions_1.ComponentOptionsType.OBJECT:
                return __assign({}, this.optionDefinition.defaultValue);
            default:
                return this.optionDefinition.defaultValue;
        }
    };
    ComponentOptionLoader.prototype.loadDefaultLocalizedString = function () {
        if (!Utils_1.Utils.isNullOrUndefined(this.optionDefinition.defaultValue)) {
            return this.warnDeprecatedLocalizedStringAndReturnDefaultValue();
        }
        var isLocalizedOptionLoader = this.optionDefinition;
        return isLocalizedOptionLoader.localizedString ? isLocalizedOptionLoader.localizedString() : null;
    };
    ComponentOptionLoader.prototype.loadFromDefaultFunction = function () {
        return this.optionDefinition.defaultFunction ? this.optionDefinition.defaultFunction(this.element) : null;
    };
    ComponentOptionLoader.prototype.warnDeprecatedLocalizedStringAndReturnDefaultValue = function () {
        this.logger.warn("defaultValue for option " + this.optionName + " is deprecated. You should instead use localizedString. Not doing so could cause localization bug in your interface.");
        return this.optionDefinition.defaultValue;
    };
    ComponentOptionLoader.prototype.findFirstValidValue = function () {
        var chain = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            chain[_i] = arguments[_i];
        }
        var resolvedValue = null;
        underscore_1.find(chain, function (fn) {
            resolvedValue = fn();
            return !Utils_1.Utils.isNullOrUndefined(resolvedValue);
        });
        return resolvedValue;
    };
    return ComponentOptionLoader;
}());
exports.ComponentOptionLoader = ComponentOptionLoader;


/***/ }),
/* 385 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var Strings_1 = __webpack_require__(6);
var Utils_1 = __webpack_require__(4);
var IComponentOptions_1 = __webpack_require__(51);
var ComponentOptionsMerger = /** @class */ (function () {
    function ComponentOptionsMerger(optionDefinition, valueToMerge, optionsDictionary) {
        this.optionDefinition = optionDefinition;
        this.valueToMerge = valueToMerge;
        this.optionsDictionary = optionsDictionary;
    }
    ComponentOptionsMerger.prototype.merge = function () {
        var _a = this.valueToMerge, name = _a.name, value = _a.value;
        if (Utils_1.Utils.isNullOrUndefined(value)) {
            return;
        }
        switch (this.optionDefinition.type) {
            case IComponentOptions_1.ComponentOptionsType.OBJECT:
                var currentValue = this.optionsDictionary[name] || {};
                this.optionsDictionary[name] = __assign({}, currentValue, value);
                break;
            case IComponentOptions_1.ComponentOptionsType.LOCALIZED_STRING:
                this.optionsDictionary[name] = Strings_1.l(value);
                break;
            default:
                this.optionsDictionary[name] = value;
        }
        return this.valueToMerge;
    };
    return ComponentOptionsMerger;
}());
exports.ComponentOptionsMerger = ComponentOptionsMerger;


/***/ }),
/* 386 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var Utils_1 = __webpack_require__(4);
var Logger_1 = __webpack_require__(9);
var ComponentOptionsPostProcessor = /** @class */ (function () {
    function ComponentOptionsPostProcessor(allOptionsDefinitions, optionsDictionnary, componentID) {
        this.allOptionsDefinitions = allOptionsDefinitions;
        this.optionsDictionnary = optionsDictionnary;
        this.componentID = componentID;
        this.logger = new Logger_1.Logger(this);
    }
    ComponentOptionsPostProcessor.prototype.postProcess = function () {
        var _this = this;
        underscore_1.each(this.allOptionsDefinitions, function (optionDefinition, name) {
            if (optionDefinition.required && Utils_1.Utils.isNullOrUndefined(_this.optionsDictionnary[name])) {
                _this.logger.warn("Option \"" + name + "\" is *REQUIRED* on the component \"" + _this.componentID + "\". The component or the search page might *NOT WORK PROPERLY*.");
            }
            if (optionDefinition.postProcessing) {
                _this.optionsDictionnary[name] = optionDefinition.postProcessing(_this.optionsDictionnary[name], _this.optionsDictionnary);
            }
        });
    };
    return ComponentOptionsPostProcessor;
}());
exports.ComponentOptionsPostProcessor = ComponentOptionsPostProcessor;


/***/ }),
/* 387 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Logger_1 = __webpack_require__(9);
var ComponentOptionsValidator = /** @class */ (function () {
    function ComponentOptionsValidator(optionDefinition, valueToValidate, optionsDictionnary) {
        this.optionDefinition = optionDefinition;
        this.valueToValidate = valueToValidate;
        this.optionsDictionnary = optionsDictionnary;
        this.logger = new Logger_1.Logger(this);
    }
    ComponentOptionsValidator.prototype.validate = function () {
        var _a = this.valueToValidate, name = _a.name, value = _a.value, componentID = _a.componentID;
        var isValid = this.optionDefinition.validator ? this.optionDefinition.validator(value) : true;
        if (isValid) {
            return;
        }
        this.logger.warn(componentID + " ." + name + " has invalid value: " + value);
        if (this.optionDefinition.required) {
            this.logger.error(componentID + " ." + name + " is required and has an invalid value: " + value + ". ***THIS COMPONENT WILL NOT WORK***");
        }
        delete this.optionsDictionnary[name];
    };
    return ComponentOptionsValidator;
}());
exports.ComponentOptionsValidator = ComponentOptionsValidator;


/***/ }),
/* 388 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var diacriticsToLatinCharacters = {
    Á: 'A',
    Ă: 'A',
    Ắ: 'A',
    Ặ: 'A',
    Ằ: 'A',
    Ẳ: 'A',
    Ẵ: 'A',
    Ǎ: 'A',
    Â: 'A',
    Ấ: 'A',
    Ậ: 'A',
    Ầ: 'A',
    Ẩ: 'A',
    Ẫ: 'A',
    Ä: 'A',
    Ǟ: 'A',
    Ȧ: 'A',
    Ǡ: 'A',
    Ạ: 'A',
    Ȁ: 'A',
    À: 'A',
    Ả: 'A',
    Ȃ: 'A',
    Ā: 'A',
    Ą: 'A',
    Å: 'A',
    Ǻ: 'A',
    Ḁ: 'A',
    Ⱥ: 'A',
    Ã: 'A',
    Ꜳ: 'AA',
    Æ: 'AE',
    Ǽ: 'AE',
    Ǣ: 'AE',
    Ꜵ: 'AO',
    Ꜷ: 'AU',
    Ꜹ: 'AV',
    Ꜻ: 'AV',
    Ꜽ: 'AY',
    Ḃ: 'B',
    Ḅ: 'B',
    Ɓ: 'B',
    Ḇ: 'B',
    Ƀ: 'B',
    Ƃ: 'B',
    Ć: 'C',
    Č: 'C',
    Ç: 'C',
    Ḉ: 'C',
    Ĉ: 'C',
    Ċ: 'C',
    Ƈ: 'C',
    Ȼ: 'C',
    Ď: 'D',
    Ḑ: 'D',
    Ḓ: 'D',
    Ḋ: 'D',
    Ḍ: 'D',
    Ɗ: 'D',
    Ḏ: 'D',
    ǲ: 'D',
    ǅ: 'D',
    Đ: 'D',
    Ð: 'D',
    Ƌ: 'D',
    Ǳ: 'DZ',
    Ǆ: 'DZ',
    É: 'E',
    Ĕ: 'E',
    Ě: 'E',
    Ȩ: 'E',
    Ḝ: 'E',
    Ê: 'E',
    Ế: 'E',
    Ệ: 'E',
    Ề: 'E',
    Ể: 'E',
    Ễ: 'E',
    Ḙ: 'E',
    Ë: 'E',
    Ė: 'E',
    Ẹ: 'E',
    Ȅ: 'E',
    È: 'E',
    Ẻ: 'E',
    Ȇ: 'E',
    Ē: 'E',
    Ḗ: 'E',
    Ḕ: 'E',
    Ę: 'E',
    Ɇ: 'E',
    Ẽ: 'E',
    Ḛ: 'E',
    Ꝫ: 'ET',
    Ḟ: 'F',
    Ƒ: 'F',
    Ǵ: 'G',
    Ğ: 'G',
    Ǧ: 'G',
    Ģ: 'G',
    Ĝ: 'G',
    Ġ: 'G',
    Ɠ: 'G',
    Ḡ: 'G',
    Ǥ: 'G',
    Ḫ: 'H',
    Ȟ: 'H',
    Ḩ: 'H',
    Ĥ: 'H',
    Ⱨ: 'H',
    Ḧ: 'H',
    Ḣ: 'H',
    Ḥ: 'H',
    Ħ: 'H',
    Í: 'I',
    Ĭ: 'I',
    Ǐ: 'I',
    Î: 'I',
    Ï: 'I',
    Ḯ: 'I',
    İ: 'I',
    Ị: 'I',
    Ȉ: 'I',
    Ì: 'I',
    Ỉ: 'I',
    Ȋ: 'I',
    Ī: 'I',
    Į: 'I',
    Ɨ: 'I',
    Ĩ: 'I',
    Ḭ: 'I',
    І: 'I',
    Ꝺ: 'D',
    Ꝼ: 'F',
    Ᵹ: 'G',
    Ꞃ: 'R',
    Ꞅ: 'S',
    Ꞇ: 'T',
    Ꝭ: 'IS',
    Ĵ: 'J',
    Ɉ: 'J',
    Ḱ: 'K',
    Ǩ: 'K',
    Ķ: 'K',
    Ⱪ: 'K',
    Ꝃ: 'K',
    Ḳ: 'K',
    Ƙ: 'K',
    Ḵ: 'K',
    Ꝁ: 'K',
    Ꝅ: 'K',
    Ĺ: 'L',
    Ƚ: 'L',
    Ľ: 'L',
    Ļ: 'L',
    Ḽ: 'L',
    Ḷ: 'L',
    Ḹ: 'L',
    Ⱡ: 'L',
    Ꝉ: 'L',
    Ḻ: 'L',
    Ŀ: 'L',
    Ɫ: 'L',
    ǈ: 'L',
    Ł: 'L',
    Ǉ: 'LJ',
    Ḿ: 'M',
    Ṁ: 'M',
    Ṃ: 'M',
    Ɱ: 'M',
    Ń: 'N',
    Ň: 'N',
    Ņ: 'N',
    Ṋ: 'N',
    Ṅ: 'N',
    Ṇ: 'N',
    Ǹ: 'N',
    Ɲ: 'N',
    Ṉ: 'N',
    Ƞ: 'N',
    ǋ: 'N',
    Ñ: 'N',
    Ǌ: 'NJ',
    Ó: 'O',
    Ŏ: 'O',
    Ǒ: 'O',
    Ô: 'O',
    Ố: 'O',
    Ộ: 'O',
    Ồ: 'O',
    Ổ: 'O',
    Ỗ: 'O',
    Ö: 'O',
    Ȫ: 'O',
    Ȯ: 'O',
    Ȱ: 'O',
    Ọ: 'O',
    Ő: 'O',
    Ȍ: 'O',
    Ò: 'O',
    Ỏ: 'O',
    Ơ: 'O',
    Ớ: 'O',
    Ợ: 'O',
    Ờ: 'O',
    Ở: 'O',
    Ỡ: 'O',
    Ȏ: 'O',
    Ꝋ: 'O',
    Ꝍ: 'O',
    Ō: 'O',
    Ṓ: 'O',
    Ṑ: 'O',
    Ɵ: 'O',
    Ǫ: 'O',
    Ǭ: 'O',
    Ø: 'O',
    Ǿ: 'O',
    Õ: 'O',
    Ṍ: 'O',
    Ṏ: 'O',
    Ȭ: 'O',
    Ƣ: 'OI',
    Ꝏ: 'OO',
    Ɛ: 'E',
    Ɔ: 'O',
    Ȣ: 'OU',
    Ṕ: 'P',
    Ṗ: 'P',
    Ꝓ: 'P',
    Ƥ: 'P',
    Ꝕ: 'P',
    Ᵽ: 'P',
    Ꝑ: 'P',
    Ꝙ: 'Q',
    Ꝗ: 'Q',
    Ŕ: 'R',
    Ř: 'R',
    Ŗ: 'R',
    Ṙ: 'R',
    Ṛ: 'R',
    Ṝ: 'R',
    Ȑ: 'R',
    Ȓ: 'R',
    Ṟ: 'R',
    Ɍ: 'R',
    Ɽ: 'R',
    Ꜿ: 'C',
    Ǝ: 'E',
    Ś: 'S',
    Ṥ: 'S',
    Š: 'S',
    Ṧ: 'S',
    Ş: 'S',
    Ŝ: 'S',
    Ș: 'S',
    Ṡ: 'S',
    Ṣ: 'S',
    Ṩ: 'S',
    ß: 'ss',
    Ť: 'T',
    Ţ: 'T',
    Ṱ: 'T',
    Ț: 'T',
    Ⱦ: 'T',
    Ṫ: 'T',
    Ṭ: 'T',
    Ƭ: 'T',
    Ṯ: 'T',
    Ʈ: 'T',
    Ŧ: 'T',
    Ɐ: 'A',
    Ꞁ: 'L',
    Ɯ: 'M',
    Ʌ: 'V',
    Ꜩ: 'TZ',
    Ú: 'U',
    Ŭ: 'U',
    Ǔ: 'U',
    Û: 'U',
    Ṷ: 'U',
    Ü: 'U',
    Ǘ: 'U',
    Ǚ: 'U',
    Ǜ: 'U',
    Ǖ: 'U',
    Ṳ: 'U',
    Ụ: 'U',
    Ű: 'U',
    Ȕ: 'U',
    Ù: 'U',
    Ủ: 'U',
    Ư: 'U',
    Ứ: 'U',
    Ự: 'U',
    Ừ: 'U',
    Ử: 'U',
    Ữ: 'U',
    Ȗ: 'U',
    Ū: 'U',
    Ṻ: 'U',
    Ų: 'U',
    Ů: 'U',
    Ũ: 'U',
    Ṹ: 'U',
    Ṵ: 'U',
    Ꝟ: 'V',
    Ṿ: 'V',
    Ʋ: 'V',
    Ṽ: 'V',
    Ꝡ: 'VY',
    Ẃ: 'W',
    Ŵ: 'W',
    Ẅ: 'W',
    Ẇ: 'W',
    Ẉ: 'W',
    Ẁ: 'W',
    Ⱳ: 'W',
    Ẍ: 'X',
    Ẋ: 'X',
    Ý: 'Y',
    Ŷ: 'Y',
    Ÿ: 'Y',
    Ẏ: 'Y',
    Ỵ: 'Y',
    Ỳ: 'Y',
    Ƴ: 'Y',
    Ỷ: 'Y',
    Ỿ: 'Y',
    Ȳ: 'Y',
    Ɏ: 'Y',
    Ỹ: 'Y',
    Ї: 'YI',
    Ź: 'Z',
    Ž: 'Z',
    Ẑ: 'Z',
    Ⱬ: 'Z',
    Ż: 'Z',
    Ẓ: 'Z',
    Ȥ: 'Z',
    Ẕ: 'Z',
    Ƶ: 'Z',
    Þ: 'TH',
    Ĳ: 'IJ',
    Œ: 'OE',
    ᴀ: 'A',
    ᴁ: 'AE',
    ʙ: 'B',
    ᴃ: 'B',
    ᴄ: 'C',
    ᴅ: 'D',
    ᴇ: 'E',
    ꜰ: 'F',
    ɢ: 'G',
    ʛ: 'G',
    ʜ: 'H',
    ɪ: 'I',
    ʁ: 'R',
    ᴊ: 'J',
    ᴋ: 'K',
    ʟ: 'L',
    ᴌ: 'L',
    ᴍ: 'M',
    ɴ: 'N',
    ᴏ: 'O',
    ɶ: 'OE',
    ᴐ: 'O',
    ᴕ: 'OU',
    ᴘ: 'P',
    ʀ: 'R',
    ᴎ: 'N',
    ᴙ: 'R',
    ꜱ: 'S',
    ᴛ: 'T',
    ⱻ: 'E',
    ᴚ: 'R',
    ᴜ: 'U',
    ᴠ: 'V',
    ᴡ: 'W',
    ʏ: 'Y',
    ᴢ: 'Z',
    á: 'a',
    ă: 'a',
    ắ: 'a',
    ặ: 'a',
    ằ: 'a',
    ẳ: 'a',
    ẵ: 'a',
    ǎ: 'a',
    â: 'a',
    ấ: 'a',
    ậ: 'a',
    ầ: 'a',
    ẩ: 'a',
    ẫ: 'a',
    ä: 'a',
    ǟ: 'a',
    ȧ: 'a',
    ǡ: 'a',
    ạ: 'a',
    ȁ: 'a',
    à: 'a',
    ả: 'a',
    ȃ: 'a',
    ā: 'a',
    ą: 'a',
    ᶏ: 'a',
    ẚ: 'a',
    å: 'a',
    ǻ: 'a',
    ḁ: 'a',
    ⱥ: 'a',
    ã: 'a',
    ꜳ: 'aa',
    æ: 'ae',
    ǽ: 'ae',
    ǣ: 'ae',
    ꜵ: 'ao',
    ꜷ: 'au',
    ꜹ: 'av',
    ꜻ: 'av',
    ꜽ: 'ay',
    ḃ: 'b',
    ḅ: 'b',
    ɓ: 'b',
    ḇ: 'b',
    ᵬ: 'b',
    ᶀ: 'b',
    ƀ: 'b',
    ƃ: 'b',
    ɵ: 'o',
    ć: 'c',
    č: 'c',
    ç: 'c',
    ḉ: 'c',
    ĉ: 'c',
    ɕ: 'c',
    ċ: 'c',
    ƈ: 'c',
    ȼ: 'c',
    ď: 'd',
    ḑ: 'd',
    ḓ: 'd',
    ȡ: 'd',
    ḋ: 'd',
    ḍ: 'd',
    ɗ: 'd',
    ᶑ: 'd',
    ḏ: 'd',
    ᵭ: 'd',
    ᶁ: 'd',
    đ: 'd',
    ɖ: 'd',
    ƌ: 'd',
    ð: 'd',
    ı: 'i',
    ȷ: 'j',
    ɟ: 'j',
    ʄ: 'j',
    ǳ: 'dz',
    ǆ: 'dz',
    é: 'e',
    ĕ: 'e',
    ě: 'e',
    ȩ: 'e',
    ḝ: 'e',
    ê: 'e',
    ế: 'e',
    ệ: 'e',
    ề: 'e',
    ể: 'e',
    ễ: 'e',
    ḙ: 'e',
    ë: 'e',
    ė: 'e',
    ẹ: 'e',
    ȅ: 'e',
    è: 'e',
    ẻ: 'e',
    ȇ: 'e',
    ē: 'e',
    ḗ: 'e',
    ḕ: 'e',
    ⱸ: 'e',
    ę: 'e',
    ᶒ: 'e',
    ɇ: 'e',
    ẽ: 'e',
    ḛ: 'e',
    ꝫ: 'et',
    ḟ: 'f',
    ƒ: 'f',
    ᵮ: 'f',
    ᶂ: 'f',
    ǵ: 'g',
    ğ: 'g',
    ǧ: 'g',
    ģ: 'g',
    ĝ: 'g',
    ġ: 'g',
    ɠ: 'g',
    ḡ: 'g',
    ᶃ: 'g',
    ǥ: 'g',
    ḫ: 'h',
    ȟ: 'h',
    ḩ: 'h',
    ĥ: 'h',
    ⱨ: 'h',
    ḧ: 'h',
    ḣ: 'h',
    ḥ: 'h',
    ɦ: 'h',
    ẖ: 'h',
    ħ: 'h',
    ƕ: 'hv',
    í: 'i',
    ĭ: 'i',
    ǐ: 'i',
    î: 'i',
    ï: 'i',
    ḯ: 'i',
    ị: 'i',
    ȉ: 'i',
    ì: 'i',
    ỉ: 'i',
    ȋ: 'i',
    ī: 'i',
    į: 'i',
    ᶖ: 'i',
    ɨ: 'i',
    ĩ: 'i',
    ḭ: 'i',
    і: 'i',
    ꝺ: 'd',
    ꝼ: 'f',
    ᵹ: 'g',
    ꞃ: 'r',
    ꞅ: 's',
    ꞇ: 't',
    ꝭ: 'is',
    ǰ: 'j',
    ĵ: 'j',
    ʝ: 'j',
    ɉ: 'j',
    ḱ: 'k',
    ǩ: 'k',
    ķ: 'k',
    ⱪ: 'k',
    ꝃ: 'k',
    ḳ: 'k',
    ƙ: 'k',
    ḵ: 'k',
    ᶄ: 'k',
    ꝁ: 'k',
    ꝅ: 'k',
    ĺ: 'l',
    ƚ: 'l',
    ɬ: 'l',
    ľ: 'l',
    ļ: 'l',
    ḽ: 'l',
    ȴ: 'l',
    ḷ: 'l',
    ḹ: 'l',
    ⱡ: 'l',
    ꝉ: 'l',
    ḻ: 'l',
    ŀ: 'l',
    ɫ: 'l',
    ᶅ: 'l',
    ɭ: 'l',
    ł: 'l',
    ǉ: 'lj',
    ſ: 's',
    ẜ: 's',
    ẛ: 's',
    ẝ: 's',
    ḿ: 'm',
    ṁ: 'm',
    ṃ: 'm',
    ɱ: 'm',
    ᵯ: 'm',
    ᶆ: 'm',
    ń: 'n',
    ň: 'n',
    ņ: 'n',
    ṋ: 'n',
    ȵ: 'n',
    ṅ: 'n',
    ṇ: 'n',
    ǹ: 'n',
    ɲ: 'n',
    ṉ: 'n',
    ƞ: 'n',
    ᵰ: 'n',
    ᶇ: 'n',
    ɳ: 'n',
    ñ: 'n',
    ǌ: 'nj',
    ó: 'o',
    ŏ: 'o',
    ǒ: 'o',
    ô: 'o',
    ố: 'o',
    ộ: 'o',
    ồ: 'o',
    ổ: 'o',
    ỗ: 'o',
    ö: 'o',
    ȫ: 'o',
    ȯ: 'o',
    ȱ: 'o',
    ọ: 'o',
    ő: 'o',
    ȍ: 'o',
    ò: 'o',
    ỏ: 'o',
    ơ: 'o',
    ớ: 'o',
    ợ: 'o',
    ờ: 'o',
    ở: 'o',
    ỡ: 'o',
    ȏ: 'o',
    ꝋ: 'o',
    ꝍ: 'o',
    ⱺ: 'o',
    ō: 'o',
    ṓ: 'o',
    ṑ: 'o',
    ǫ: 'o',
    ǭ: 'o',
    ø: 'o',
    ǿ: 'o',
    õ: 'o',
    ṍ: 'o',
    ṏ: 'o',
    ȭ: 'o',
    ƣ: 'oi',
    ꝏ: 'oo',
    ɛ: 'e',
    ᶓ: 'e',
    ɔ: 'o',
    ᶗ: 'o',
    ȣ: 'ou',
    ṕ: 'p',
    ṗ: 'p',
    ꝓ: 'p',
    ƥ: 'p',
    ᵱ: 'p',
    ᶈ: 'p',
    ꝕ: 'p',
    ᵽ: 'p',
    ꝑ: 'p',
    ꝙ: 'q',
    ʠ: 'q',
    ɋ: 'q',
    ꝗ: 'q',
    ŕ: 'r',
    ř: 'r',
    ŗ: 'r',
    ṙ: 'r',
    ṛ: 'r',
    ṝ: 'r',
    ȑ: 'r',
    ɾ: 'r',
    ᵳ: 'r',
    ȓ: 'r',
    ṟ: 'r',
    ɼ: 'r',
    ᵲ: 'r',
    ᶉ: 'r',
    ɍ: 'r',
    ɽ: 'r',
    ↄ: 'c',
    ꜿ: 'c',
    ɘ: 'e',
    ɿ: 'r',
    ś: 's',
    ṥ: 's',
    š: 's',
    ṧ: 's',
    ş: 's',
    ŝ: 's',
    ș: 's',
    ṡ: 's',
    ṣ: 's',
    ṩ: 's',
    ʂ: 's',
    ᵴ: 's',
    ᶊ: 's',
    ȿ: 's',
    ɡ: 'g',
    ᴑ: 'o',
    ᴓ: 'o',
    ᴝ: 'u',
    ť: 't',
    ţ: 't',
    ṱ: 't',
    ț: 't',
    ȶ: 't',
    ẗ: 't',
    ⱦ: 't',
    ṫ: 't',
    ṭ: 't',
    ƭ: 't',
    ṯ: 't',
    ᵵ: 't',
    ƫ: 't',
    ʈ: 't',
    ŧ: 't',
    ᵺ: 'th',
    ɐ: 'a',
    ᴂ: 'ae',
    ǝ: 'e',
    ᵷ: 'g',
    ɥ: 'h',
    ʮ: 'h',
    ʯ: 'h',
    ᴉ: 'i',
    ʞ: 'k',
    ꞁ: 'l',
    ɯ: 'm',
    ɰ: 'm',
    ᴔ: 'oe',
    ɹ: 'r',
    ɻ: 'r',
    ɺ: 'r',
    ⱹ: 'r',
    ʇ: 't',
    ʌ: 'v',
    ʍ: 'w',
    ʎ: 'y',
    ꜩ: 'tz',
    ú: 'u',
    ŭ: 'u',
    ǔ: 'u',
    û: 'u',
    ṷ: 'u',
    ü: 'u',
    ǘ: 'u',
    ǚ: 'u',
    ǜ: 'u',
    ǖ: 'u',
    ṳ: 'u',
    ụ: 'u',
    ű: 'u',
    ȕ: 'u',
    ù: 'u',
    ủ: 'u',
    ư: 'u',
    ứ: 'u',
    ự: 'u',
    ừ: 'u',
    ử: 'u',
    ữ: 'u',
    ȗ: 'u',
    ū: 'u',
    ṻ: 'u',
    ų: 'u',
    ᶙ: 'u',
    ů: 'u',
    ũ: 'u',
    ṹ: 'u',
    ṵ: 'u',
    ᵫ: 'ue',
    ꝸ: 'um',
    ⱴ: 'v',
    ꝟ: 'v',
    ṿ: 'v',
    ʋ: 'v',
    ᶌ: 'v',
    ⱱ: 'v',
    ṽ: 'v',
    ꝡ: 'vy',
    ẃ: 'w',
    ŵ: 'w',
    ẅ: 'w',
    ẇ: 'w',
    ẉ: 'w',
    ẁ: 'w',
    ⱳ: 'w',
    ẘ: 'w',
    ẍ: 'x',
    ẋ: 'x',
    ᶍ: 'x',
    ý: 'y',
    ŷ: 'y',
    ÿ: 'y',
    ẏ: 'y',
    ỵ: 'y',
    ỳ: 'y',
    ƴ: 'y',
    ỷ: 'y',
    ỿ: 'y',
    ȳ: 'y',
    ẙ: 'y',
    ɏ: 'y',
    ỹ: 'y',
    ї: 'yi',
    ź: 'z',
    ž: 'z',
    ẑ: 'z',
    ʑ: 'z',
    ⱬ: 'z',
    ż: 'z',
    ẓ: 'z',
    ȥ: 'z',
    ẕ: 'z',
    ᵶ: 'z',
    ᶎ: 'z',
    ʐ: 'z',
    ƶ: 'z',
    ɀ: 'z',
    þ: 'th',
    ﬀ: 'ff',
    ﬃ: 'ffi',
    ﬄ: 'ffl',
    ﬁ: 'fi',
    ﬂ: 'fl',
    ĳ: 'ij',
    œ: 'oe',
    ﬆ: 'st',
    ₐ: 'a',
    ₑ: 'e',
    ᵢ: 'i',
    ⱼ: 'j',
    ₒ: 'o',
    ᵣ: 'r',
    ᵤ: 'u',
    ᵥ: 'v',
    ₓ: 'x',
    Ё: 'YO',
    Й: 'I',
    Ц: 'TS',
    У: 'U',
    К: 'K',
    Е: 'E',
    Н: 'N',
    Г: 'G',
    Ґ: 'G',
    Ш: 'SH',
    Щ: 'SCH',
    З: 'Z',
    Х: 'H',
    Ъ: "'",
    ё: 'yo',
    й: 'i',
    ц: 'ts',
    у: 'u',
    к: 'k',
    е: 'e',
    н: 'n',
    г: 'g',
    ґ: 'g',
    ш: 'sh',
    щ: 'sch',
    з: 'z',
    х: 'h',
    ъ: "'",
    Ф: 'F',
    Ы: 'I',
    В: 'V',
    А: 'a',
    П: 'P',
    Р: 'R',
    О: 'O',
    Л: 'L',
    Д: 'D',
    Ж: 'ZH',
    Э: 'E',
    ф: 'f',
    ы: 'i',
    в: 'v',
    а: 'a',
    п: 'p',
    р: 'r',
    о: 'o',
    л: 'l',
    д: 'd',
    ж: 'zh',
    э: 'e',
    Я: 'Ya',
    Ч: 'CH',
    С: 'S',
    М: 'M',
    И: 'I',
    Т: 'T',
    Ь: "'",
    Б: 'B',
    Ю: 'YU',
    я: 'ya',
    ч: 'ch',
    с: 's',
    м: 'm',
    и: 'i',
    т: 't',
    ь: "'",
    б: 'b',
    ю: 'yu'
};
function latinize(str) {
    if (typeof str === 'string') {
        return str.replace(/[^A-Za-z0-9]/g, function (char) {
            return diacriticsToLatinCharacters[char] || char;
        });
    }
    else {
        return str;
    }
}
exports.latinize = latinize;


/***/ }),
/* 389 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 390 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 391 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var QueryEvents_1 = __webpack_require__(11);
var ResultListEvents_1 = __webpack_require__(29);
var ComponentOptionsModel_1 = __webpack_require__(28);
var Dom_1 = __webpack_require__(1);
var Checkbox_1 = __webpack_require__(66);
var TextInput_1 = __webpack_require__(57);
var DebugHeader = /** @class */ (function () {
    function DebugHeader(debugInstance, element, onSearch, infoToDebug) {
        var _this = this;
        this.debugInstance = debugInstance;
        this.element = element;
        this.onSearch = onSearch;
        this.infoToDebug = infoToDebug;
        this.debug = false;
        this.enableQuerySyntax = false;
        this.highlightRecommendation = false;
        this.requestAllFields = false;
        this.widgets = [];
        this.widgets.push(this.buildEnabledHighlightRecommendation());
        this.widgets.push(this.buildEnableDebugCheckbox());
        this.widgets.push(this.buildEnableQuerySyntaxCheckbox());
        this.widgets.push(this.buildRequestAllFieldsCheckbox());
        this.widgets.push(this.buildSearch());
        this.moveTo(element);
        Dom_1.$$(this.root).on(ResultListEvents_1.ResultListEvents.newResultDisplayed, function (e, args) { return _this.handleNewResultDisplayed(args); });
        Dom_1.$$(this.root).on(QueryEvents_1.QueryEvents.doneBuildingQuery, function (e, args) { return _this.handleDoneBuildingQuery(args); });
    }
    DebugHeader.prototype.moveTo = function (newElement) {
        underscore_1.each(this.widgets, function (widget) { return newElement.appendChild(widget); });
        this.element = newElement;
    };
    DebugHeader.prototype.setSearch = function (onSearch) {
        this.onSearch = onSearch;
        this.resetSearchbox();
    };
    DebugHeader.prototype.setNewInfoToDebug = function (newInfoToDebug) {
        this.infoToDebug = newInfoToDebug;
    };
    DebugHeader.prototype.resetSearchbox = function () {
        if (this.search) {
            this.search.reset();
        }
    };
    Object.defineProperty(DebugHeader.prototype, "bindings", {
        get: function () {
            return this.debugInstance.bindings;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugHeader.prototype, "root", {
        get: function () {
            return this.debugInstance.element;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DebugHeader.prototype, "queryOptions", {
        get: function () {
            return {
                closeModalBox: false,
                origin: this.debugInstance
            };
        },
        enumerable: true,
        configurable: true
    });
    DebugHeader.prototype.handleNewResultDisplayed = function (args) {
        if (args.item != null && args.result.isRecommendation && this.highlightRecommendation) {
            Dom_1.$$(args.item).addClass('coveo-is-recommendation');
        }
    };
    DebugHeader.prototype.handleDoneBuildingQuery = function (args) {
        args.queryBuilder.enableDebug = this.debug || args.queryBuilder.enableDebug;
        if (this.requestAllFields) {
            args.queryBuilder.fieldsToInclude = undefined;
            args.queryBuilder.includeRequiredFields = false;
        }
    };
    DebugHeader.prototype.buildSearch = function () {
        var _this = this;
        this.search = new TextInput_1.TextInput(function (txtInputInstance) {
            var value = txtInputInstance.getValue().toLowerCase();
            _this.onSearch(value);
        }, 'Search in debug');
        this.search.build();
        return this.search.getElement();
    };
    DebugHeader.prototype.buildEnableDebugCheckbox = function () {
        var _this = this;
        var checkbox = new Checkbox_1.Checkbox(function (checkboxInstance) {
            _this.debug = checkboxInstance.isSelected();
            _this.bindings.queryController.executeQuery(_this.queryOptions);
            _this.resetSearchbox();
        }, 'Enable query debug');
        if (this.debug) {
            checkbox.select();
        }
        return checkbox.build();
    };
    DebugHeader.prototype.buildEnableQuerySyntaxCheckbox = function () {
        var _this = this;
        var checkbox = new Checkbox_1.Checkbox(function (checkboxInstance) {
            _this.enableQuerySyntax = checkboxInstance.isSelected();
            _this.bindings.componentOptionsModel.set(ComponentOptionsModel_1.COMPONENT_OPTIONS_ATTRIBUTES.SEARCH_BOX, {
                enableQuerySyntax: _this.enableQuerySyntax
            });
            _this.bindings.queryController.executeQuery(_this.queryOptions);
        }, 'Enable query syntax in search box');
        if (this.enableQuerySyntax) {
            checkbox.select();
        }
        return checkbox.build();
    };
    DebugHeader.prototype.buildRequestAllFieldsCheckbox = function () {
        var _this = this;
        var checkbox = new Checkbox_1.Checkbox(function (checkboxInstance) {
            _this.requestAllFields = checkboxInstance.isSelected();
            _this.bindings.queryController.executeQuery(_this.queryOptions);
        }, 'Request all fields available');
        if (this.requestAllFields) {
            checkbox.select();
        }
        return checkbox.build();
    };
    DebugHeader.prototype.buildEnabledHighlightRecommendation = function () {
        var _this = this;
        var checkbox = new Checkbox_1.Checkbox(function (checkboxInstance) {
            _this.highlightRecommendation = checkboxInstance.isSelected();
            _this.bindings.queryController.executeQuery(_this.queryOptions);
        }, 'Highlight recommendation');
        if (this.highlightRecommendation) {
            checkbox.select();
        }
        return checkbox.build();
    };
    return DebugHeader;
}());
exports.DebugHeader = DebugHeader;


/***/ }),
/* 392 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 393 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var StringUtils_1 = __webpack_require__(22);
var _ = __webpack_require__(0);
var DebugForResult = /** @class */ (function () {
    function DebugForResult(bindings) {
        this.bindings = bindings;
    }
    DebugForResult.prototype.generateDebugInfoForResult = function (result) {
        var _this = this;
        return {
            result: result,
            fields: function () { return _this.buildFieldsSection(result); },
            rankingInfo: function () { return _this.buildRankingInfoSection(result); }
        };
    };
    DebugForResult.prototype.fetchFields = function () {
        var _this = this;
        if (this.fields == null) {
            return this.bindings.queryController
                .getEndpoint()
                .listFields()
                .then(function (fields) {
                _this.fields = {};
                fields.forEach(function (field) {
                    _this.fields[field.name] = field;
                });
                return _this.fields;
            });
        }
        else {
            return Promise.resolve(this.fields);
        }
    };
    DebugForResult.prototype.buildRankingInfoSection = function (result) {
        return result.rankingInfo && this.parseRankingInfo(result.rankingInfo);
    };
    DebugForResult.prototype.parseWeights = function (value) {
        var listOfWeight = value.match(/(\w+(?:\s\w+)*): ([-0-9]+)/g);
        return _.object(_.map(listOfWeight, function (weight) {
            var weightGroup = weight.match(/^(\w+(?:\s\w+)*): ([-0-9]+)$/);
            return [weightGroup[1], Number(weightGroup[2])];
        }));
    };
    DebugForResult.prototype.buildFieldsSection = function (result) {
        return this.fetchFields().then(function (fieldDescriptions) {
            var fields = {};
            _.each(result.raw, function (value, key) {
                var fieldDescription = fieldDescriptions['@' + key];
                if (fieldDescription == null && key.match(/^sys/)) {
                    fieldDescription = fieldDescriptions['@' + key.substr(3)];
                }
                if (fieldDescription == null) {
                    fields['@' + key] = value;
                }
                else if (fieldDescription.fieldType == 'Date') {
                    fields['@' + key] = new Date(value);
                }
                else if (fieldDescription.splitGroupByField && _.isString(value)) {
                    fields['@' + key] = value.split(/\s*;\s*/);
                }
                else {
                    fields['@' + key] = value;
                }
            });
            return fields;
        });
    };
    DebugForResult.prototype.parseRankingInfo = function (value) {
        var _this = this;
        var rankingInfo = {};
        if (value) {
            var documentWeights = /Document weights:\n((?:.)*?)\n+/g.exec(value);
            var termsWeight = /Terms weights:\n((?:.|\n)*)\n+/g.exec(value);
            var totalWeight = /Total weight: ([0-9]+)/g.exec(value);
            if (documentWeights && documentWeights[1]) {
                rankingInfo['Document weights'] = this.parseWeights(documentWeights[1]);
            }
            if (totalWeight && totalWeight[1]) {
                rankingInfo['Total weight'] = Number(totalWeight[1]);
            }
            if (termsWeight && termsWeight[1]) {
                var terms = StringUtils_1.StringUtils.match(termsWeight[1], /((?:[^:]+: [0-9]+, [0-9]+; )+)\n((?:\w+: [0-9]+; )+)/g);
                rankingInfo['Terms weights'] = _.object(_.map(terms, function (term) {
                    var words = _.object(_.map(StringUtils_1.StringUtils.match(term[1], /([^:]+): ([0-9]+), ([0-9]+); /g), function (word) {
                        return [
                            word[1],
                            {
                                Correlation: Number(word[2]),
                                'TF-IDF': Number(word[3])
                            }
                        ];
                    }));
                    var weights = _this.parseWeights(term[2]);
                    return [
                        _.keys(words).join(', '),
                        {
                            terms: words,
                            Weights: weights
                        }
                    ];
                }));
            }
        }
        return rankingInfo;
    };
    return DebugForResult;
}());
exports.DebugForResult = DebugForResult;


/***/ }),
/* 394 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 395 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(37);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _create = _interopRequireDefault(__webpack_require__(396));

var _slicedToArray2 = _interopRequireDefault(__webpack_require__(411));

var _getIterator2 = _interopRequireDefault(__webpack_require__(116));

var _parseInt2 = _interopRequireDefault(__webpack_require__(433));

/*!
 * XRegExp 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2007-present MIT License
 */

/**
 * XRegExp provides augmented, extensible regular expressions. You get additional regex syntax and
 * flags, beyond what browsers support natively. XRegExp is also a regex utility belt with tools to
 * make your client-side grepping simpler and more powerful, while freeing you from related
 * cross-browser inconsistencies.
 */
// ==--------------------------==
// Private stuff
// ==--------------------------==
// Property name used for extended regex instance data
var REGEX_DATA = 'xregexp'; // Optional features that can be installed and uninstalled

var features = {
  astral: false,
  namespacing: false
}; // Native methods to use and restore ('native' is an ES3 reserved keyword)

var nativ = {
  exec: RegExp.prototype.exec,
  test: RegExp.prototype.test,
  match: String.prototype.match,
  replace: String.prototype.replace,
  split: String.prototype.split
}; // Storage for fixed/extended native methods

var fixed = {}; // Storage for regexes cached by `XRegExp.cache`

var regexCache = {}; // Storage for pattern details cached by the `XRegExp` constructor

var patternCache = {}; // Storage for regex syntax tokens added internally or by `XRegExp.addToken`

var tokens = []; // Token scopes

var defaultScope = 'default';
var classScope = 'class'; // Regexes that match native regex syntax, including octals

var nativeTokens = {
  // Any native multicharacter token in default scope, or any single character
  'default': /\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,
  // Any native multicharacter token in character class scope, or any single character
  'class': /\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/
}; // Any backreference or dollar-prefixed character in replacement strings

var replacementToken = /\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g; // Check for correct `exec` handling of nonparticipating capturing groups

var correctExecNpcg = nativ.exec.call(/()??/, '')[1] === undefined; // Check for ES6 `flags` prop support

var hasFlagsProp = /x/.flags !== undefined; // Shortcut to `Object.prototype.toString`

var _ref = {},
    toString = _ref.toString;

function hasNativeFlag(flag) {
  // Can't check based on the presence of properties/getters since browsers might support such
  // properties even when they don't support the corresponding flag in regex construction (tested
  // in Chrome 48, where `'unicode' in /x/` is true but trying to construct a regex with flag `u`
  // throws an error)
  var isSupported = true;

  try {
    // Can't use regex literals for testing even in a `try` because regex literals with
    // unsupported flags cause a compilation error in IE
    new RegExp('', flag);
  } catch (exception) {
    isSupported = false;
  }

  return isSupported;
} // Check for ES6 `u` flag support


var hasNativeU = hasNativeFlag('u'); // Check for ES6 `y` flag support

var hasNativeY = hasNativeFlag('y'); // Tracker for known flags, including addon flags

var registeredFlags = {
  g: true,
  i: true,
  m: true,
  u: hasNativeU,
  y: hasNativeY
};
/**
 * Attaches extended data and `XRegExp.prototype` properties to a regex object.
 *
 * @private
 * @param {RegExp} regex Regex to augment.
 * @param {Array} captureNames Array with capture names, or `null`.
 * @param {String} xSource XRegExp pattern used to generate `regex`, or `null` if N/A.
 * @param {String} xFlags XRegExp flags used to generate `regex`, or `null` if N/A.
 * @param {Boolean} [isInternalOnly=false] Whether the regex will be used only for internal
 *   operations, and never exposed to users. For internal-only regexes, we can improve perf by
 *   skipping some operations like attaching `XRegExp.prototype` properties.
 * @returns {RegExp} Augmented regex.
 */

function augment(regex, captureNames, xSource, xFlags, isInternalOnly) {
  regex[REGEX_DATA] = {
    captureNames: captureNames
  };

  if (isInternalOnly) {
    return regex;
  } // Can't auto-inherit these since the XRegExp constructor returns a nonprimitive value


  if (regex.__proto__) {
    regex.__proto__ = XRegExp.prototype;
  } else {
    for (var p in XRegExp.prototype) {
      // An `XRegExp.prototype.hasOwnProperty(p)` check wouldn't be worth it here, since this
      // is performance sensitive, and enumerable `Object.prototype` or `RegExp.prototype`
      // extensions exist on `regex.prototype` anyway
      regex[p] = XRegExp.prototype[p];
    }
  }

  regex[REGEX_DATA].source = xSource; // Emulate the ES6 `flags` prop by ensuring flags are in alphabetical order

  regex[REGEX_DATA].flags = xFlags ? xFlags.split('').sort().join('') : xFlags;
  return regex;
}
/**
 * Removes any duplicate characters from the provided string.
 *
 * @private
 * @param {String} str String to remove duplicate characters from.
 * @returns {String} String with any duplicate characters removed.
 */


function clipDuplicates(str) {
  return nativ.replace.call(str, /([\s\S])(?=[\s\S]*\1)/g, '');
}
/**
 * Copies a regex object while preserving extended data and augmenting with `XRegExp.prototype`
 * properties. The copy has a fresh `lastIndex` property (set to zero). Allows adding and removing
 * flags g and y while copying the regex.
 *
 * @private
 * @param {RegExp} regex Regex to copy.
 * @param {Object} [options] Options object with optional properties:
 *   - `addG` {Boolean} Add flag g while copying the regex.
 *   - `addY` {Boolean} Add flag y while copying the regex.
 *   - `removeG` {Boolean} Remove flag g while copying the regex.
 *   - `removeY` {Boolean} Remove flag y while copying the regex.
 *   - `isInternalOnly` {Boolean} Whether the copied regex will be used only for internal
 *     operations, and never exposed to users. For internal-only regexes, we can improve perf by
 *     skipping some operations like attaching `XRegExp.prototype` properties.
 *   - `source` {String} Overrides `<regex>.source`, for special cases.
 * @returns {RegExp} Copy of the provided regex, possibly with modified flags.
 */


function copyRegex(regex, options) {
  if (!XRegExp.isRegExp(regex)) {
    throw new TypeError('Type RegExp expected');
  }

  var xData = regex[REGEX_DATA] || {};
  var flags = getNativeFlags(regex);
  var flagsToAdd = '';
  var flagsToRemove = '';
  var xregexpSource = null;
  var xregexpFlags = null;
  options = options || {};

  if (options.removeG) {
    flagsToRemove += 'g';
  }

  if (options.removeY) {
    flagsToRemove += 'y';
  }

  if (flagsToRemove) {
    flags = nativ.replace.call(flags, new RegExp("[".concat(flagsToRemove, "]+"), 'g'), '');
  }

  if (options.addG) {
    flagsToAdd += 'g';
  }

  if (options.addY) {
    flagsToAdd += 'y';
  }

  if (flagsToAdd) {
    flags = clipDuplicates(flags + flagsToAdd);
  }

  if (!options.isInternalOnly) {
    if (xData.source !== undefined) {
      xregexpSource = xData.source;
    } // null or undefined; don't want to add to `flags` if the previous value was null, since
    // that indicates we're not tracking original precompilation flags


    if (xData.flags != null) {
      // Flags are only added for non-internal regexes by `XRegExp.globalize`. Flags are never
      // removed for non-internal regexes, so don't need to handle it
      xregexpFlags = flagsToAdd ? clipDuplicates(xData.flags + flagsToAdd) : xData.flags;
    }
  } // Augment with `XRegExp.prototype` properties, but use the native `RegExp` constructor to avoid
  // searching for special tokens. That would be wrong for regexes constructed by `RegExp`, and
  // unnecessary for regexes constructed by `XRegExp` because the regex has already undergone the
  // translation to native regex syntax


  regex = augment(new RegExp(options.source || regex.source, flags), hasNamedCapture(regex) ? xData.captureNames.slice(0) : null, xregexpSource, xregexpFlags, options.isInternalOnly);
  return regex;
}
/**
 * Converts hexadecimal to decimal.
 *
 * @private
 * @param {String} hex
 * @returns {Number}
 */


function dec(hex) {
  return (0, _parseInt2.default)(hex, 16);
}
/**
 * Returns a pattern that can be used in a native RegExp in place of an ignorable token such as an
 * inline comment or whitespace with flag x. This is used directly as a token handler function
 * passed to `XRegExp.addToken`.
 *
 * @private
 * @param {String} match Match arg of `XRegExp.addToken` handler
 * @param {String} scope Scope arg of `XRegExp.addToken` handler
 * @param {String} flags Flags arg of `XRegExp.addToken` handler
 * @returns {String} Either '' or '(?:)', depending on which is needed in the context of the match.
 */


function getContextualTokenSeparator(match, scope, flags) {
  if ( // No need to separate tokens if at the beginning or end of a group
  match.input[match.index - 1] === '(' || match.input[match.index + match[0].length] === ')' || // No need to separate tokens if before or after a `|`
  match.input[match.index - 1] === '|' || match.input[match.index + match[0].length] === '|' || // No need to separate tokens if at the beginning or end of the pattern
  match.index < 1 || match.index + match[0].length >= match.input.length || // No need to separate tokens if at the beginning of a noncapturing group or lookahead.
  // The way this is written relies on:
  // - The search regex matching only 3-char strings.
  // - Although `substr` gives chars from the end of the string if given a negative index,
  //   the resulting substring will be too short to match. Ex: `'abcd'.substr(-1, 3) === 'd'`
  nativ.test.call(/^\(\?[:=!]/, match.input.substr(match.index - 3, 3)) || // Avoid separating tokens when the following token is a quantifier
  isQuantifierNext(match.input, match.index + match[0].length, flags)) {
    return '';
  } // Keep tokens separated. This avoids e.g. inadvertedly changing `\1 1` or `\1(?#)1` to `\11`.
  // This also ensures all tokens remain as discrete atoms, e.g. it avoids converting the syntax
  // error `(? :` into `(?:`.


  return '(?:)';
}
/**
 * Returns native `RegExp` flags used by a regex object.
 *
 * @private
 * @param {RegExp} regex Regex to check.
 * @returns {String} Native flags in use.
 */


function getNativeFlags(regex) {
  return hasFlagsProp ? regex.flags : // Explicitly using `RegExp.prototype.toString` (rather than e.g. `String` or concatenation
  // with an empty string) allows this to continue working predictably when
  // `XRegExp.proptotype.toString` is overridden
  nativ.exec.call(/\/([a-z]*)$/i, RegExp.prototype.toString.call(regex))[1];
}
/**
 * Determines whether a regex has extended instance data used to track capture names.
 *
 * @private
 * @param {RegExp} regex Regex to check.
 * @returns {Boolean} Whether the regex uses named capture.
 */


function hasNamedCapture(regex) {
  return !!(regex[REGEX_DATA] && regex[REGEX_DATA].captureNames);
}
/**
 * Converts decimal to hexadecimal.
 *
 * @private
 * @param {Number|String} dec
 * @returns {String}
 */


function hex(dec) {
  return (0, _parseInt2.default)(dec, 10).toString(16);
}
/**
 * Checks whether the next nonignorable token after the specified position is a quantifier.
 *
 * @private
 * @param {String} pattern Pattern to search within.
 * @param {Number} pos Index in `pattern` to search at.
 * @param {String} flags Flags used by the pattern.
 * @returns {Boolean} Whether the next nonignorable token is a quantifier.
 */


function isQuantifierNext(pattern, pos, flags) {
  var inlineCommentPattern = '\\(\\?#[^)]*\\)';
  var lineCommentPattern = '#[^#\\n]*';
  var quantifierPattern = '[?*+]|{\\d+(?:,\\d*)?}';
  return nativ.test.call(flags.indexOf('x') !== -1 ? // Ignore any leading whitespace, line comments, and inline comments
  /^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : // Ignore any leading inline comments
  /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, pattern.slice(pos));
}
/**
 * Determines whether a value is of the specified type, by resolving its internal [[Class]].
 *
 * @private
 * @param {*} value Object to check.
 * @param {String} type Type to check for, in TitleCase.
 * @returns {Boolean} Whether the object matches the type.
 */


function isType(value, type) {
  return toString.call(value) === "[object ".concat(type, "]");
}
/**
 * Adds leading zeros if shorter than four characters. Used for fixed-length hexadecimal values.
 *
 * @private
 * @param {String} str
 * @returns {String}
 */


function pad4(str) {
  while (str.length < 4) {
    str = "0".concat(str);
  }

  return str;
}
/**
 * Checks for flag-related errors, and strips/applies flags in a leading mode modifier. Offloads
 * the flag preparation logic from the `XRegExp` constructor.
 *
 * @private
 * @param {String} pattern Regex pattern, possibly with a leading mode modifier.
 * @param {String} flags Any combination of flags.
 * @returns {Object} Object with properties `pattern` and `flags`.
 */


function prepareFlags(pattern, flags) {
  // Recent browsers throw on duplicate flags, so copy this behavior for nonnative flags
  if (clipDuplicates(flags) !== flags) {
    throw new SyntaxError("Invalid duplicate regex flag ".concat(flags));
  } // Strip and apply a leading mode modifier with any combination of flags except g or y


  pattern = nativ.replace.call(pattern, /^\(\?([\w$]+)\)/, function ($0, $1) {
    if (nativ.test.call(/[gy]/, $1)) {
      throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat($0));
    } // Allow duplicate flags within the mode modifier


    flags = clipDuplicates(flags + $1);
    return '';
  }); // Throw on unknown native or nonnative flags

  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;

  try {
    for (var _iterator = (0, _getIterator2.default)(flags), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var flag = _step.value;

      if (!registeredFlags[flag]) {
        throw new SyntaxError("Unknown regex flag ".concat(flag));
      }
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return != null) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }

  return {
    pattern: pattern,
    flags: flags
  };
}
/**
 * Prepares an options object from the given value.
 *
 * @private
 * @param {String|Object} value Value to convert to an options object.
 * @returns {Object} Options object.
 */


function prepareOptions(value) {
  var options = {};

  if (isType(value, 'String')) {
    XRegExp.forEach(value, /[^\s,]+/, function (match) {
      options[match] = true;
    });
    return options;
  }

  return value;
}
/**
 * Registers a flag so it doesn't throw an 'unknown flag' error.
 *
 * @private
 * @param {String} flag Single-character flag to register.
 */


function registerFlag(flag) {
  if (!/^[\w$]$/.test(flag)) {
    throw new Error('Flag must be a single character A-Za-z0-9_$');
  }

  registeredFlags[flag] = true;
}
/**
 * Runs built-in and custom regex syntax tokens in reverse insertion order at the specified
 * position, until a match is found.
 *
 * @private
 * @param {String} pattern Original pattern from which an XRegExp object is being built.
 * @param {String} flags Flags being used to construct the regex.
 * @param {Number} pos Position to search for tokens within `pattern`.
 * @param {Number} scope Regex scope to apply: 'default' or 'class'.
 * @param {Object} context Context object to use for token handler functions.
 * @returns {Object} Object with properties `matchLength`, `output`, and `reparse`; or `null`.
 */


function runTokens(pattern, flags, pos, scope, context) {
  var i = tokens.length;
  var leadChar = pattern[pos];
  var result = null;
  var match;
  var t; // Run in reverse insertion order

  while (i--) {
    t = tokens[i];

    if (t.leadChar && t.leadChar !== leadChar || t.scope !== scope && t.scope !== 'all' || t.flag && !(flags.indexOf(t.flag) !== -1)) {
      continue;
    }

    match = XRegExp.exec(pattern, t.regex, pos, 'sticky');

    if (match) {
      result = {
        matchLength: match[0].length,
        output: t.handler.call(context, match, scope, flags),
        reparse: t.reparse
      }; // Finished with token tests

      break;
    }
  }

  return result;
}
/**
 * Enables or disables implicit astral mode opt-in. When enabled, flag A is automatically added to
 * all new regexes created by XRegExp. This causes an error to be thrown when creating regexes if
 * the Unicode Base addon is not available, since flag A is registered by that addon.
 *
 * @private
 * @param {Boolean} on `true` to enable; `false` to disable.
 */


function setAstral(on) {
  features.astral = on;
}
/**
 * Adds named capture groups to the `groups` property of match arrays. See here for details:
 * https://github.com/tc39/proposal-regexp-named-groups
 *
 * @private
 * @param {Boolean} on `true` to enable; `false` to disable.
 */


function setNamespacing(on) {
  features.namespacing = on;
}
/**
 * Returns the object, or throws an error if it is `null` or `undefined`. This is used to follow
 * the ES5 abstract operation `ToObject`.
 *
 * @private
 * @param {*} value Object to check and return.
 * @returns {*} The provided object.
 */


function toObject(value) {
  // null or undefined
  if (value == null) {
    throw new TypeError('Cannot convert null or undefined to object');
  }

  return value;
} // ==--------------------------==
// Constructor
// ==--------------------------==

/**
 * Creates an extended regular expression object for matching text with a pattern. Differs from a
 * native regular expression in that additional syntax and flags are supported. The returned object
 * is in fact a native `RegExp` and works with all native methods.
 *
 * @class XRegExp
 * @constructor
 * @param {String|RegExp} pattern Regex pattern string, or an existing regex object to copy.
 * @param {String} [flags] Any combination of flags.
 *   Native flags:
 *     - `g` - global
 *     - `i` - ignore case
 *     - `m` - multiline anchors
 *     - `u` - unicode (ES6)
 *     - `y` - sticky (Firefox 3+, ES6)
 *   Additional XRegExp flags:
 *     - `n` - explicit capture
 *     - `s` - dot matches all (aka singleline)
 *     - `x` - free-spacing and line comments (aka extended)
 *     - `A` - astral (requires the Unicode Base addon)
 *   Flags cannot be provided when constructing one `RegExp` from another.
 * @returns {RegExp} Extended regular expression object.
 * @example
 *
 * // With named capture and flag x
 * XRegExp(`(?<year>  [0-9]{4} ) -?  # year
 *          (?<month> [0-9]{2} ) -?  # month
 *          (?<day>   [0-9]{2} )     # day`, 'x');
 *
 * // Providing a regex object copies it. Native regexes are recompiled using native (not XRegExp)
 * // syntax. Copies maintain extended data, are augmented with `XRegExp.prototype` properties, and
 * // have fresh `lastIndex` properties (set to zero).
 * XRegExp(/regex/);
 */


function XRegExp(pattern, flags) {
  if (XRegExp.isRegExp(pattern)) {
    if (flags !== undefined) {
      throw new TypeError('Cannot supply flags when copying a RegExp');
    }

    return copyRegex(pattern);
  } // Copy the argument behavior of `RegExp`


  pattern = pattern === undefined ? '' : String(pattern);
  flags = flags === undefined ? '' : String(flags);

  if (XRegExp.isInstalled('astral') && !(flags.indexOf('A') !== -1)) {
    // This causes an error to be thrown if the Unicode Base addon is not available
    flags += 'A';
  }

  if (!patternCache[pattern]) {
    patternCache[pattern] = {};
  }

  if (!patternCache[pattern][flags]) {
    var context = {
      hasNamedCapture: false,
      captureNames: []
    };
    var scope = defaultScope;
    var output = '';
    var pos = 0;
    var result; // Check for flag-related errors, and strip/apply flags in a leading mode modifier

    var applied = prepareFlags(pattern, flags);
    var appliedPattern = applied.pattern;
    var appliedFlags = applied.flags; // Use XRegExp's tokens to translate the pattern to a native regex pattern.
    // `appliedPattern.length` may change on each iteration if tokens use `reparse`

    while (pos < appliedPattern.length) {
      do {
        // Check for custom tokens at the current position
        result = runTokens(appliedPattern, appliedFlags, pos, scope, context); // If the matched token used the `reparse` option, splice its output into the
        // pattern before running tokens again at the same position

        if (result && result.reparse) {
          appliedPattern = appliedPattern.slice(0, pos) + result.output + appliedPattern.slice(pos + result.matchLength);
        }
      } while (result && result.reparse);

      if (result) {
        output += result.output;
        pos += result.matchLength || 1;
      } else {
        // Get the native token at the current position
        var _XRegExp$exec = XRegExp.exec(appliedPattern, nativeTokens[scope], pos, 'sticky'),
            _XRegExp$exec2 = (0, _slicedToArray2.default)(_XRegExp$exec, 1),
            token = _XRegExp$exec2[0];

        output += token;
        pos += token.length;

        if (token === '[' && scope === defaultScope) {
          scope = classScope;
        } else if (token === ']' && scope === classScope) {
          scope = defaultScope;
        }
      }
    }

    patternCache[pattern][flags] = {
      // Use basic cleanup to collapse repeated empty groups like `(?:)(?:)` to `(?:)`. Empty
      // groups are sometimes inserted during regex transpilation in order to keep tokens
      // separated. However, more than one empty group in a row is never needed.
      pattern: nativ.replace.call(output, /(?:\(\?:\))+/g, '(?:)'),
      // Strip all but native flags
      flags: nativ.replace.call(appliedFlags, /[^gimuy]+/g, ''),
      // `context.captureNames` has an item for each capturing group, even if unnamed
      captures: context.hasNamedCapture ? context.captureNames : null
    };
  }

  var generated = patternCache[pattern][flags];
  return augment(new RegExp(generated.pattern, generated.flags), generated.captures, pattern, flags);
} // Add `RegExp.prototype` to the prototype chain


XRegExp.prototype = /(?:)/; // ==--------------------------==
// Public properties
// ==--------------------------==

/**
 * The XRegExp version number as a string containing three dot-separated parts. For example,
 * '2.0.0-beta-3'.
 *
 * @static
 * @memberOf XRegExp
 * @type String
 */

XRegExp.version = '4.2.4'; // ==--------------------------==
// Public methods
// ==--------------------------==
// Intentionally undocumented; used in tests and addons

XRegExp._clipDuplicates = clipDuplicates;
XRegExp._hasNativeFlag = hasNativeFlag;
XRegExp._dec = dec;
XRegExp._hex = hex;
XRegExp._pad4 = pad4;
/**
 * Extends XRegExp syntax and allows custom flags. This is used internally and can be used to
 * create XRegExp addons. If more than one token can match the same string, the last added wins.
 *
 * @memberOf XRegExp
 * @param {RegExp} regex Regex object that matches the new token.
 * @param {Function} handler Function that returns a new pattern string (using native regex syntax)
 *   to replace the matched token within all future XRegExp regexes. Has access to persistent
 *   properties of the regex being built, through `this`. Invoked with three arguments:
 *   - The match array, with named backreference properties.
 *   - The regex scope where the match was found: 'default' or 'class'.
 *   - The flags used by the regex, including any flags in a leading mode modifier.
 *   The handler function becomes part of the XRegExp construction process, so be careful not to
 *   construct XRegExps within the function or you will trigger infinite recursion.
 * @param {Object} [options] Options object with optional properties:
 *   - `scope` {String} Scope where the token applies: 'default', 'class', or 'all'.
 *   - `flag` {String} Single-character flag that triggers the token. This also registers the
 *     flag, which prevents XRegExp from throwing an 'unknown flag' error when the flag is used.
 *   - `optionalFlags` {String} Any custom flags checked for within the token `handler` that are
 *     not required to trigger the token. This registers the flags, to prevent XRegExp from
 *     throwing an 'unknown flag' error when any of the flags are used.
 *   - `reparse` {Boolean} Whether the `handler` function's output should not be treated as
 *     final, and instead be reparseable by other tokens (including the current token). Allows
 *     token chaining or deferring.
 *   - `leadChar` {String} Single character that occurs at the beginning of any successful match
 *     of the token (not always applicable). This doesn't change the behavior of the token unless
 *     you provide an erroneous value. However, providing it can increase the token's performance
 *     since the token can be skipped at any positions where this character doesn't appear.
 * @example
 *
 * // Basic usage: Add \a for the ALERT control code
 * XRegExp.addToken(
 *   /\\a/,
 *   () => '\\x07',
 *   {scope: 'all'}
 * );
 * XRegExp('\\a[\\a-\\n]+').test('\x07\n\x07'); // -> true
 *
 * // Add the U (ungreedy) flag from PCRE and RE2, which reverses greedy and lazy quantifiers.
 * // Since `scope` is not specified, it uses 'default' (i.e., transformations apply outside of
 * // character classes only)
 * XRegExp.addToken(
 *   /([?*+]|{\d+(?:,\d*)?})(\??)/,
 *   (match) => `${match[1]}${match[2] ? '' : '?'}`,
 *   {flag: 'U'}
 * );
 * XRegExp('a+', 'U').exec('aaa')[0]; // -> 'a'
 * XRegExp('a+?', 'U').exec('aaa')[0]; // -> 'aaa'
 */

XRegExp.addToken = function (regex, handler, options) {
  options = options || {};
  var _options = options,
      optionalFlags = _options.optionalFlags;

  if (options.flag) {
    registerFlag(options.flag);
  }

  if (optionalFlags) {
    optionalFlags = nativ.split.call(optionalFlags, '');
    var _iteratorNormalCompletion2 = true;
    var _didIteratorError2 = false;
    var _iteratorError2 = undefined;

    try {
      for (var _iterator2 = (0, _getIterator2.default)(optionalFlags), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
        var flag = _step2.value;
        registerFlag(flag);
      }
    } catch (err) {
      _didIteratorError2 = true;
      _iteratorError2 = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
          _iterator2.return();
        }
      } finally {
        if (_didIteratorError2) {
          throw _iteratorError2;
        }
      }
    }
  } // Add to the private list of syntax tokens


  tokens.push({
    regex: copyRegex(regex, {
      addG: true,
      addY: hasNativeY,
      isInternalOnly: true
    }),
    handler: handler,
    scope: options.scope || defaultScope,
    flag: options.flag,
    reparse: options.reparse,
    leadChar: options.leadChar
  }); // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and flags
  // might now produce different results

  XRegExp.cache.flush('patterns');
};
/**
 * Caches and returns the result of calling `XRegExp(pattern, flags)`. On any subsequent call with
 * the same pattern and flag combination, the cached copy of the regex is returned.
 *
 * @memberOf XRegExp
 * @param {String} pattern Regex pattern string.
 * @param {String} [flags] Any combination of XRegExp flags.
 * @returns {RegExp} Cached XRegExp object.
 * @example
 *
 * while (match = XRegExp.cache('.', 'gs').exec(str)) {
 *   // The regex is compiled once only
 * }
 */


XRegExp.cache = function (pattern, flags) {
  if (!regexCache[pattern]) {
    regexCache[pattern] = {};
  }

  return regexCache[pattern][flags] || (regexCache[pattern][flags] = XRegExp(pattern, flags));
}; // Intentionally undocumented; used in tests


XRegExp.cache.flush = function (cacheName) {
  if (cacheName === 'patterns') {
    // Flush the pattern cache used by the `XRegExp` constructor
    patternCache = {};
  } else {
    // Flush the regex cache populated by `XRegExp.cache`
    regexCache = {};
  }
};
/**
 * Escapes any regular expression metacharacters, for use when matching literal strings. The result
 * can safely be used at any point within a regex that uses any flags.
 *
 * @memberOf XRegExp
 * @param {String} str String to escape.
 * @returns {String} String with regex metacharacters escaped.
 * @example
 *
 * XRegExp.escape('Escaped? <.>');
 * // -> 'Escaped\?\ <\.>'
 */


XRegExp.escape = function (str) {
  return nativ.replace.call(toObject(str), /[-\[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
};
/**
 * Executes a regex search in a specified string. Returns a match array or `null`. If the provided
 * regex uses named capture, named backreference properties are included on the match array.
 * Optional `pos` and `sticky` arguments specify the search start position, and whether the match
 * must start at the specified position only. The `lastIndex` property of the provided regex is not
 * used, but is updated for compatibility. Also fixes browser bugs compared to the native
 * `RegExp.prototype.exec` and can be used reliably cross-browser.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp} regex Regex to search with.
 * @param {Number} [pos=0] Zero-based index at which to start the search.
 * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
 *   only. The string `'sticky'` is accepted as an alternative to `true`.
 * @returns {Array} Match array with named backreference properties, or `null`.
 * @example
 *
 * // Basic use, with named backreference
 * let match = XRegExp.exec('U+2620', XRegExp('U\\+(?<hex>[0-9A-F]{4})'));
 * match.hex; // -> '2620'
 *
 * // With pos and sticky, in a loop
 * let pos = 2, result = [], match;
 * while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d)>/, pos, 'sticky')) {
 *   result.push(match[1]);
 *   pos = match.index + match[0].length;
 * }
 * // result -> ['2', '3', '4']
 */


XRegExp.exec = function (str, regex, pos, sticky) {
  var cacheKey = 'g';
  var addY = false;
  var fakeY = false;
  var match;
  addY = hasNativeY && !!(sticky || regex.sticky && sticky !== false);

  if (addY) {
    cacheKey += 'y';
  } else if (sticky) {
    // Simulate sticky matching by appending an empty capture to the original regex. The
    // resulting regex will succeed no matter what at the current index (set with `lastIndex`),
    // and will not search the rest of the subject string. We'll know that the original regex
    // has failed if that last capture is `''` rather than `undefined` (i.e., if that last
    // capture participated in the match).
    fakeY = true;
    cacheKey += 'FakeY';
  }

  regex[REGEX_DATA] = regex[REGEX_DATA] || {}; // Shares cached copies with `XRegExp.match`/`replace`

  var r2 = regex[REGEX_DATA][cacheKey] || (regex[REGEX_DATA][cacheKey] = copyRegex(regex, {
    addG: true,
    addY: addY,
    source: fakeY ? "".concat(regex.source, "|()") : undefined,
    removeY: sticky === false,
    isInternalOnly: true
  }));
  pos = pos || 0;
  r2.lastIndex = pos; // Fixed `exec` required for `lastIndex` fix, named backreferences, etc.

  match = fixed.exec.call(r2, str); // Get rid of the capture added by the pseudo-sticky matcher if needed. An empty string means
  // the original regexp failed (see above).

  if (fakeY && match && match.pop() === '') {
    match = null;
  }

  if (regex.global) {
    regex.lastIndex = match ? r2.lastIndex : 0;
  }

  return match;
};
/**
 * Executes a provided function once per regex match. Searches always start at the beginning of the
 * string and continue until the end, regardless of the state of the regex's `global` property and
 * initial `lastIndex`.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp} regex Regex to search with.
 * @param {Function} callback Function to execute for each match. Invoked with four arguments:
 *   - The match array, with named backreference properties.
 *   - The zero-based match index.
 *   - The string being traversed.
 *   - The regex object being used to traverse the string.
 * @example
 *
 * // Extracts every other digit from a string
 * const evens = [];
 * XRegExp.forEach('1a2345', /\d/, (match, i) => {
 *   if (i % 2) evens.push(+match[0]);
 * });
 * // evens -> [2, 4]
 */


XRegExp.forEach = function (str, regex, callback) {
  var pos = 0;
  var i = -1;
  var match;

  while (match = XRegExp.exec(str, regex, pos)) {
    // Because `regex` is provided to `callback`, the function could use the deprecated/
    // nonstandard `RegExp.prototype.compile` to mutate the regex. However, since `XRegExp.exec`
    // doesn't use `lastIndex` to set the search position, this can't lead to an infinite loop,
    // at least. Actually, because of the way `XRegExp.exec` caches globalized versions of
    // regexes, mutating the regex will not have any effect on the iteration or matched strings,
    // which is a nice side effect that brings extra safety.
    callback(match, ++i, str, regex);
    pos = match.index + (match[0].length || 1);
  }
};
/**
 * Copies a regex object and adds flag `g`. The copy maintains extended data, is augmented with
 * `XRegExp.prototype` properties, and has a fresh `lastIndex` property (set to zero). Native
 * regexes are not recompiled using XRegExp syntax.
 *
 * @memberOf XRegExp
 * @param {RegExp} regex Regex to globalize.
 * @returns {RegExp} Copy of the provided regex with flag `g` added.
 * @example
 *
 * const globalCopy = XRegExp.globalize(/regex/);
 * globalCopy.global; // -> true
 */


XRegExp.globalize = function (regex) {
  return copyRegex(regex, {
    addG: true
  });
};
/**
 * Installs optional features according to the specified options. Can be undone using
 * `XRegExp.uninstall`.
 *
 * @memberOf XRegExp
 * @param {Object|String} options Options object or string.
 * @example
 *
 * // With an options object
 * XRegExp.install({
 *   // Enables support for astral code points in Unicode addons (implicitly sets flag A)
 *   astral: true,
 *
 *   // Adds named capture groups to the `groups` property of matches
 *   namespacing: true
 * });
 *
 * // With an options string
 * XRegExp.install('astral namespacing');
 */


XRegExp.install = function (options) {
  options = prepareOptions(options);

  if (!features.astral && options.astral) {
    setAstral(true);
  }

  if (!features.namespacing && options.namespacing) {
    setNamespacing(true);
  }
};
/**
 * Checks whether an individual optional feature is installed.
 *
 * @memberOf XRegExp
 * @param {String} feature Name of the feature to check. One of:
 *   - `astral`
 *   - `namespacing`
 * @returns {Boolean} Whether the feature is installed.
 * @example
 *
 * XRegExp.isInstalled('astral');
 */


XRegExp.isInstalled = function (feature) {
  return !!features[feature];
};
/**
 * Returns `true` if an object is a regex; `false` if it isn't. This works correctly for regexes
 * created in another frame, when `instanceof` and `constructor` checks would fail.
 *
 * @memberOf XRegExp
 * @param {*} value Object to check.
 * @returns {Boolean} Whether the object is a `RegExp` object.
 * @example
 *
 * XRegExp.isRegExp('string'); // -> false
 * XRegExp.isRegExp(/regex/i); // -> true
 * XRegExp.isRegExp(RegExp('^', 'm')); // -> true
 * XRegExp.isRegExp(XRegExp('(?s).')); // -> true
 */


XRegExp.isRegExp = function (value) {
  return toString.call(value) === '[object RegExp]';
}; // isType(value, 'RegExp');

/**
 * Returns the first matched string, or in global mode, an array containing all matched strings.
 * This is essentially a more convenient re-implementation of `String.prototype.match` that gives
 * the result types you actually want (string instead of `exec`-style array in match-first mode,
 * and an empty array instead of `null` when no matches are found in match-all mode). It also lets
 * you override flag g and ignore `lastIndex`, and fixes browser bugs.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp} regex Regex to search with.
 * @param {String} [scope='one'] Use 'one' to return the first match as a string. Use 'all' to
 *   return an array of all matched strings. If not explicitly specified and `regex` uses flag g,
 *   `scope` is 'all'.
 * @returns {String|Array} In match-first mode: First match as a string, or `null`. In match-all
 *   mode: Array of all matched strings, or an empty array.
 * @example
 *
 * // Match first
 * XRegExp.match('abc', /\w/); // -> 'a'
 * XRegExp.match('abc', /\w/g, 'one'); // -> 'a'
 * XRegExp.match('abc', /x/g, 'one'); // -> null
 *
 * // Match all
 * XRegExp.match('abc', /\w/g); // -> ['a', 'b', 'c']
 * XRegExp.match('abc', /\w/, 'all'); // -> ['a', 'b', 'c']
 * XRegExp.match('abc', /x/, 'all'); // -> []
 */


XRegExp.match = function (str, regex, scope) {
  var global = regex.global && scope !== 'one' || scope === 'all';
  var cacheKey = (global ? 'g' : '') + (regex.sticky ? 'y' : '') || 'noGY';
  regex[REGEX_DATA] = regex[REGEX_DATA] || {}; // Shares cached copies with `XRegExp.exec`/`replace`

  var r2 = regex[REGEX_DATA][cacheKey] || (regex[REGEX_DATA][cacheKey] = copyRegex(regex, {
    addG: !!global,
    removeG: scope === 'one',
    isInternalOnly: true
  }));
  var result = nativ.match.call(toObject(str), r2);

  if (regex.global) {
    regex.lastIndex = scope === 'one' && result ? // Can't use `r2.lastIndex` since `r2` is nonglobal in this case
    result.index + result[0].length : 0;
  }

  return global ? result || [] : result && result[0];
};
/**
 * Retrieves the matches from searching a string using a chain of regexes that successively search
 * within previous matches. The provided `chain` array can contain regexes and or objects with
 * `regex` and `backref` properties. When a backreference is specified, the named or numbered
 * backreference is passed forward to the next regex or returned.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {Array} chain Regexes that each search for matches within preceding results.
 * @returns {Array} Matches by the last regex in the chain, or an empty array.
 * @example
 *
 * // Basic usage; matches numbers within <b> tags
 * XRegExp.matchChain('1 <b>2</b> 3 <b>4 a 56</b>', [
 *   XRegExp('(?is)<b>.*?</b>'),
 *   /\d+/
 * ]);
 * // -> ['2', '4', '56']
 *
 * // Passing forward and returning specific backreferences
 * html = '<a href="http://xregexp.com/api/">XRegExp</a>\
 *         <a href="http://www.google.com/">Google</a>';
 * XRegExp.matchChain(html, [
 *   {regex: /<a href="([^"]+)">/i, backref: 1},
 *   {regex: XRegExp('(?i)^https?://(?<domain>[^/?#]+)'), backref: 'domain'}
 * ]);
 * // -> ['xregexp.com', 'www.google.com']
 */


XRegExp.matchChain = function (str, chain) {
  return function recurseChain(values, level) {
    var item = chain[level].regex ? chain[level] : {
      regex: chain[level]
    };
    var matches = [];

    function addMatch(match) {
      if (item.backref) {
        var ERR_UNDEFINED_GROUP = "Backreference to undefined group: ".concat(item.backref);
        var isNamedBackref = isNaN(item.backref);

        if (isNamedBackref && XRegExp.isInstalled('namespacing')) {
          // `groups` has `null` as prototype, so using `in` instead of `hasOwnProperty`
          if (!(item.backref in match.groups)) {
            throw new ReferenceError(ERR_UNDEFINED_GROUP);
          }
        } else if (!match.hasOwnProperty(item.backref)) {
          throw new ReferenceError(ERR_UNDEFINED_GROUP);
        }

        var backrefValue = isNamedBackref && XRegExp.isInstalled('namespacing') ? match.groups[item.backref] : match[item.backref];
        matches.push(backrefValue || '');
      } else {
        matches.push(match[0]);
      }
    }

    var _iteratorNormalCompletion3 = true;
    var _didIteratorError3 = false;
    var _iteratorError3 = undefined;

    try {
      for (var _iterator3 = (0, _getIterator2.default)(values), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
        var value = _step3.value;
        XRegExp.forEach(value, item.regex, addMatch);
      }
    } catch (err) {
      _didIteratorError3 = true;
      _iteratorError3 = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
          _iterator3.return();
        }
      } finally {
        if (_didIteratorError3) {
          throw _iteratorError3;
        }
      }
    }

    return level === chain.length - 1 || !matches.length ? matches : recurseChain(matches, level + 1);
  }([str], 0);
};
/**
 * Returns a new string with one or all matches of a pattern replaced. The pattern can be a string
 * or regex, and the replacement can be a string or a function to be called for each match. To
 * perform a global search and replace, use the optional `scope` argument or include flag g if using
 * a regex. Replacement strings can use `${n}` or `$<n>` for named and numbered backreferences.
 * Replacement functions can use named backreferences via `arguments[0].name`. Also fixes browser
 * bugs compared to the native `String.prototype.replace` and can be used reliably cross-browser.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp|String} search Search pattern to be replaced.
 * @param {String|Function} replacement Replacement string or a function invoked to create it.
 *   Replacement strings can include special replacement syntax:
 *     - $$ - Inserts a literal $ character.
 *     - $&, $0 - Inserts the matched substring.
 *     - $` - Inserts the string that precedes the matched substring (left context).
 *     - $' - Inserts the string that follows the matched substring (right context).
 *     - $n, $nn - Where n/nn are digits referencing an existent capturing group, inserts
 *       backreference n/nn.
 *     - ${n}, $<n> - Where n is a name or any number of digits that reference an existent capturing
 *       group, inserts backreference n.
 *   Replacement functions are invoked with three or more arguments:
 *     - The matched substring (corresponds to $& above). Named backreferences are accessible as
 *       properties of this first argument.
 *     - 0..n arguments, one for each backreference (corresponding to $1, $2, etc. above).
 *     - The zero-based index of the match within the total search string.
 *     - The total string being searched.
 * @param {String} [scope='one'] Use 'one' to replace the first match only, or 'all'. If not
 *   explicitly specified and using a regex with flag g, `scope` is 'all'.
 * @returns {String} New string with one or all matches replaced.
 * @example
 *
 * // Regex search, using named backreferences in replacement string
 * const name = XRegExp('(?<first>\\w+) (?<last>\\w+)');
 * XRegExp.replace('John Smith', name, '$<last>, $<first>');
 * // -> 'Smith, John'
 *
 * // Regex search, using named backreferences in replacement function
 * XRegExp.replace('John Smith', name, (match) => `${match.last}, ${match.first}`);
 * // -> 'Smith, John'
 *
 * // String search, with replace-all
 * XRegExp.replace('RegExp builds RegExps', 'RegExp', 'XRegExp', 'all');
 * // -> 'XRegExp builds XRegExps'
 */


XRegExp.replace = function (str, search, replacement, scope) {
  var isRegex = XRegExp.isRegExp(search);
  var global = search.global && scope !== 'one' || scope === 'all';
  var cacheKey = (global ? 'g' : '') + (search.sticky ? 'y' : '') || 'noGY';
  var s2 = search;

  if (isRegex) {
    search[REGEX_DATA] = search[REGEX_DATA] || {}; // Shares cached copies with `XRegExp.exec`/`match`. Since a copy is used, `search`'s
    // `lastIndex` isn't updated *during* replacement iterations

    s2 = search[REGEX_DATA][cacheKey] || (search[REGEX_DATA][cacheKey] = copyRegex(search, {
      addG: !!global,
      removeG: scope === 'one',
      isInternalOnly: true
    }));
  } else if (global) {
    s2 = new RegExp(XRegExp.escape(String(search)), 'g');
  } // Fixed `replace` required for named backreferences, etc.


  var result = fixed.replace.call(toObject(str), s2, replacement);

  if (isRegex && search.global) {
    // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
    search.lastIndex = 0;
  }

  return result;
};
/**
 * Performs batch processing of string replacements. Used like `XRegExp.replace`, but accepts an
 * array of replacement details. Later replacements operate on the output of earlier replacements.
 * Replacement details are accepted as an array with a regex or string to search for, the
 * replacement string or function, and an optional scope of 'one' or 'all'. Uses the XRegExp
 * replacement text syntax, which supports named backreference properties via `${name}` or
 * `$<name>`.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {Array} replacements Array of replacement detail arrays.
 * @returns {String} New string with all replacements.
 * @example
 *
 * str = XRegExp.replaceEach(str, [
 *   [XRegExp('(?<name>a)'), 'z${name}'],
 *   [/b/gi, 'y'],
 *   [/c/g, 'x', 'one'], // scope 'one' overrides /g
 *   [/d/, 'w', 'all'],  // scope 'all' overrides lack of /g
 *   ['e', 'v', 'all'],  // scope 'all' allows replace-all for strings
 *   [/f/g, ($0) => $0.toUpperCase()]
 * ]);
 */


XRegExp.replaceEach = function (str, replacements) {
  var _iteratorNormalCompletion4 = true;
  var _didIteratorError4 = false;
  var _iteratorError4 = undefined;

  try {
    for (var _iterator4 = (0, _getIterator2.default)(replacements), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
      var r = _step4.value;
      str = XRegExp.replace(str, r[0], r[1], r[2]);
    }
  } catch (err) {
    _didIteratorError4 = true;
    _iteratorError4 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
        _iterator4.return();
      }
    } finally {
      if (_didIteratorError4) {
        throw _iteratorError4;
      }
    }
  }

  return str;
};
/**
 * Splits a string into an array of strings using a regex or string separator. Matches of the
 * separator are not included in the result array. However, if `separator` is a regex that contains
 * capturing groups, backreferences are spliced into the result each time `separator` is matched.
 * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably
 * cross-browser.
 *
 * @memberOf XRegExp
 * @param {String} str String to split.
 * @param {RegExp|String} separator Regex or string to use for separating the string.
 * @param {Number} [limit] Maximum number of items to include in the result array.
 * @returns {Array} Array of substrings.
 * @example
 *
 * // Basic use
 * XRegExp.split('a b c', ' ');
 * // -> ['a', 'b', 'c']
 *
 * // With limit
 * XRegExp.split('a b c', ' ', 2);
 * // -> ['a', 'b']
 *
 * // Backreferences in result array
 * XRegExp.split('..word1..', /([a-z]+)(\d+)/i);
 * // -> ['..', 'word', '1', '..']
 */


XRegExp.split = function (str, separator, limit) {
  return fixed.split.call(toObject(str), separator, limit);
};
/**
 * Executes a regex search in a specified string. Returns `true` or `false`. Optional `pos` and
 * `sticky` arguments specify the search start position, and whether the match must start at the
 * specified position only. The `lastIndex` property of the provided regex is not used, but is
 * updated for compatibility. Also fixes browser bugs compared to the native
 * `RegExp.prototype.test` and can be used reliably cross-browser.
 *
 * @memberOf XRegExp
 * @param {String} str String to search.
 * @param {RegExp} regex Regex to search with.
 * @param {Number} [pos=0] Zero-based index at which to start the search.
 * @param {Boolean|String} [sticky=false] Whether the match must start at the specified position
 *   only. The string `'sticky'` is accepted as an alternative to `true`.
 * @returns {Boolean} Whether the regex matched the provided value.
 * @example
 *
 * // Basic use
 * XRegExp.test('abc', /c/); // -> true
 *
 * // With pos and sticky
 * XRegExp.test('abc', /c/, 0, 'sticky'); // -> false
 * XRegExp.test('abc', /c/, 2, 'sticky'); // -> true
 */
// Do this the easy way :-)


XRegExp.test = function (str, regex, pos, sticky) {
  return !!XRegExp.exec(str, regex, pos, sticky);
};
/**
 * Uninstalls optional features according to the specified options. All optional features start out
 * uninstalled, so this is used to undo the actions of `XRegExp.install`.
 *
 * @memberOf XRegExp
 * @param {Object|String} options Options object or string.
 * @example
 *
 * // With an options object
 * XRegExp.uninstall({
 *   // Disables support for astral code points in Unicode addons
 *   astral: true,
 *
 *   // Don't add named capture groups to the `groups` property of matches
 *   namespacing: true
 * });
 *
 * // With an options string
 * XRegExp.uninstall('astral namespacing');
 */


XRegExp.uninstall = function (options) {
  options = prepareOptions(options);

  if (features.astral && options.astral) {
    setAstral(false);
  }

  if (features.namespacing && options.namespacing) {
    setNamespacing(false);
  }
};
/**
 * Returns an XRegExp object that is the union of the given patterns. Patterns can be provided as
 * regex objects or strings. Metacharacters are escaped in patterns provided as strings.
 * Backreferences in provided regex objects are automatically renumbered to work correctly within
 * the larger combined pattern. Native flags used by provided regexes are ignored in favor of the
 * `flags` argument.
 *
 * @memberOf XRegExp
 * @param {Array} patterns Regexes and strings to combine.
 * @param {String} [flags] Any combination of XRegExp flags.
 * @param {Object} [options] Options object with optional properties:
 *   - `conjunction` {String} Type of conjunction to use: 'or' (default) or 'none'.
 * @returns {RegExp} Union of the provided regexes and strings.
 * @example
 *
 * XRegExp.union(['a+b*c', /(dogs)\1/, /(cats)\1/], 'i');
 * // -> /a\+b\*c|(dogs)\1|(cats)\2/i
 *
 * XRegExp.union([/man/, /bear/, /pig/], 'i', {conjunction: 'none'});
 * // -> /manbearpig/i
 */


XRegExp.union = function (patterns, flags, options) {
  options = options || {};
  var conjunction = options.conjunction || 'or';
  var numCaptures = 0;
  var numPriorCaptures;
  var captureNames;

  function rewrite(match, paren, backref) {
    var name = captureNames[numCaptures - numPriorCaptures]; // Capturing group

    if (paren) {
      ++numCaptures; // If the current capture has a name, preserve the name

      if (name) {
        return "(?<".concat(name, ">");
      } // Backreference

    } else if (backref) {
      // Rewrite the backreference
      return "\\".concat(+backref + numPriorCaptures);
    }

    return match;
  }

  if (!(isType(patterns, 'Array') && patterns.length)) {
    throw new TypeError('Must provide a nonempty array of patterns to merge');
  }

  var parts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;
  var output = [];
  var _iteratorNormalCompletion5 = true;
  var _didIteratorError5 = false;
  var _iteratorError5 = undefined;

  try {
    for (var _iterator5 = (0, _getIterator2.default)(patterns), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
      var pattern = _step5.value;

      if (XRegExp.isRegExp(pattern)) {
        numPriorCaptures = numCaptures;
        captureNames = pattern[REGEX_DATA] && pattern[REGEX_DATA].captureNames || []; // Rewrite backreferences. Passing to XRegExp dies on octals and ensures patterns are
        // independently valid; helps keep this simple. Named captures are put back

        output.push(nativ.replace.call(XRegExp(pattern.source).source, parts, rewrite));
      } else {
        output.push(XRegExp.escape(pattern));
      }
    }
  } catch (err) {
    _didIteratorError5 = true;
    _iteratorError5 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion5 && _iterator5.return != null) {
        _iterator5.return();
      }
    } finally {
      if (_didIteratorError5) {
        throw _iteratorError5;
      }
    }
  }

  var separator = conjunction === 'none' ? '' : '|';
  return XRegExp(output.join(separator), flags);
}; // ==--------------------------==
// Fixed/extended native methods
// ==--------------------------==

/**
 * Adds named capture support (with backreferences returned as `result.name`), and fixes browser
 * bugs in the native `RegExp.prototype.exec`. Use via `XRegExp.exec`.
 *
 * @memberOf RegExp
 * @param {String} str String to search.
 * @returns {Array} Match array with named backreference properties, or `null`.
 */


fixed.exec = function (str) {
  var origLastIndex = this.lastIndex;
  var match = nativ.exec.apply(this, arguments);

  if (match) {
    // Fix browsers whose `exec` methods don't return `undefined` for nonparticipating capturing
    // groups. This fixes IE 5.5-8, but not IE 9's quirks mode or emulation of older IEs. IE 9
    // in standards mode follows the spec.
    if (!correctExecNpcg && match.length > 1 && match.indexOf('') !== -1) {
      var r2 = copyRegex(this, {
        removeG: true,
        isInternalOnly: true
      }); // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
      // matching due to characters outside the match

      nativ.replace.call(String(str).slice(match.index), r2, function () {
        var len = arguments.length; // Skip index 0 and the last 2

        for (var i = 1; i < len - 2; ++i) {
          if ((i < 0 || arguments.length <= i ? undefined : arguments[i]) === undefined) {
            match[i] = undefined;
          }
        }
      });
    } // Attach named capture properties


    var groupsObject = match;

    if (XRegExp.isInstalled('namespacing')) {
      // https://tc39.github.io/proposal-regexp-named-groups/#sec-regexpbuiltinexec
      match.groups = (0, _create.default)(null);
      groupsObject = match.groups;
    }

    if (this[REGEX_DATA] && this[REGEX_DATA].captureNames) {
      // Skip index 0
      for (var i = 1; i < match.length; ++i) {
        var name = this[REGEX_DATA].captureNames[i - 1];

        if (name) {
          groupsObject[name] = match[i];
        }
      }
    } // Fix browsers that increment `lastIndex` after zero-length matches


    if (this.global && !match[0].length && this.lastIndex > match.index) {
      this.lastIndex = match.index;
    }
  }

  if (!this.global) {
    // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
    this.lastIndex = origLastIndex;
  }

  return match;
};
/**
 * Fixes browser bugs in the native `RegExp.prototype.test`.
 *
 * @memberOf RegExp
 * @param {String} str String to search.
 * @returns {Boolean} Whether the regex matched the provided value.
 */


fixed.test = function (str) {
  // Do this the easy way :-)
  return !!fixed.exec.call(this, str);
};
/**
 * Adds named capture support (with backreferences returned as `result.name`), and fixes browser
 * bugs in the native `String.prototype.match`.
 *
 * @memberOf String
 * @param {RegExp|*} regex Regex to search with. If not a regex object, it is passed to `RegExp`.
 * @returns {Array} If `regex` uses flag g, an array of match strings or `null`. Without flag g,
 *   the result of calling `regex.exec(this)`.
 */


fixed.match = function (regex) {
  if (!XRegExp.isRegExp(regex)) {
    // Use the native `RegExp` rather than `XRegExp`
    regex = new RegExp(regex);
  } else if (regex.global) {
    var result = nativ.match.apply(this, arguments); // Fixes IE bug

    regex.lastIndex = 0;
    return result;
  }

  return fixed.exec.call(regex, toObject(this));
};
/**
 * Adds support for `${n}` (or `$<n>`) tokens for named and numbered backreferences in replacement
 * text, and provides named backreferences to replacement functions as `arguments[0].name`. Also
 * fixes browser bugs in replacement text syntax when performing a replacement using a nonregex
 * search value, and the value of a replacement regex's `lastIndex` property during replacement
 * iterations and upon completion. Note that this doesn't support SpiderMonkey's proprietary third
 * (`flags`) argument. Use via `XRegExp.replace`.
 *
 * @memberOf String
 * @param {RegExp|String} search Search pattern to be replaced.
 * @param {String|Function} replacement Replacement string or a function invoked to create it.
 * @returns {String} New string with one or all matches replaced.
 */


fixed.replace = function (search, replacement) {
  var isRegex = XRegExp.isRegExp(search);
  var origLastIndex;
  var captureNames;
  var result;

  if (isRegex) {
    if (search[REGEX_DATA]) {
      captureNames = search[REGEX_DATA].captureNames;
    } // Only needed if `search` is nonglobal


    origLastIndex = search.lastIndex;
  } else {
    search += ''; // Type-convert
  } // Don't use `typeof`; some older browsers return 'function' for regex objects


  if (isType(replacement, 'Function')) {
    // Stringifying `this` fixes a bug in IE < 9 where the last argument in replacement
    // functions isn't type-converted to a string
    result = nativ.replace.call(String(this), search, function () {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }

      if (captureNames) {
        var groupsObject;

        if (XRegExp.isInstalled('namespacing')) {
          // https://tc39.github.io/proposal-regexp-named-groups/#sec-regexpbuiltinexec
          groupsObject = (0, _create.default)(null);
          args.push(groupsObject);
        } else {
          // Change the `args[0]` string primitive to a `String` object that can store
          // properties. This really does need to use `String` as a constructor
          args[0] = new String(args[0]);
          groupsObject = args[0];
        } // Store named backreferences


        for (var i = 0; i < captureNames.length; ++i) {
          if (captureNames[i]) {
            groupsObject[captureNames[i]] = args[i + 1];
          }
        }
      } // Update `lastIndex` before calling `replacement`. Fixes IE, Chrome, Firefox, Safari
      // bug (last tested IE 9, Chrome 17, Firefox 11, Safari 5.1)


      if (isRegex && search.global) {
        search.lastIndex = args[args.length - 2] + args[0].length;
      } // ES6 specs the context for replacement functions as `undefined`


      return replacement.apply(void 0, args);
    });
  } else {
    // Ensure that the last value of `args` will be a string when given nonstring `this`,
    // while still throwing on null or undefined context
    result = nativ.replace.call(this == null ? this : String(this), search, function () {
      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }

      return nativ.replace.call(String(replacement), replacementToken, replacer);

      function replacer($0, bracketed, angled, dollarToken) {
        bracketed = bracketed || angled; // Named or numbered backreference with curly or angled braces

        if (bracketed) {
          // XRegExp behavior for `${n}` or `$<n>`:
          // 1. Backreference to numbered capture, if `n` is an integer. Use `0` for the
          //    entire match. Any number of leading zeros may be used.
          // 2. Backreference to named capture `n`, if it exists and is not an integer
          //    overridden by numbered capture. In practice, this does not overlap with
          //    numbered capture since XRegExp does not allow named capture to use a bare
          //    integer as the name.
          // 3. If the name or number does not refer to an existing capturing group, it's
          //    an error.
          var n = +bracketed; // Type-convert; drop leading zeros

          if (n <= args.length - 3) {
            return args[n] || '';
          } // Groups with the same name is an error, else would need `lastIndexOf`


          n = captureNames ? captureNames.indexOf(bracketed) : -1;

          if (n < 0) {
            throw new SyntaxError("Backreference to undefined group ".concat($0));
          }

          return args[n + 1] || '';
        } // Else, special variable or numbered backreference without curly braces


        if (dollarToken === '$') {
          // $$
          return '$';
        }

        if (dollarToken === '&' || +dollarToken === 0) {
          // $&, $0 (not followed by 1-9), $00
          return args[0];
        }

        if (dollarToken === '`') {
          // $` (left context)
          return args[args.length - 1].slice(0, args[args.length - 2]);
        }

        if (dollarToken === "'") {
          // $' (right context)
          return args[args.length - 1].slice(args[args.length - 2] + args[0].length);
        } // Else, numbered backreference without braces


        dollarToken = +dollarToken; // Type-convert; drop leading zero
        // XRegExp behavior for `$n` and `$nn`:
        // - Backrefs end after 1 or 2 digits. Use `${..}` or `$<..>` for more digits.
        // - `$1` is an error if no capturing groups.
        // - `$10` is an error if less than 10 capturing groups. Use `${1}0` or `$<1>0`
        //   instead.
        // - `$01` is `$1` if at least one capturing group, else it's an error.
        // - `$0` (not followed by 1-9) and `$00` are the entire match.
        // Native behavior, for comparison:
        // - Backrefs end after 1 or 2 digits. Cannot reference capturing group 100+.
        // - `$1` is a literal `$1` if no capturing groups.
        // - `$10` is `$1` followed by a literal `0` if less than 10 capturing groups.
        // - `$01` is `$1` if at least one capturing group, else it's a literal `$01`.
        // - `$0` is a literal `$0`.

        if (!isNaN(dollarToken)) {
          if (dollarToken > args.length - 3) {
            throw new SyntaxError("Backreference to undefined group ".concat($0));
          }

          return args[dollarToken] || '';
        } // `$` followed by an unsupported char is an error, unlike native JS


        throw new SyntaxError("Invalid token ".concat($0));
      }
    });
  }

  if (isRegex) {
    if (search.global) {
      // Fixes IE, Safari bug (last tested IE 9, Safari 5.1)
      search.lastIndex = 0;
    } else {
      // Fixes IE, Opera bug (last tested IE 9, Opera 11.6)
      search.lastIndex = origLastIndex;
    }
  }

  return result;
};
/**
 * Fixes browser bugs in the native `String.prototype.split`. Use via `XRegExp.split`.
 *
 * @memberOf String
 * @param {RegExp|String} separator Regex or string to use for separating the string.
 * @param {Number} [limit] Maximum number of items to include in the result array.
 * @returns {Array} Array of substrings.
 */


fixed.split = function (separator, limit) {
  if (!XRegExp.isRegExp(separator)) {
    // Browsers handle nonregex split correctly, so use the faster native method
    return nativ.split.apply(this, arguments);
  }

  var str = String(this);
  var output = [];
  var origLastIndex = separator.lastIndex;
  var lastLastIndex = 0;
  var lastLength; // Values for `limit`, per the spec:
  // If undefined: pow(2,32) - 1
  // If 0, Infinity, or NaN: 0
  // If positive number: limit = floor(limit); if (limit >= pow(2,32)) limit -= pow(2,32);
  // If negative number: pow(2,32) - floor(abs(limit))
  // If other: Type-convert, then use the above rules
  // This line fails in very strange ways for some values of `limit` in Opera 10.5-10.63, unless
  // Opera Dragonfly is open (go figure). It works in at least Opera 9.5-10.1 and 11+

  limit = (limit === undefined ? -1 : limit) >>> 0;
  XRegExp.forEach(str, separator, function (match) {
    // This condition is not the same as `if (match[0].length)`
    if (match.index + match[0].length > lastLastIndex) {
      output.push(str.slice(lastLastIndex, match.index));

      if (match.length > 1 && match.index < str.length) {
        Array.prototype.push.apply(output, match.slice(1));
      }

      lastLength = match[0].length;
      lastLastIndex = match.index + lastLength;
    }
  });

  if (lastLastIndex === str.length) {
    if (!nativ.test.call(separator, '') || lastLength) {
      output.push('');
    }
  } else {
    output.push(str.slice(lastLastIndex));
  }

  separator.lastIndex = origLastIndex;
  return output.length > limit ? output.slice(0, limit) : output;
}; // ==--------------------------==
// Built-in syntax/flag tokens
// ==--------------------------==

/*
 * Letter escapes that natively match literal characters: `\a`, `\A`, etc. These should be
 * SyntaxErrors but are allowed in web reality. XRegExp makes them errors for cross-browser
 * consistency and to reserve their syntax, but lets them be superseded by addons.
 */


XRegExp.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/, function (match, scope) {
  // \B is allowed in default scope only
  if (match[1] === 'B' && scope === defaultScope) {
    return match[0];
  }

  throw new SyntaxError("Invalid escape ".concat(match[0]));
}, {
  scope: 'all',
  leadChar: '\\'
});
/*
 * Unicode code point escape with curly braces: `\u{N..}`. `N..` is any one or more digit
 * hexadecimal number from 0-10FFFF, and can include leading zeros. Requires the native ES6 `u` flag
 * to support code points greater than U+FFFF. Avoids converting code points above U+FFFF to
 * surrogate pairs (which could be done without flag `u`), since that could lead to broken behavior
 * if you follow a `\u{N..}` token that references a code point above U+FFFF with a quantifier, or
 * if you use the same in a character class.
 */

XRegExp.addToken(/\\u{([\dA-Fa-f]+)}/, function (match, scope, flags) {
  var code = dec(match[1]);

  if (code > 0x10FFFF) {
    throw new SyntaxError("Invalid Unicode code point ".concat(match[0]));
  }

  if (code <= 0xFFFF) {
    // Converting to \uNNNN avoids needing to escape the literal character and keep it
    // separate from preceding tokens
    return "\\u".concat(pad4(hex(code)));
  } // If `code` is between 0xFFFF and 0x10FFFF, require and defer to native handling


  if (hasNativeU && flags.indexOf('u') !== -1) {
    return match[0];
  }

  throw new SyntaxError('Cannot use Unicode code point above \\u{FFFF} without flag u');
}, {
  scope: 'all',
  leadChar: '\\'
});
/*
 * Empty character class: `[]` or `[^]`. This fixes a critical cross-browser syntax inconsistency.
 * Unless this is standardized (per the ES spec), regex syntax can't be accurately parsed because
 * character class endings can't be determined.
 */

XRegExp.addToken(/\[(\^?)\]/, // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S].
// (?!) should work like \b\B, but is unreliable in some versions of Firefox

/* eslint-disable no-confusing-arrow */
function (match) {
  return match[1] ? '[\\s\\S]' : '\\b\\B';
},
/* eslint-enable no-confusing-arrow */
{
  leadChar: '['
});
/*
 * Comment pattern: `(?# )`. Inline comments are an alternative to the line comments allowed in
 * free-spacing mode (flag x).
 */

XRegExp.addToken(/\(\?#[^)]*\)/, getContextualTokenSeparator, {
  leadChar: '('
});
/*
 * Whitespace and line comments, in free-spacing mode (aka extended mode, flag x) only.
 */

XRegExp.addToken(/\s+|#[^\n]*\n?/, getContextualTokenSeparator, {
  flag: 'x'
});
/*
 * Dot, in dotall mode (aka singleline mode, flag s) only.
 */

XRegExp.addToken(/\./, function () {
  return '[\\s\\S]';
}, {
  flag: 's',
  leadChar: '.'
});
/*
 * Named backreference: `\k<name>`. Backreference names can use the characters A-Z, a-z, 0-9, _,
 * and $ only. Also allows numbered backreferences as `\k<n>`.
 */

XRegExp.addToken(/\\k<([\w$]+)>/, function (match) {
  // Groups with the same name is an error, else would need `lastIndexOf`
  var index = isNaN(match[1]) ? this.captureNames.indexOf(match[1]) + 1 : +match[1];
  var endIndex = match.index + match[0].length;

  if (!index || index > this.captureNames.length) {
    throw new SyntaxError("Backreference to undefined group ".concat(match[0]));
  } // Keep backreferences separate from subsequent literal numbers. This avoids e.g.
  // inadvertedly changing `(?<n>)\k<n>1` to `()\11`.


  return "\\".concat(index).concat(endIndex === match.input.length || isNaN(match.input[endIndex]) ? '' : '(?:)');
}, {
  leadChar: '\\'
});
/*
 * Numbered backreference or octal, plus any following digits: `\0`, `\11`, etc. Octals except `\0`
 * not followed by 0-9 and backreferences to unopened capture groups throw an error. Other matches
 * are returned unaltered. IE < 9 doesn't support backreferences above `\99` in regex syntax.
 */

XRegExp.addToken(/\\(\d+)/, function (match, scope) {
  if (!(scope === defaultScope && /^[1-9]/.test(match[1]) && +match[1] <= this.captureNames.length) && match[1] !== '0') {
    throw new SyntaxError("Cannot use octal escape or backreference to undefined group ".concat(match[0]));
  }

  return match[0];
}, {
  scope: 'all',
  leadChar: '\\'
});
/*
 * Named capturing group; match the opening delimiter only: `(?<name>`. Capture names can use the
 * characters A-Z, a-z, 0-9, _, and $ only. Names can't be integers. Supports Python-style
 * `(?P<name>` as an alternate syntax to avoid issues in some older versions of Opera which natively
 * supported the Python-style syntax. Otherwise, XRegExp might treat numbered backreferences to
 * Python-style named capture as octals.
 */

XRegExp.addToken(/\(\?P?<([\w$]+)>/, function (match) {
  // Disallow bare integers as names because named backreferences are added to match arrays
  // and therefore numeric properties may lead to incorrect lookups
  if (!isNaN(match[1])) {
    throw new SyntaxError("Cannot use integer as capture name ".concat(match[0]));
  }

  if (!XRegExp.isInstalled('namespacing') && (match[1] === 'length' || match[1] === '__proto__')) {
    throw new SyntaxError("Cannot use reserved word as capture name ".concat(match[0]));
  }

  if (this.captureNames.indexOf(match[1]) !== -1) {
    throw new SyntaxError("Cannot use same name for multiple groups ".concat(match[0]));
  }

  this.captureNames.push(match[1]);
  this.hasNamedCapture = true;
  return '(';
}, {
  leadChar: '('
});
/*
 * Capturing group; match the opening parenthesis only. Required for support of named capturing
 * groups. Also adds explicit capture mode (flag n).
 */

XRegExp.addToken(/\((?!\?)/, function (match, scope, flags) {
  if (flags.indexOf('n') !== -1) {
    return '(?:';
  }

  this.captureNames.push(null);
  return '(';
}, {
  optionalFlags: 'n',
  leadChar: '('
});
var _default = XRegExp;
exports.default = _default;
module.exports = exports["default"];

/***/ }),
/* 396 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(397);

/***/ }),
/* 397 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(398);
var $Object = __webpack_require__(39).Object;
module.exports = function create(P, D) {
  return $Object.create(P, D);
};


/***/ }),
/* 398 */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(60);
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', { create: __webpack_require__(163) });


/***/ }),
/* 399 */
/***/ (function(module, exports, __webpack_require__) {

// optional / simple context binding
var aFunction = __webpack_require__(400);
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),
/* 400 */
/***/ (function(module, exports) {

module.exports = function (it) {
  if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  return it;
};


/***/ }),
/* 401 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = !__webpack_require__(81) && !__webpack_require__(111)(function () {
  return Object.defineProperty(__webpack_require__(161)('div'), 'a', { get: function () { return 7; } }).a != 7;
});


/***/ }),
/* 402 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(110);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
  if (!isObject(it)) return it;
  var fn, val;
  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  throw TypeError("Can't convert object to primitive value");
};


/***/ }),
/* 403 */
/***/ (function(module, exports, __webpack_require__) {

var dP = __webpack_require__(109);
var anObject = __webpack_require__(80);
var getKeys = __webpack_require__(404);

module.exports = __webpack_require__(81) ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = getKeys(Properties);
  var length = keys.length;
  var i = 0;
  var P;
  while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  return O;
};


/***/ }),
/* 404 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(405);
var enumBugKeys = __webpack_require__(167);

module.exports = Object.keys || function keys(O) {
  return $keys(O, enumBugKeys);
};


/***/ }),
/* 405 */
/***/ (function(module, exports, __webpack_require__) {

var has = __webpack_require__(82);
var toIObject = __webpack_require__(112);
var arrayIndexOf = __webpack_require__(407)(false);
var IE_PROTO = __webpack_require__(115)('IE_PROTO');

module.exports = function (object, names) {
  var O = toIObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~arrayIndexOf(result, key) || result.push(key);
  }
  return result;
};


/***/ }),
/* 406 */
/***/ (function(module, exports, __webpack_require__) {

// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(113);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  return cof(it) == 'String' ? it.split('') : Object(it);
};


/***/ }),
/* 407 */
/***/ (function(module, exports, __webpack_require__) {

// false -> Array#indexOf
// true  -> Array#includes
var toIObject = __webpack_require__(112);
var toLength = __webpack_require__(408);
var toAbsoluteIndex = __webpack_require__(409);
module.exports = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
      if (O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};


/***/ }),
/* 408 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.15 ToLength
var toInteger = __webpack_require__(114);
var min = Math.min;
module.exports = function (it) {
  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};


/***/ }),
/* 409 */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(114);
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
  index = toInteger(index);
  return index < 0 ? max(index + length, 0) : min(index, length);
};


/***/ }),
/* 410 */
/***/ (function(module, exports, __webpack_require__) {

var document = __webpack_require__(38).document;
module.exports = document && document.documentElement;


/***/ }),
/* 411 */
/***/ (function(module, exports, __webpack_require__) {

var arrayWithHoles = __webpack_require__(412);

var iterableToArrayLimit = __webpack_require__(417);

var nonIterableRest = __webpack_require__(432);

function _slicedToArray(arr, i) {
  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
}

module.exports = _slicedToArray;

/***/ }),
/* 412 */
/***/ (function(module, exports, __webpack_require__) {

var _Array$isArray = __webpack_require__(413);

function _arrayWithHoles(arr) {
  if (_Array$isArray(arr)) return arr;
}

module.exports = _arrayWithHoles;

/***/ }),
/* 413 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(414);

/***/ }),
/* 414 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(415);
module.exports = __webpack_require__(39).Array.isArray;


/***/ }),
/* 415 */
/***/ (function(module, exports, __webpack_require__) {

// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
var $export = __webpack_require__(60);

$export($export.S, 'Array', { isArray: __webpack_require__(416) });


/***/ }),
/* 416 */
/***/ (function(module, exports, __webpack_require__) {

// 7.2.2 IsArray(argument)
var cof = __webpack_require__(113);
module.exports = Array.isArray || function isArray(arg) {
  return cof(arg) == 'Array';
};


/***/ }),
/* 417 */
/***/ (function(module, exports, __webpack_require__) {

var _getIterator = __webpack_require__(116);

function _iterableToArrayLimit(arr, i) {
  var _arr = [];
  var _n = true;
  var _d = false;
  var _e = undefined;

  try {
    for (var _i = _getIterator(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
      _arr.push(_s.value);

      if (i && _arr.length === i) break;
    }
  } catch (err) {
    _d = true;
    _e = err;
  } finally {
    try {
      if (!_n && _i["return"] != null) _i["return"]();
    } finally {
      if (_d) throw _e;
    }
  }

  return _arr;
}

module.exports = _iterableToArrayLimit;

/***/ }),
/* 418 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(419);
__webpack_require__(427);
module.exports = __webpack_require__(429);


/***/ }),
/* 419 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(420);
var global = __webpack_require__(38);
var hide = __webpack_require__(61);
var Iterators = __webpack_require__(84);
var TO_STRING_TAG = __webpack_require__(46)('toStringTag');

var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
  'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
  'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
  'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
  'TextTrackList,TouchList').split(',');

for (var i = 0; i < DOMIterables.length; i++) {
  var NAME = DOMIterables[i];
  var Collection = global[NAME];
  var proto = Collection && Collection.prototype;
  if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
  Iterators[NAME] = Iterators.Array;
}


/***/ }),
/* 420 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var addToUnscopables = __webpack_require__(421);
var step = __webpack_require__(422);
var Iterators = __webpack_require__(84);
var toIObject = __webpack_require__(112);

// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(168)(Array, 'Array', function (iterated, kind) {
  this._t = toIObject(iterated); // target
  this._i = 0;                   // next index
  this._k = kind;                // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var kind = this._k;
  var index = this._i++;
  if (!O || index >= O.length) {
    this._t = undefined;
    return step(1);
  }
  if (kind == 'keys') return step(0, index);
  if (kind == 'values') return step(0, O[index]);
  return step(0, [index, O[index]]);
}, 'values');

// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;

addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');


/***/ }),
/* 421 */
/***/ (function(module, exports) {

module.exports = function () { /* empty */ };


/***/ }),
/* 422 */
/***/ (function(module, exports) {

module.exports = function (done, value) {
  return { value: value, done: !!done };
};


/***/ }),
/* 423 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(61);


/***/ }),
/* 424 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var create = __webpack_require__(163);
var descriptor = __webpack_require__(162);
var setToStringTag = __webpack_require__(169);
var IteratorPrototype = {};

// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(61)(IteratorPrototype, __webpack_require__(46)('iterator'), function () { return this; });

module.exports = function (Constructor, NAME, next) {
  Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  setToStringTag(Constructor, NAME + ' Iterator');
};


/***/ }),
/* 425 */
/***/ (function(module, exports, __webpack_require__) {

// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(82);
var toObject = __webpack_require__(426);
var IE_PROTO = __webpack_require__(115)('IE_PROTO');
var ObjectProto = Object.prototype;

module.exports = Object.getPrototypeOf || function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectProto : null;
};


/***/ }),
/* 426 */
/***/ (function(module, exports, __webpack_require__) {

// 7.1.13 ToObject(argument)
var defined = __webpack_require__(83);
module.exports = function (it) {
  return Object(defined(it));
};


/***/ }),
/* 427 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $at = __webpack_require__(428)(true);

// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(168)(String, 'String', function (iterated) {
  this._t = String(iterated); // target
  this._i = 0;                // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var index = this._i;
  var point;
  if (index >= O.length) return { value: undefined, done: true };
  point = $at(O, index);
  this._i += point.length;
  return { value: point, done: false };
});


/***/ }),
/* 428 */
/***/ (function(module, exports, __webpack_require__) {

var toInteger = __webpack_require__(114);
var defined = __webpack_require__(83);
// true  -> String#at
// false -> String#codePointAt
module.exports = function (TO_STRING) {
  return function (that, pos) {
    var s = String(defined(that));
    var i = toInteger(pos);
    var l = s.length;
    var a, b;
    if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
    a = s.charCodeAt(i);
    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
      ? TO_STRING ? s.charAt(i) : a
      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  };
};


/***/ }),
/* 429 */
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(80);
var get = __webpack_require__(430);
module.exports = __webpack_require__(39).getIterator = function (it) {
  var iterFn = get(it);
  if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  return anObject(iterFn.call(it));
};


/***/ }),
/* 430 */
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(431);
var ITERATOR = __webpack_require__(46)('iterator');
var Iterators = __webpack_require__(84);
module.exports = __webpack_require__(39).getIteratorMethod = function (it) {
  if (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};


/***/ }),
/* 431 */
/***/ (function(module, exports, __webpack_require__) {

// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(113);
var TAG = __webpack_require__(46)('toStringTag');
// ES3 wrong here
var ARG = cof(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (e) { /* empty */ }
};

module.exports = function (it) {
  var O, T, B;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
    // builtinTag case
    : ARG ? cof(O)
    // ES3 arguments fallback
    : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};


/***/ }),
/* 432 */
/***/ (function(module, exports) {

function _nonIterableRest() {
  throw new TypeError("Invalid attempt to destructure non-iterable instance");
}

module.exports = _nonIterableRest;

/***/ }),
/* 433 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(434);

/***/ }),
/* 434 */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(435);
module.exports = __webpack_require__(39).parseInt;


/***/ }),
/* 435 */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(60);
var $parseInt = __webpack_require__(436);
// 18.2.5 parseInt(string, radix)
$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });


/***/ }),
/* 436 */
/***/ (function(module, exports, __webpack_require__) {

var $parseInt = __webpack_require__(38).parseInt;
var $trim = __webpack_require__(437).trim;
var ws = __webpack_require__(170);
var hex = /^[-+]?0[xX]/;

module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
  var string = $trim(String(str), 3);
  return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
} : $parseInt;


/***/ }),
/* 437 */
/***/ (function(module, exports, __webpack_require__) {

var $export = __webpack_require__(60);
var defined = __webpack_require__(83);
var fails = __webpack_require__(111);
var spaces = __webpack_require__(170);
var space = '[' + spaces + ']';
var non = '\u200b\u0085';
var ltrim = RegExp('^' + space + space + '*');
var rtrim = RegExp(space + space + '*$');

var exporter = function (KEY, exec, ALIAS) {
  var exp = {};
  var FORCE = fails(function () {
    return !!spaces[KEY]() || non[KEY]() != non;
  });
  var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
  if (ALIAS) exp[ALIAS] = fn;
  $export($export.P + $export.F * FORCE, 'String', exp);
};

// 1 -> String#trimLeft
// 2 -> String#trimRight
// 3 -> String#trim
var trim = exporter.trim = function (string, TYPE) {
  string = String(defined(string));
  if (TYPE & 1) string = string.replace(ltrim, '');
  if (TYPE & 2) string = string.replace(rtrim, '');
  return string;
};

module.exports = exporter;


/***/ }),
/* 438 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

/*!
 * XRegExp.build 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2012-present MIT License
 */
var _default = function _default(XRegExp) {
  var REGEX_DATA = 'xregexp';
  var subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;
  var parts = XRegExp.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/, subParts], 'g', {
    conjunction: 'or'
  });
  /**
   * Strips a leading `^` and trailing unescaped `$`, if both are present.
   *
   * @private
   * @param {String} pattern Pattern to process.
   * @returns {String} Pattern with edge anchors removed.
   */

  function deanchor(pattern) {
    // Allow any number of empty noncapturing groups before/after anchors, because regexes
    // built/generated by XRegExp sometimes include them
    var leadingAnchor = /^(?:\(\?:\))*\^/;
    var trailingAnchor = /\$(?:\(\?:\))*$/;

    if (leadingAnchor.test(pattern) && trailingAnchor.test(pattern) && // Ensure that the trailing `$` isn't escaped
    trailingAnchor.test(pattern.replace(/\\[\s\S]/g, ''))) {
      return pattern.replace(leadingAnchor, '').replace(trailingAnchor, '');
    }

    return pattern;
  }
  /**
   * Converts the provided value to an XRegExp. Native RegExp flags are not preserved.
   *
   * @private
   * @param {String|RegExp} value Value to convert.
   * @param {Boolean} [addFlagX] Whether to apply the `x` flag in cases when `value` is not
   *   already a regex generated by XRegExp
   * @returns {RegExp} XRegExp object with XRegExp syntax applied.
   */


  function asXRegExp(value, addFlagX) {
    var flags = addFlagX ? 'x' : '';
    return XRegExp.isRegExp(value) ? value[REGEX_DATA] && value[REGEX_DATA].captureNames ? // Don't recompile, to preserve capture names
    value : // Recompile as XRegExp
    XRegExp(value.source, flags) : // Compile string as XRegExp
    XRegExp(value, flags);
  }

  function interpolate(substitution) {
    return substitution instanceof RegExp ? substitution : XRegExp.escape(substitution);
  }

  function reduceToSubpatternsObject(subpatterns, interpolated, subpatternIndex) {
    subpatterns["subpattern".concat(subpatternIndex)] = interpolated;
    return subpatterns;
  }

  function embedSubpatternAfter(raw, subpatternIndex, rawLiterals) {
    var hasSubpattern = subpatternIndex < rawLiterals.length - 1;
    return raw + (hasSubpattern ? "{{subpattern".concat(subpatternIndex, "}}") : '');
  }
  /**
   * Provides tagged template literals that create regexes with XRegExp syntax and flags. The
   * provided pattern is handled as a raw string, so backslashes don't need to be escaped.
   *
   * Interpolation of strings and regexes shares the features of `XRegExp.build`. Interpolated
   * patterns are treated as atomic units when quantified, interpolated strings have their special
   * characters escaped, a leading `^` and trailing unescaped `$` are stripped from interpolated
   * regexes if both are present, and any backreferences within an interpolated regex are
   * rewritten to work within the overall pattern.
   *
   * @memberOf XRegExp
   * @param {String} [flags] Any combination of XRegExp flags.
   * @returns {Function} Handler for template literals that construct regexes with XRegExp syntax.
   * @example
   *
   * const h12 = /1[0-2]|0?[1-9]/;
   * const h24 = /2[0-3]|[01][0-9]/;
   * const hours = XRegExp.tag('x')`${h12} : | ${h24}`;
   * const minutes = /^[0-5][0-9]$/;
   * // Note that explicitly naming the 'minutes' group is required for named backreferences
   * const time = XRegExp.tag('x')`^ ${hours} (?<minutes>${minutes}) $`;
   * time.test('10:59'); // -> true
   * XRegExp.exec('10:59', time).minutes; // -> '59'
   */


  XRegExp.tag = function (flags) {
    return function (literals) {
      for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        substitutions[_key - 1] = arguments[_key];
      }

      var subpatterns = substitutions.map(interpolate).reduce(reduceToSubpatternsObject, {});
      var pattern = literals.raw.map(embedSubpatternAfter).join('');
      return XRegExp.build(pattern, subpatterns, flags);
    };
  };
  /**
   * Builds regexes using named subpatterns, for readability and pattern reuse. Backreferences in
   * the outer pattern and provided subpatterns are automatically renumbered to work correctly.
   * Native flags used by provided subpatterns are ignored in favor of the `flags` argument.
   *
   * @memberOf XRegExp
   * @param {String} pattern XRegExp pattern using `{{name}}` for embedded subpatterns. Allows
   *   `({{name}})` as shorthand for `(?<name>{{name}})`. Patterns cannot be embedded within
   *   character classes.
   * @param {Object} subs Lookup object for named subpatterns. Values can be strings or regexes. A
   *   leading `^` and trailing unescaped `$` are stripped from subpatterns, if both are present.
   * @param {String} [flags] Any combination of XRegExp flags.
   * @returns {RegExp} Regex with interpolated subpatterns.
   * @example
   *
   * const time = XRegExp.build('(?x)^ {{hours}} ({{minutes}}) $', {
   *   hours: XRegExp.build('{{h12}} : | {{h24}}', {
   *     h12: /1[0-2]|0?[1-9]/,
   *     h24: /2[0-3]|[01][0-9]/
   *   }, 'x'),
   *   minutes: /^[0-5][0-9]$/
   * });
   * time.test('10:59'); // -> true
   * XRegExp.exec('10:59', time).minutes; // -> '59'
   */


  XRegExp.build = function (pattern, subs, flags) {
    flags = flags || ''; // Used with `asXRegExp` calls for `pattern` and subpatterns in `subs`, to work around how
    // some browsers convert `RegExp('\n')` to a regex that contains the literal characters `\`
    // and `n`. See more details at <https://github.com/slevithan/xregexp/pull/163>.

    var addFlagX = flags.indexOf('x') !== -1;
    var inlineFlags = /^\(\?([\w$]+)\)/.exec(pattern); // Add flags within a leading mode modifier to the overall pattern's flags

    if (inlineFlags) {
      flags = XRegExp._clipDuplicates(flags + inlineFlags[1]);
    }

    var data = {};

    for (var p in subs) {
      if (subs.hasOwnProperty(p)) {
        // Passing to XRegExp enables extended syntax and ensures independent validity,
        // lest an unescaped `(`, `)`, `[`, or trailing `\` breaks the `(?:)` wrapper. For
        // subpatterns provided as native regexes, it dies on octals and adds the property
        // used to hold extended regex instance data, for simplicity.
        var sub = asXRegExp(subs[p], addFlagX);
        data[p] = {
          // Deanchoring allows embedding independently useful anchored regexes. If you
          // really need to keep your anchors, double them (i.e., `^^...$$`).
          pattern: deanchor(sub.source),
          names: sub[REGEX_DATA].captureNames || []
        };
      }
    } // Passing to XRegExp dies on octals and ensures the outer pattern is independently valid;
    // helps keep this simple. Named captures will be put back.


    var patternAsRegex = asXRegExp(pattern, addFlagX); // 'Caps' is short for 'captures'

    var numCaps = 0;
    var numPriorCaps;
    var numOuterCaps = 0;
    var outerCapsMap = [0];
    var outerCapNames = patternAsRegex[REGEX_DATA].captureNames || [];
    var output = patternAsRegex.source.replace(parts, function ($0, $1, $2, $3, $4) {
      var subName = $1 || $2;
      var capName;
      var intro;
      var localCapIndex; // Named subpattern

      if (subName) {
        if (!data.hasOwnProperty(subName)) {
          throw new ReferenceError("Undefined property ".concat($0));
        } // Named subpattern was wrapped in a capturing group


        if ($1) {
          capName = outerCapNames[numOuterCaps];
          outerCapsMap[++numOuterCaps] = ++numCaps; // If it's a named group, preserve the name. Otherwise, use the subpattern name
          // as the capture name

          intro = "(?<".concat(capName || subName, ">");
        } else {
          intro = '(?:';
        }

        numPriorCaps = numCaps;
        var rewrittenSubpattern = data[subName].pattern.replace(subParts, function (match, paren, backref) {
          // Capturing group
          if (paren) {
            capName = data[subName].names[numCaps - numPriorCaps];
            ++numCaps; // If the current capture has a name, preserve the name

            if (capName) {
              return "(?<".concat(capName, ">");
            } // Backreference

          } else if (backref) {
            localCapIndex = +backref - 1; // Rewrite the backreference

            return data[subName].names[localCapIndex] ? // Need to preserve the backreference name in case using flag `n`
            "\\k<".concat(data[subName].names[localCapIndex], ">") : "\\".concat(+backref + numPriorCaps);
          }

          return match;
        });
        return "".concat(intro).concat(rewrittenSubpattern, ")");
      } // Capturing group


      if ($3) {
        capName = outerCapNames[numOuterCaps];
        outerCapsMap[++numOuterCaps] = ++numCaps; // If the current capture has a name, preserve the name

        if (capName) {
          return "(?<".concat(capName, ">");
        } // Backreference

      } else if ($4) {
        localCapIndex = +$4 - 1; // Rewrite the backreference

        return outerCapNames[localCapIndex] ? // Need to preserve the backreference name in case using flag `n`
        "\\k<".concat(outerCapNames[localCapIndex], ">") : "\\".concat(outerCapsMap[+$4]);
      }

      return $0;
    });
    return XRegExp(output, flags);
  };
};

exports.default = _default;
module.exports = exports["default"];

/***/ }),
/* 439 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

/*!
 * XRegExp.matchRecursive 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2009-present MIT License
 */
var _default = function _default(XRegExp) {
  /**
   * Returns a match detail object composed of the provided values.
   *
   * @private
   */
  function row(name, value, start, end) {
    return {
      name: name,
      value: value,
      start: start,
      end: end
    };
  }
  /**
   * Returns an array of match strings between outermost left and right delimiters, or an array of
   * objects with detailed match parts and position data. An error is thrown if delimiters are
   * unbalanced within the data.
   *
   * @memberOf XRegExp
   * @param {String} str String to search.
   * @param {String} left Left delimiter as an XRegExp pattern.
   * @param {String} right Right delimiter as an XRegExp pattern.
   * @param {String} [flags] Any native or XRegExp flags, used for the left and right delimiters.
   * @param {Object} [options] Lets you specify `valueNames` and `escapeChar` options.
   * @returns {Array} Array of matches, or an empty array.
   * @example
   *
   * // Basic usage
   * let str = '(t((e))s)t()(ing)';
   * XRegExp.matchRecursive(str, '\\(', '\\)', 'g');
   * // -> ['t((e))s', '', 'ing']
   *
   * // Extended information mode with valueNames
   * str = 'Here is <div> <div>an</div></div> example';
   * XRegExp.matchRecursive(str, '<div\\s*>', '</div>', 'gi', {
   *   valueNames: ['between', 'left', 'match', 'right']
   * });
   * // -> [
   * // {name: 'between', value: 'Here is ',       start: 0,  end: 8},
   * // {name: 'left',    value: '<div>',          start: 8,  end: 13},
   * // {name: 'match',   value: ' <div>an</div>', start: 13, end: 27},
   * // {name: 'right',   value: '</div>',         start: 27, end: 33},
   * // {name: 'between', value: ' example',       start: 33, end: 41}
   * // ]
   *
   * // Omitting unneeded parts with null valueNames, and using escapeChar
   * str = '...{1}.\\{{function(x,y){return {y:x}}}';
   * XRegExp.matchRecursive(str, '{', '}', 'g', {
   *   valueNames: ['literal', null, 'value', null],
   *   escapeChar: '\\'
   * });
   * // -> [
   * // {name: 'literal', value: '...',  start: 0, end: 3},
   * // {name: 'value',   value: '1',    start: 4, end: 5},
   * // {name: 'literal', value: '.\\{', start: 6, end: 9},
   * // {name: 'value',   value: 'function(x,y){return {y:x}}', start: 10, end: 37}
   * // ]
   *
   * // Sticky mode via flag y
   * str = '<1><<<2>>><3>4<5>';
   * XRegExp.matchRecursive(str, '<', '>', 'gy');
   * // -> ['1', '<<2>>', '3']
   */


  XRegExp.matchRecursive = function (str, left, right, flags, options) {
    flags = flags || '';
    options = options || {};
    var global = flags.indexOf('g') !== -1;
    var sticky = flags.indexOf('y') !== -1; // Flag `y` is controlled internally

    var basicFlags = flags.replace(/y/g, '');
    var _options = options,
        escapeChar = _options.escapeChar;
    var vN = options.valueNames;
    var output = [];
    var openTokens = 0;
    var delimStart = 0;
    var delimEnd = 0;
    var lastOuterEnd = 0;
    var outerStart;
    var innerStart;
    var leftMatch;
    var rightMatch;
    var esc;
    left = XRegExp(left, basicFlags);
    right = XRegExp(right, basicFlags);

    if (escapeChar) {
      if (escapeChar.length > 1) {
        throw new Error('Cannot use more than one escape character');
      }

      escapeChar = XRegExp.escape(escapeChar); // Example of concatenated `esc` regex:
      // `escapeChar`: '%'
      // `left`: '<'
      // `right`: '>'
      // Regex is: /(?:%[\S\s]|(?:(?!<|>)[^%])+)+/

      esc = new RegExp("(?:".concat(escapeChar, "[\\S\\s]|(?:(?!").concat( // Using `XRegExp.union` safely rewrites backreferences in `left` and `right`.
      // Intentionally not passing `basicFlags` to `XRegExp.union` since any syntax
      // transformation resulting from those flags was already applied to `left` and
      // `right` when they were passed through the XRegExp constructor above.
      XRegExp.union([left, right], '', {
        conjunction: 'or'
      }).source, ")[^").concat(escapeChar, "])+)+"), // Flags `gy` not needed here
      flags.replace(/[^imu]+/g, ''));
    }

    while (true) {
      // If using an escape character, advance to the delimiter's next starting position,
      // skipping any escaped characters in between
      if (escapeChar) {
        delimEnd += (XRegExp.exec(str, esc, delimEnd, 'sticky') || [''])[0].length;
      }

      leftMatch = XRegExp.exec(str, left, delimEnd);
      rightMatch = XRegExp.exec(str, right, delimEnd); // Keep the leftmost match only

      if (leftMatch && rightMatch) {
        if (leftMatch.index <= rightMatch.index) {
          rightMatch = null;
        } else {
          leftMatch = null;
        }
      } // Paths (LM: leftMatch, RM: rightMatch, OT: openTokens):
      // LM | RM | OT | Result
      // 1  | 0  | 1  | loop
      // 1  | 0  | 0  | loop
      // 0  | 1  | 1  | loop
      // 0  | 1  | 0  | throw
      // 0  | 0  | 1  | throw
      // 0  | 0  | 0  | break
      // The paths above don't include the sticky mode special case. The loop ends after the
      // first completed match if not `global`.


      if (leftMatch || rightMatch) {
        delimStart = (leftMatch || rightMatch).index;
        delimEnd = delimStart + (leftMatch || rightMatch)[0].length;
      } else if (!openTokens) {
        break;
      }

      if (sticky && !openTokens && delimStart > lastOuterEnd) {
        break;
      }

      if (leftMatch) {
        if (!openTokens) {
          outerStart = delimStart;
          innerStart = delimEnd;
        }

        ++openTokens;
      } else if (rightMatch && openTokens) {
        if (! --openTokens) {
          if (vN) {
            if (vN[0] && outerStart > lastOuterEnd) {
              output.push(row(vN[0], str.slice(lastOuterEnd, outerStart), lastOuterEnd, outerStart));
            }

            if (vN[1]) {
              output.push(row(vN[1], str.slice(outerStart, innerStart), outerStart, innerStart));
            }

            if (vN[2]) {
              output.push(row(vN[2], str.slice(innerStart, delimStart), innerStart, delimStart));
            }

            if (vN[3]) {
              output.push(row(vN[3], str.slice(delimStart, delimEnd), delimStart, delimEnd));
            }
          } else {
            output.push(str.slice(innerStart, delimStart));
          }

          lastOuterEnd = delimEnd;

          if (!global) {
            break;
          }
        }
      } else {
        throw new Error('Unbalanced delimiter found in string');
      } // If the delimiter matched an empty string, avoid an infinite loop


      if (delimStart === delimEnd) {
        ++delimEnd;
      }
    }

    if (global && !sticky && vN && vN[0] && str.length > lastOuterEnd) {
      output.push(row(vN[0], str.slice(lastOuterEnd), lastOuterEnd, str.length));
    }

    return output;
  };
};

exports.default = _default;
module.exports = exports["default"];

/***/ }),
/* 440 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(37);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _getIterator2 = _interopRequireDefault(__webpack_require__(116));

/*!
 * XRegExp Unicode Base 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2008-present MIT License
 */
var _default = function _default(XRegExp) {
  /**
   * Adds base support for Unicode matching:
   * - Adds syntax `\p{..}` for matching Unicode tokens. Tokens can be inverted using `\P{..}` or
   *   `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores. You can omit the
   *   braces for token names that are a single letter (e.g. `\pL` or `PL`).
   * - Adds flag A (astral), which enables 21-bit Unicode support.
   * - Adds the `XRegExp.addUnicodeData` method used by other addons to provide character data.
   *
   * Unicode Base relies on externally provided Unicode character data. Official addons are
   * available to provide data for Unicode categories, scripts, blocks, and properties.
   *
   * @requires XRegExp
   */
  // ==--------------------------==
  // Private stuff
  // ==--------------------------==
  // Storage for Unicode data
  var unicode = {}; // Reuse utils

  var dec = XRegExp._dec;
  var hex = XRegExp._hex;
  var pad4 = XRegExp._pad4; // Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed

  function normalize(name) {
    return name.replace(/[- _]+/g, '').toLowerCase();
  } // Gets the decimal code of a literal code unit, \xHH, \uHHHH, or a backslash-escaped literal


  function charCode(chr) {
    var esc = /^\\[xu](.+)/.exec(chr);
    return esc ? dec(esc[1]) : chr.charCodeAt(chr[0] === '\\' ? 1 : 0);
  } // Inverts a list of ordered BMP characters and ranges


  function invertBmp(range) {
    var output = '';
    var lastEnd = -1;
    XRegExp.forEach(range, /(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/, function (m) {
      var start = charCode(m[1]);

      if (start > lastEnd + 1) {
        output += "\\u".concat(pad4(hex(lastEnd + 1)));

        if (start > lastEnd + 2) {
          output += "-\\u".concat(pad4(hex(start - 1)));
        }
      }

      lastEnd = charCode(m[2] || m[1]);
    });

    if (lastEnd < 0xFFFF) {
      output += "\\u".concat(pad4(hex(lastEnd + 1)));

      if (lastEnd < 0xFFFE) {
        output += '-\\uFFFF';
      }
    }

    return output;
  } // Generates an inverted BMP range on first use


  function cacheInvertedBmp(slug) {
    var prop = 'b!';
    return unicode[slug][prop] || (unicode[slug][prop] = invertBmp(unicode[slug].bmp));
  } // Combines and optionally negates BMP and astral data


  function buildAstral(slug, isNegated) {
    var item = unicode[slug];
    var combined = '';

    if (item.bmp && !item.isBmpLast) {
      combined = "[".concat(item.bmp, "]").concat(item.astral ? '|' : '');
    }

    if (item.astral) {
      combined += item.astral;
    }

    if (item.isBmpLast && item.bmp) {
      combined += "".concat(item.astral ? '|' : '', "[").concat(item.bmp, "]");
    } // Astral Unicode tokens always match a code point, never a code unit


    return isNegated ? "(?:(?!".concat(combined, ")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))") : "(?:".concat(combined, ")");
  } // Builds a complete astral pattern on first use


  function cacheAstral(slug, isNegated) {
    var prop = isNegated ? 'a!' : 'a=';
    return unicode[slug][prop] || (unicode[slug][prop] = buildAstral(slug, isNegated));
  } // ==--------------------------==
  // Core functionality
  // ==--------------------------==

  /*
   * Add astral mode (flag A) and Unicode token syntax: `\p{..}`, `\P{..}`, `\p{^..}`, `\pC`.
   */


  XRegExp.addToken( // Use `*` instead of `+` to avoid capturing `^` as the token name in `\p{^}`
  /\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/, function (match, scope, flags) {
    var ERR_DOUBLE_NEG = 'Invalid double negation ';
    var ERR_UNKNOWN_NAME = 'Unknown Unicode token ';
    var ERR_UNKNOWN_REF = 'Unicode token missing data ';
    var ERR_ASTRAL_ONLY = 'Astral mode required for Unicode token ';
    var ERR_ASTRAL_IN_CLASS = 'Astral mode does not support Unicode tokens within character classes'; // Negated via \P{..} or \p{^..}

    var isNegated = match[1] === 'P' || !!match[2]; // Switch from BMP (0-FFFF) to astral (0-10FFFF) mode via flag A

    var isAstralMode = flags.indexOf('A') !== -1; // Token lookup name. Check `[4]` first to avoid passing `undefined` via `\p{}`

    var slug = normalize(match[4] || match[3]); // Token data object

    var item = unicode[slug];

    if (match[1] === 'P' && match[2]) {
      throw new SyntaxError(ERR_DOUBLE_NEG + match[0]);
    }

    if (!unicode.hasOwnProperty(slug)) {
      throw new SyntaxError(ERR_UNKNOWN_NAME + match[0]);
    } // Switch to the negated form of the referenced Unicode token


    if (item.inverseOf) {
      slug = normalize(item.inverseOf);

      if (!unicode.hasOwnProperty(slug)) {
        throw new ReferenceError("".concat(ERR_UNKNOWN_REF + match[0], " -> ").concat(item.inverseOf));
      }

      item = unicode[slug];
      isNegated = !isNegated;
    }

    if (!(item.bmp || isAstralMode)) {
      throw new SyntaxError(ERR_ASTRAL_ONLY + match[0]);
    }

    if (isAstralMode) {
      if (scope === 'class') {
        throw new SyntaxError(ERR_ASTRAL_IN_CLASS);
      }

      return cacheAstral(slug, isNegated);
    }

    return scope === 'class' ? isNegated ? cacheInvertedBmp(slug) : item.bmp : "".concat((isNegated ? '[^' : '[') + item.bmp, "]");
  }, {
    scope: 'all',
    optionalFlags: 'A',
    leadChar: '\\'
  });
  /**
   * Adds to the list of Unicode tokens that XRegExp regexes can match via `\p` or `\P`.
   *
   * @memberOf XRegExp
   * @param {Array} data Objects with named character ranges. Each object may have properties
   *   `name`, `alias`, `isBmpLast`, `inverseOf`, `bmp`, and `astral`. All but `name` are
   *   optional, although one of `bmp` or `astral` is required (unless `inverseOf` is set). If
   *   `astral` is absent, the `bmp` data is used for BMP and astral modes. If `bmp` is absent,
   *   the name errors in BMP mode but works in astral mode. If both `bmp` and `astral` are
   *   provided, the `bmp` data only is used in BMP mode, and the combination of `bmp` and
   *   `astral` data is used in astral mode. `isBmpLast` is needed when a token matches orphan
   *   high surrogates *and* uses surrogate pairs to match astral code points. The `bmp` and
   *   `astral` data should be a combination of literal characters and `\xHH` or `\uHHHH` escape
   *   sequences, with hyphens to create ranges. Any regex metacharacters in the data should be
   *   escaped, apart from range-creating hyphens. The `astral` data can additionally use
   *   character classes and alternation, and should use surrogate pairs to represent astral code
   *   points. `inverseOf` can be used to avoid duplicating character data if a Unicode token is
   *   defined as the exact inverse of another token.
   * @example
   *
   * // Basic use
   * XRegExp.addUnicodeData([{
   *   name: 'XDigit',
   *   alias: 'Hexadecimal',
   *   bmp: '0-9A-Fa-f'
   * }]);
   * XRegExp('\\p{XDigit}:\\p{Hexadecimal}+').test('0:3D'); // -> true
   */

  XRegExp.addUnicodeData = function (data) {
    var ERR_NO_NAME = 'Unicode token requires name';
    var ERR_NO_DATA = 'Unicode token has no character data ';
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;

    try {
      for (var _iterator = (0, _getIterator2.default)(data), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var item = _step.value;

        if (!item.name) {
          throw new Error(ERR_NO_NAME);
        }

        if (!(item.inverseOf || item.bmp || item.astral)) {
          throw new Error(ERR_NO_DATA + item.name);
        }

        unicode[normalize(item.name)] = item;

        if (item.alias) {
          unicode[normalize(item.alias)] = item;
        }
      } // Reset the pattern cache used by the `XRegExp` constructor, since the same pattern and
      // flags might now produce different results

    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator.return != null) {
          _iterator.return();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }

    XRegExp.cache.flush('patterns');
  };
  /**
   * @ignore
   *
   * Return a reference to the internal Unicode definition structure for the given Unicode
   * Property if the given name is a legal Unicode Property for use in XRegExp `\p` or `\P` regex
   * constructs.
   *
   * @memberOf XRegExp
   * @param {String} name Name by which the Unicode Property may be recognized (case-insensitive),
   *   e.g. `'N'` or `'Number'`. The given name is matched against all registered Unicode
   *   Properties and Property Aliases.
   * @returns {Object} Reference to definition structure when the name matches a Unicode Property.
   *
   * @note
   * For more info on Unicode Properties, see also http://unicode.org/reports/tr18/#Categories.
   *
   * @note
   * This method is *not* part of the officially documented API and may change or be removed in
   * the future. It is meant for userland code that wishes to reuse the (large) internal Unicode
   * structures set up by XRegExp.
   */


  XRegExp._getUnicodeProperty = function (name) {
    var slug = normalize(name);
    return unicode[slug];
  };
};

exports.default = _default;
module.exports = exports["default"];

/***/ }),
/* 441 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(37);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _blocks = _interopRequireDefault(__webpack_require__(442));

/*!
 * XRegExp Unicode Blocks 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2010-present MIT License
 * Unicode data by Mathias Bynens <mathiasbynens.be>
 */
var _default = function _default(XRegExp) {
  /**
   * Adds support for all Unicode blocks. Block names use the prefix 'In'. E.g.,
   * `\p{InBasicLatin}`. Token names are case insensitive, and any spaces, hyphens, and
   * underscores are ignored.
   *
   * Uses Unicode 11.0.0.
   *
   * @requires XRegExp, Unicode Base
   */
  if (!XRegExp.addUnicodeData) {
    throw new ReferenceError('Unicode Base must be loaded before Unicode Blocks');
  }

  XRegExp.addUnicodeData(_blocks.default);
};

exports.default = _default;
module.exports = exports["default"];

/***/ }),
/* 442 */
/***/ (function(module, exports) {

module.exports = [
    {
        'name': 'InAdlam',
        'astral': '\uD83A[\uDD00-\uDD5F]'
    },
    {
        'name': 'InAegean_Numbers',
        'astral': '\uD800[\uDD00-\uDD3F]'
    },
    {
        'name': 'InAhom',
        'astral': '\uD805[\uDF00-\uDF3F]'
    },
    {
        'name': 'InAlchemical_Symbols',
        'astral': '\uD83D[\uDF00-\uDF7F]'
    },
    {
        'name': 'InAlphabetic_Presentation_Forms',
        'bmp': '\uFB00-\uFB4F'
    },
    {
        'name': 'InAnatolian_Hieroglyphs',
        'astral': '\uD811[\uDC00-\uDE7F]'
    },
    {
        'name': 'InAncient_Greek_Musical_Notation',
        'astral': '\uD834[\uDE00-\uDE4F]'
    },
    {
        'name': 'InAncient_Greek_Numbers',
        'astral': '\uD800[\uDD40-\uDD8F]'
    },
    {
        'name': 'InAncient_Symbols',
        'astral': '\uD800[\uDD90-\uDDCF]'
    },
    {
        'name': 'InArabic',
        'bmp': '\u0600-\u06FF'
    },
    {
        'name': 'InArabic_Extended_A',
        'bmp': '\u08A0-\u08FF'
    },
    {
        'name': 'InArabic_Mathematical_Alphabetic_Symbols',
        'astral': '\uD83B[\uDE00-\uDEFF]'
    },
    {
        'name': 'InArabic_Presentation_Forms_A',
        'bmp': '\uFB50-\uFDFF'
    },
    {
        'name': 'InArabic_Presentation_Forms_B',
        'bmp': '\uFE70-\uFEFF'
    },
    {
        'name': 'InArabic_Supplement',
        'bmp': '\u0750-\u077F'
    },
    {
        'name': 'InArmenian',
        'bmp': '\u0530-\u058F'
    },
    {
        'name': 'InArrows',
        'bmp': '\u2190-\u21FF'
    },
    {
        'name': 'InAvestan',
        'astral': '\uD802[\uDF00-\uDF3F]'
    },
    {
        'name': 'InBalinese',
        'bmp': '\u1B00-\u1B7F'
    },
    {
        'name': 'InBamum',
        'bmp': '\uA6A0-\uA6FF'
    },
    {
        'name': 'InBamum_Supplement',
        'astral': '\uD81A[\uDC00-\uDE3F]'
    },
    {
        'name': 'InBasic_Latin',
        'bmp': '\0-\x7F'
    },
    {
        'name': 'InBassa_Vah',
        'astral': '\uD81A[\uDED0-\uDEFF]'
    },
    {
        'name': 'InBatak',
        'bmp': '\u1BC0-\u1BFF'
    },
    {
        'name': 'InBengali',
        'bmp': '\u0980-\u09FF'
    },
    {
        'name': 'InBhaiksuki',
        'astral': '\uD807[\uDC00-\uDC6F]'
    },
    {
        'name': 'InBlock_Elements',
        'bmp': '\u2580-\u259F'
    },
    {
        'name': 'InBopomofo',
        'bmp': '\u3100-\u312F'
    },
    {
        'name': 'InBopomofo_Extended',
        'bmp': '\u31A0-\u31BF'
    },
    {
        'name': 'InBox_Drawing',
        'bmp': '\u2500-\u257F'
    },
    {
        'name': 'InBrahmi',
        'astral': '\uD804[\uDC00-\uDC7F]'
    },
    {
        'name': 'InBraille_Patterns',
        'bmp': '\u2800-\u28FF'
    },
    {
        'name': 'InBuginese',
        'bmp': '\u1A00-\u1A1F'
    },
    {
        'name': 'InBuhid',
        'bmp': '\u1740-\u175F'
    },
    {
        'name': 'InByzantine_Musical_Symbols',
        'astral': '\uD834[\uDC00-\uDCFF]'
    },
    {
        'name': 'InCJK_Compatibility',
        'bmp': '\u3300-\u33FF'
    },
    {
        'name': 'InCJK_Compatibility_Forms',
        'bmp': '\uFE30-\uFE4F'
    },
    {
        'name': 'InCJK_Compatibility_Ideographs',
        'bmp': '\uF900-\uFAFF'
    },
    {
        'name': 'InCJK_Compatibility_Ideographs_Supplement',
        'astral': '\uD87E[\uDC00-\uDE1F]'
    },
    {
        'name': 'InCJK_Radicals_Supplement',
        'bmp': '\u2E80-\u2EFF'
    },
    {
        'name': 'InCJK_Strokes',
        'bmp': '\u31C0-\u31EF'
    },
    {
        'name': 'InCJK_Symbols_And_Punctuation',
        'bmp': '\u3000-\u303F'
    },
    {
        'name': 'InCJK_Unified_Ideographs',
        'bmp': '\u4E00-\u9FFF'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_A',
        'bmp': '\u3400-\u4DBF'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_B',
        'astral': '[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_C',
        'astral': '\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF3F]'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_D',
        'astral': '\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_E',
        'astral': '\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEAF]'
    },
    {
        'name': 'InCJK_Unified_Ideographs_Extension_F',
        'astral': '\uD873[\uDEB0-\uDFFF]|[\uD874-\uD879][\uDC00-\uDFFF]|\uD87A[\uDC00-\uDFEF]'
    },
    {
        'name': 'InCarian',
        'astral': '\uD800[\uDEA0-\uDEDF]'
    },
    {
        'name': 'InCaucasian_Albanian',
        'astral': '\uD801[\uDD30-\uDD6F]'
    },
    {
        'name': 'InChakma',
        'astral': '\uD804[\uDD00-\uDD4F]'
    },
    {
        'name': 'InCham',
        'bmp': '\uAA00-\uAA5F'
    },
    {
        'name': 'InCherokee',
        'bmp': '\u13A0-\u13FF'
    },
    {
        'name': 'InCherokee_Supplement',
        'bmp': '\uAB70-\uABBF'
    },
    {
        'name': 'InChess_Symbols',
        'astral': '\uD83E[\uDE00-\uDE6F]'
    },
    {
        'name': 'InCombining_Diacritical_Marks',
        'bmp': '\u0300-\u036F'
    },
    {
        'name': 'InCombining_Diacritical_Marks_Extended',
        'bmp': '\u1AB0-\u1AFF'
    },
    {
        'name': 'InCombining_Diacritical_Marks_For_Symbols',
        'bmp': '\u20D0-\u20FF'
    },
    {
        'name': 'InCombining_Diacritical_Marks_Supplement',
        'bmp': '\u1DC0-\u1DFF'
    },
    {
        'name': 'InCombining_Half_Marks',
        'bmp': '\uFE20-\uFE2F'
    },
    {
        'name': 'InCommon_Indic_Number_Forms',
        'bmp': '\uA830-\uA83F'
    },
    {
        'name': 'InControl_Pictures',
        'bmp': '\u2400-\u243F'
    },
    {
        'name': 'InCoptic',
        'bmp': '\u2C80-\u2CFF'
    },
    {
        'name': 'InCoptic_Epact_Numbers',
        'astral': '\uD800[\uDEE0-\uDEFF]'
    },
    {
        'name': 'InCounting_Rod_Numerals',
        'astral': '\uD834[\uDF60-\uDF7F]'
    },
    {
        'name': 'InCuneiform',
        'astral': '\uD808[\uDC00-\uDFFF]'
    },
    {
        'name': 'InCuneiform_Numbers_And_Punctuation',
        'astral': '\uD809[\uDC00-\uDC7F]'
    },
    {
        'name': 'InCurrency_Symbols',
        'bmp': '\u20A0-\u20CF'
    },
    {
        'name': 'InCypriot_Syllabary',
        'astral': '\uD802[\uDC00-\uDC3F]'
    },
    {
        'name': 'InCyrillic',
        'bmp': '\u0400-\u04FF'
    },
    {
        'name': 'InCyrillic_Extended_A',
        'bmp': '\u2DE0-\u2DFF'
    },
    {
        'name': 'InCyrillic_Extended_B',
        'bmp': '\uA640-\uA69F'
    },
    {
        'name': 'InCyrillic_Extended_C',
        'bmp': '\u1C80-\u1C8F'
    },
    {
        'name': 'InCyrillic_Supplement',
        'bmp': '\u0500-\u052F'
    },
    {
        'name': 'InDeseret',
        'astral': '\uD801[\uDC00-\uDC4F]'
    },
    {
        'name': 'InDevanagari',
        'bmp': '\u0900-\u097F'
    },
    {
        'name': 'InDevanagari_Extended',
        'bmp': '\uA8E0-\uA8FF'
    },
    {
        'name': 'InDingbats',
        'bmp': '\u2700-\u27BF'
    },
    {
        'name': 'InDogra',
        'astral': '\uD806[\uDC00-\uDC4F]'
    },
    {
        'name': 'InDomino_Tiles',
        'astral': '\uD83C[\uDC30-\uDC9F]'
    },
    {
        'name': 'InDuployan',
        'astral': '\uD82F[\uDC00-\uDC9F]'
    },
    {
        'name': 'InEarly_Dynastic_Cuneiform',
        'astral': '\uD809[\uDC80-\uDD4F]'
    },
    {
        'name': 'InEgyptian_Hieroglyphs',
        'astral': '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F]'
    },
    {
        'name': 'InElbasan',
        'astral': '\uD801[\uDD00-\uDD2F]'
    },
    {
        'name': 'InEmoticons',
        'astral': '\uD83D[\uDE00-\uDE4F]'
    },
    {
        'name': 'InEnclosed_Alphanumeric_Supplement',
        'astral': '\uD83C[\uDD00-\uDDFF]'
    },
    {
        'name': 'InEnclosed_Alphanumerics',
        'bmp': '\u2460-\u24FF'
    },
    {
        'name': 'InEnclosed_CJK_Letters_And_Months',
        'bmp': '\u3200-\u32FF'
    },
    {
        'name': 'InEnclosed_Ideographic_Supplement',
        'astral': '\uD83C[\uDE00-\uDEFF]'
    },
    {
        'name': 'InEthiopic',
        'bmp': '\u1200-\u137F'
    },
    {
        'name': 'InEthiopic_Extended',
        'bmp': '\u2D80-\u2DDF'
    },
    {
        'name': 'InEthiopic_Extended_A',
        'bmp': '\uAB00-\uAB2F'
    },
    {
        'name': 'InEthiopic_Supplement',
        'bmp': '\u1380-\u139F'
    },
    {
        'name': 'InGeneral_Punctuation',
        'bmp': '\u2000-\u206F'
    },
    {
        'name': 'InGeometric_Shapes',
        'bmp': '\u25A0-\u25FF'
    },
    {
        'name': 'InGeometric_Shapes_Extended',
        'astral': '\uD83D[\uDF80-\uDFFF]'
    },
    {
        'name': 'InGeorgian',
        'bmp': '\u10A0-\u10FF'
    },
    {
        'name': 'InGeorgian_Extended',
        'bmp': '\u1C90-\u1CBF'
    },
    {
        'name': 'InGeorgian_Supplement',
        'bmp': '\u2D00-\u2D2F'
    },
    {
        'name': 'InGlagolitic',
        'bmp': '\u2C00-\u2C5F'
    },
    {
        'name': 'InGlagolitic_Supplement',
        'astral': '\uD838[\uDC00-\uDC2F]'
    },
    {
        'name': 'InGothic',
        'astral': '\uD800[\uDF30-\uDF4F]'
    },
    {
        'name': 'InGrantha',
        'astral': '\uD804[\uDF00-\uDF7F]'
    },
    {
        'name': 'InGreek_And_Coptic',
        'bmp': '\u0370-\u03FF'
    },
    {
        'name': 'InGreek_Extended',
        'bmp': '\u1F00-\u1FFF'
    },
    {
        'name': 'InGujarati',
        'bmp': '\u0A80-\u0AFF'
    },
    {
        'name': 'InGunjala_Gondi',
        'astral': '\uD807[\uDD60-\uDDAF]'
    },
    {
        'name': 'InGurmukhi',
        'bmp': '\u0A00-\u0A7F'
    },
    {
        'name': 'InHalfwidth_And_Fullwidth_Forms',
        'bmp': '\uFF00-\uFFEF'
    },
    {
        'name': 'InHangul_Compatibility_Jamo',
        'bmp': '\u3130-\u318F'
    },
    {
        'name': 'InHangul_Jamo',
        'bmp': '\u1100-\u11FF'
    },
    {
        'name': 'InHangul_Jamo_Extended_A',
        'bmp': '\uA960-\uA97F'
    },
    {
        'name': 'InHangul_Jamo_Extended_B',
        'bmp': '\uD7B0-\uD7FF'
    },
    {
        'name': 'InHangul_Syllables',
        'bmp': '\uAC00-\uD7AF'
    },
    {
        'name': 'InHanifi_Rohingya',
        'astral': '\uD803[\uDD00-\uDD3F]'
    },
    {
        'name': 'InHanunoo',
        'bmp': '\u1720-\u173F'
    },
    {
        'name': 'InHatran',
        'astral': '\uD802[\uDCE0-\uDCFF]'
    },
    {
        'name': 'InHebrew',
        'bmp': '\u0590-\u05FF'
    },
    {
        'name': 'InHigh_Private_Use_Surrogates',
        'bmp': '\uDB80-\uDBFF'
    },
    {
        'name': 'InHigh_Surrogates',
        'bmp': '\uD800-\uDB7F'
    },
    {
        'name': 'InHiragana',
        'bmp': '\u3040-\u309F'
    },
    {
        'name': 'InIPA_Extensions',
        'bmp': '\u0250-\u02AF'
    },
    {
        'name': 'InIdeographic_Description_Characters',
        'bmp': '\u2FF0-\u2FFF'
    },
    {
        'name': 'InIdeographic_Symbols_And_Punctuation',
        'astral': '\uD81B[\uDFE0-\uDFFF]'
    },
    {
        'name': 'InImperial_Aramaic',
        'astral': '\uD802[\uDC40-\uDC5F]'
    },
    {
        'name': 'InIndic_Siyaq_Numbers',
        'astral': '\uD83B[\uDC70-\uDCBF]'
    },
    {
        'name': 'InInscriptional_Pahlavi',
        'astral': '\uD802[\uDF60-\uDF7F]'
    },
    {
        'name': 'InInscriptional_Parthian',
        'astral': '\uD802[\uDF40-\uDF5F]'
    },
    {
        'name': 'InJavanese',
        'bmp': '\uA980-\uA9DF'
    },
    {
        'name': 'InKaithi',
        'astral': '\uD804[\uDC80-\uDCCF]'
    },
    {
        'name': 'InKana_Extended_A',
        'astral': '\uD82C[\uDD00-\uDD2F]'
    },
    {
        'name': 'InKana_Supplement',
        'astral': '\uD82C[\uDC00-\uDCFF]'
    },
    {
        'name': 'InKanbun',
        'bmp': '\u3190-\u319F'
    },
    {
        'name': 'InKangxi_Radicals',
        'bmp': '\u2F00-\u2FDF'
    },
    {
        'name': 'InKannada',
        'bmp': '\u0C80-\u0CFF'
    },
    {
        'name': 'InKatakana',
        'bmp': '\u30A0-\u30FF'
    },
    {
        'name': 'InKatakana_Phonetic_Extensions',
        'bmp': '\u31F0-\u31FF'
    },
    {
        'name': 'InKayah_Li',
        'bmp': '\uA900-\uA92F'
    },
    {
        'name': 'InKharoshthi',
        'astral': '\uD802[\uDE00-\uDE5F]'
    },
    {
        'name': 'InKhmer',
        'bmp': '\u1780-\u17FF'
    },
    {
        'name': 'InKhmer_Symbols',
        'bmp': '\u19E0-\u19FF'
    },
    {
        'name': 'InKhojki',
        'astral': '\uD804[\uDE00-\uDE4F]'
    },
    {
        'name': 'InKhudawadi',
        'astral': '\uD804[\uDEB0-\uDEFF]'
    },
    {
        'name': 'InLao',
        'bmp': '\u0E80-\u0EFF'
    },
    {
        'name': 'InLatin_1_Supplement',
        'bmp': '\x80-\xFF'
    },
    {
        'name': 'InLatin_Extended_A',
        'bmp': '\u0100-\u017F'
    },
    {
        'name': 'InLatin_Extended_Additional',
        'bmp': '\u1E00-\u1EFF'
    },
    {
        'name': 'InLatin_Extended_B',
        'bmp': '\u0180-\u024F'
    },
    {
        'name': 'InLatin_Extended_C',
        'bmp': '\u2C60-\u2C7F'
    },
    {
        'name': 'InLatin_Extended_D',
        'bmp': '\uA720-\uA7FF'
    },
    {
        'name': 'InLatin_Extended_E',
        'bmp': '\uAB30-\uAB6F'
    },
    {
        'name': 'InLepcha',
        'bmp': '\u1C00-\u1C4F'
    },
    {
        'name': 'InLetterlike_Symbols',
        'bmp': '\u2100-\u214F'
    },
    {
        'name': 'InLimbu',
        'bmp': '\u1900-\u194F'
    },
    {
        'name': 'InLinear_A',
        'astral': '\uD801[\uDE00-\uDF7F]'
    },
    {
        'name': 'InLinear_B_Ideograms',
        'astral': '\uD800[\uDC80-\uDCFF]'
    },
    {
        'name': 'InLinear_B_Syllabary',
        'astral': '\uD800[\uDC00-\uDC7F]'
    },
    {
        'name': 'InLisu',
        'bmp': '\uA4D0-\uA4FF'
    },
    {
        'name': 'InLow_Surrogates',
        'bmp': '\uDC00-\uDFFF'
    },
    {
        'name': 'InLycian',
        'astral': '\uD800[\uDE80-\uDE9F]'
    },
    {
        'name': 'InLydian',
        'astral': '\uD802[\uDD20-\uDD3F]'
    },
    {
        'name': 'InMahajani',
        'astral': '\uD804[\uDD50-\uDD7F]'
    },
    {
        'name': 'InMahjong_Tiles',
        'astral': '\uD83C[\uDC00-\uDC2F]'
    },
    {
        'name': 'InMakasar',
        'astral': '\uD807[\uDEE0-\uDEFF]'
    },
    {
        'name': 'InMalayalam',
        'bmp': '\u0D00-\u0D7F'
    },
    {
        'name': 'InMandaic',
        'bmp': '\u0840-\u085F'
    },
    {
        'name': 'InManichaean',
        'astral': '\uD802[\uDEC0-\uDEFF]'
    },
    {
        'name': 'InMarchen',
        'astral': '\uD807[\uDC70-\uDCBF]'
    },
    {
        'name': 'InMasaram_Gondi',
        'astral': '\uD807[\uDD00-\uDD5F]'
    },
    {
        'name': 'InMathematical_Alphanumeric_Symbols',
        'astral': '\uD835[\uDC00-\uDFFF]'
    },
    {
        'name': 'InMathematical_Operators',
        'bmp': '\u2200-\u22FF'
    },
    {
        'name': 'InMayan_Numerals',
        'astral': '\uD834[\uDEE0-\uDEFF]'
    },
    {
        'name': 'InMedefaidrin',
        'astral': '\uD81B[\uDE40-\uDE9F]'
    },
    {
        'name': 'InMeetei_Mayek',
        'bmp': '\uABC0-\uABFF'
    },
    {
        'name': 'InMeetei_Mayek_Extensions',
        'bmp': '\uAAE0-\uAAFF'
    },
    {
        'name': 'InMende_Kikakui',
        'astral': '\uD83A[\uDC00-\uDCDF]'
    },
    {
        'name': 'InMeroitic_Cursive',
        'astral': '\uD802[\uDDA0-\uDDFF]'
    },
    {
        'name': 'InMeroitic_Hieroglyphs',
        'astral': '\uD802[\uDD80-\uDD9F]'
    },
    {
        'name': 'InMiao',
        'astral': '\uD81B[\uDF00-\uDF9F]'
    },
    {
        'name': 'InMiscellaneous_Mathematical_Symbols_A',
        'bmp': '\u27C0-\u27EF'
    },
    {
        'name': 'InMiscellaneous_Mathematical_Symbols_B',
        'bmp': '\u2980-\u29FF'
    },
    {
        'name': 'InMiscellaneous_Symbols',
        'bmp': '\u2600-\u26FF'
    },
    {
        'name': 'InMiscellaneous_Symbols_And_Arrows',
        'bmp': '\u2B00-\u2BFF'
    },
    {
        'name': 'InMiscellaneous_Symbols_And_Pictographs',
        'astral': '\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF]'
    },
    {
        'name': 'InMiscellaneous_Technical',
        'bmp': '\u2300-\u23FF'
    },
    {
        'name': 'InModi',
        'astral': '\uD805[\uDE00-\uDE5F]'
    },
    {
        'name': 'InModifier_Tone_Letters',
        'bmp': '\uA700-\uA71F'
    },
    {
        'name': 'InMongolian',
        'bmp': '\u1800-\u18AF'
    },
    {
        'name': 'InMongolian_Supplement',
        'astral': '\uD805[\uDE60-\uDE7F]'
    },
    {
        'name': 'InMro',
        'astral': '\uD81A[\uDE40-\uDE6F]'
    },
    {
        'name': 'InMultani',
        'astral': '\uD804[\uDE80-\uDEAF]'
    },
    {
        'name': 'InMusical_Symbols',
        'astral': '\uD834[\uDD00-\uDDFF]'
    },
    {
        'name': 'InMyanmar',
        'bmp': '\u1000-\u109F'
    },
    {
        'name': 'InMyanmar_Extended_A',
        'bmp': '\uAA60-\uAA7F'
    },
    {
        'name': 'InMyanmar_Extended_B',
        'bmp': '\uA9E0-\uA9FF'
    },
    {
        'name': 'InNKo',
        'bmp': '\u07C0-\u07FF'
    },
    {
        'name': 'InNabataean',
        'astral': '\uD802[\uDC80-\uDCAF]'
    },
    {
        'name': 'InNew_Tai_Lue',
        'bmp': '\u1980-\u19DF'
    },
    {
        'name': 'InNewa',
        'astral': '\uD805[\uDC00-\uDC7F]'
    },
    {
        'name': 'InNumber_Forms',
        'bmp': '\u2150-\u218F'
    },
    {
        'name': 'InNushu',
        'astral': '\uD82C[\uDD70-\uDEFF]'
    },
    {
        'name': 'InOgham',
        'bmp': '\u1680-\u169F'
    },
    {
        'name': 'InOl_Chiki',
        'bmp': '\u1C50-\u1C7F'
    },
    {
        'name': 'InOld_Hungarian',
        'astral': '\uD803[\uDC80-\uDCFF]'
    },
    {
        'name': 'InOld_Italic',
        'astral': '\uD800[\uDF00-\uDF2F]'
    },
    {
        'name': 'InOld_North_Arabian',
        'astral': '\uD802[\uDE80-\uDE9F]'
    },
    {
        'name': 'InOld_Permic',
        'astral': '\uD800[\uDF50-\uDF7F]'
    },
    {
        'name': 'InOld_Persian',
        'astral': '\uD800[\uDFA0-\uDFDF]'
    },
    {
        'name': 'InOld_Sogdian',
        'astral': '\uD803[\uDF00-\uDF2F]'
    },
    {
        'name': 'InOld_South_Arabian',
        'astral': '\uD802[\uDE60-\uDE7F]'
    },
    {
        'name': 'InOld_Turkic',
        'astral': '\uD803[\uDC00-\uDC4F]'
    },
    {
        'name': 'InOptical_Character_Recognition',
        'bmp': '\u2440-\u245F'
    },
    {
        'name': 'InOriya',
        'bmp': '\u0B00-\u0B7F'
    },
    {
        'name': 'InOrnamental_Dingbats',
        'astral': '\uD83D[\uDE50-\uDE7F]'
    },
    {
        'name': 'InOsage',
        'astral': '\uD801[\uDCB0-\uDCFF]'
    },
    {
        'name': 'InOsmanya',
        'astral': '\uD801[\uDC80-\uDCAF]'
    },
    {
        'name': 'InPahawh_Hmong',
        'astral': '\uD81A[\uDF00-\uDF8F]'
    },
    {
        'name': 'InPalmyrene',
        'astral': '\uD802[\uDC60-\uDC7F]'
    },
    {
        'name': 'InPau_Cin_Hau',
        'astral': '\uD806[\uDEC0-\uDEFF]'
    },
    {
        'name': 'InPhags_Pa',
        'bmp': '\uA840-\uA87F'
    },
    {
        'name': 'InPhaistos_Disc',
        'astral': '\uD800[\uDDD0-\uDDFF]'
    },
    {
        'name': 'InPhoenician',
        'astral': '\uD802[\uDD00-\uDD1F]'
    },
    {
        'name': 'InPhonetic_Extensions',
        'bmp': '\u1D00-\u1D7F'
    },
    {
        'name': 'InPhonetic_Extensions_Supplement',
        'bmp': '\u1D80-\u1DBF'
    },
    {
        'name': 'InPlaying_Cards',
        'astral': '\uD83C[\uDCA0-\uDCFF]'
    },
    {
        'name': 'InPrivate_Use_Area',
        'bmp': '\uE000-\uF8FF'
    },
    {
        'name': 'InPsalter_Pahlavi',
        'astral': '\uD802[\uDF80-\uDFAF]'
    },
    {
        'name': 'InRejang',
        'bmp': '\uA930-\uA95F'
    },
    {
        'name': 'InRumi_Numeral_Symbols',
        'astral': '\uD803[\uDE60-\uDE7F]'
    },
    {
        'name': 'InRunic',
        'bmp': '\u16A0-\u16FF'
    },
    {
        'name': 'InSamaritan',
        'bmp': '\u0800-\u083F'
    },
    {
        'name': 'InSaurashtra',
        'bmp': '\uA880-\uA8DF'
    },
    {
        'name': 'InSharada',
        'astral': '\uD804[\uDD80-\uDDDF]'
    },
    {
        'name': 'InShavian',
        'astral': '\uD801[\uDC50-\uDC7F]'
    },
    {
        'name': 'InShorthand_Format_Controls',
        'astral': '\uD82F[\uDCA0-\uDCAF]'
    },
    {
        'name': 'InSiddham',
        'astral': '\uD805[\uDD80-\uDDFF]'
    },
    {
        'name': 'InSinhala',
        'bmp': '\u0D80-\u0DFF'
    },
    {
        'name': 'InSinhala_Archaic_Numbers',
        'astral': '\uD804[\uDDE0-\uDDFF]'
    },
    {
        'name': 'InSmall_Form_Variants',
        'bmp': '\uFE50-\uFE6F'
    },
    {
        'name': 'InSogdian',
        'astral': '\uD803[\uDF30-\uDF6F]'
    },
    {
        'name': 'InSora_Sompeng',
        'astral': '\uD804[\uDCD0-\uDCFF]'
    },
    {
        'name': 'InSoyombo',
        'astral': '\uD806[\uDE50-\uDEAF]'
    },
    {
        'name': 'InSpacing_Modifier_Letters',
        'bmp': '\u02B0-\u02FF'
    },
    {
        'name': 'InSpecials',
        'bmp': '\uFFF0-\uFFFF'
    },
    {
        'name': 'InSundanese',
        'bmp': '\u1B80-\u1BBF'
    },
    {
        'name': 'InSundanese_Supplement',
        'bmp': '\u1CC0-\u1CCF'
    },
    {
        'name': 'InSuperscripts_And_Subscripts',
        'bmp': '\u2070-\u209F'
    },
    {
        'name': 'InSupplemental_Arrows_A',
        'bmp': '\u27F0-\u27FF'
    },
    {
        'name': 'InSupplemental_Arrows_B',
        'bmp': '\u2900-\u297F'
    },
    {
        'name': 'InSupplemental_Arrows_C',
        'astral': '\uD83E[\uDC00-\uDCFF]'
    },
    {
        'name': 'InSupplemental_Mathematical_Operators',
        'bmp': '\u2A00-\u2AFF'
    },
    {
        'name': 'InSupplemental_Punctuation',
        'bmp': '\u2E00-\u2E7F'
    },
    {
        'name': 'InSupplemental_Symbols_And_Pictographs',
        'astral': '\uD83E[\uDD00-\uDDFF]'
    },
    {
        'name': 'InSupplementary_Private_Use_Area_A',
        'astral': '[\uDB80-\uDBBF][\uDC00-\uDFFF]'
    },
    {
        'name': 'InSupplementary_Private_Use_Area_B',
        'astral': '[\uDBC0-\uDBFF][\uDC00-\uDFFF]'
    },
    {
        'name': 'InSutton_SignWriting',
        'astral': '\uD836[\uDC00-\uDEAF]'
    },
    {
        'name': 'InSyloti_Nagri',
        'bmp': '\uA800-\uA82F'
    },
    {
        'name': 'InSyriac',
        'bmp': '\u0700-\u074F'
    },
    {
        'name': 'InSyriac_Supplement',
        'bmp': '\u0860-\u086F'
    },
    {
        'name': 'InTagalog',
        'bmp': '\u1700-\u171F'
    },
    {
        'name': 'InTagbanwa',
        'bmp': '\u1760-\u177F'
    },
    {
        'name': 'InTags',
        'astral': '\uDB40[\uDC00-\uDC7F]'
    },
    {
        'name': 'InTai_Le',
        'bmp': '\u1950-\u197F'
    },
    {
        'name': 'InTai_Tham',
        'bmp': '\u1A20-\u1AAF'
    },
    {
        'name': 'InTai_Viet',
        'bmp': '\uAA80-\uAADF'
    },
    {
        'name': 'InTai_Xuan_Jing_Symbols',
        'astral': '\uD834[\uDF00-\uDF5F]'
    },
    {
        'name': 'InTakri',
        'astral': '\uD805[\uDE80-\uDECF]'
    },
    {
        'name': 'InTamil',
        'bmp': '\u0B80-\u0BFF'
    },
    {
        'name': 'InTangut',
        'astral': '[\uD81C-\uD821][\uDC00-\uDFFF]'
    },
    {
        'name': 'InTangut_Components',
        'astral': '\uD822[\uDC00-\uDEFF]'
    },
    {
        'name': 'InTelugu',
        'bmp': '\u0C00-\u0C7F'
    },
    {
        'name': 'InThaana',
        'bmp': '\u0780-\u07BF'
    },
    {
        'name': 'InThai',
        'bmp': '\u0E00-\u0E7F'
    },
    {
        'name': 'InTibetan',
        'bmp': '\u0F00-\u0FFF'
    },
    {
        'name': 'InTifinagh',
        'bmp': '\u2D30-\u2D7F'
    },
    {
        'name': 'InTirhuta',
        'astral': '\uD805[\uDC80-\uDCDF]'
    },
    {
        'name': 'InTransport_And_Map_Symbols',
        'astral': '\uD83D[\uDE80-\uDEFF]'
    },
    {
        'name': 'InUgaritic',
        'astral': '\uD800[\uDF80-\uDF9F]'
    },
    {
        'name': 'InUnified_Canadian_Aboriginal_Syllabics',
        'bmp': '\u1400-\u167F'
    },
    {
        'name': 'InUnified_Canadian_Aboriginal_Syllabics_Extended',
        'bmp': '\u18B0-\u18FF'
    },
    {
        'name': 'InVai',
        'bmp': '\uA500-\uA63F'
    },
    {
        'name': 'InVariation_Selectors',
        'bmp': '\uFE00-\uFE0F'
    },
    {
        'name': 'InVariation_Selectors_Supplement',
        'astral': '\uDB40[\uDD00-\uDDEF]'
    },
    {
        'name': 'InVedic_Extensions',
        'bmp': '\u1CD0-\u1CFF'
    },
    {
        'name': 'InVertical_Forms',
        'bmp': '\uFE10-\uFE1F'
    },
    {
        'name': 'InWarang_Citi',
        'astral': '\uD806[\uDCA0-\uDCFF]'
    },
    {
        'name': 'InYi_Radicals',
        'bmp': '\uA490-\uA4CF'
    },
    {
        'name': 'InYi_Syllables',
        'bmp': '\uA000-\uA48F'
    },
    {
        'name': 'InYijing_Hexagram_Symbols',
        'bmp': '\u4DC0-\u4DFF'
    },
    {
        'name': 'InZanabazar_Square',
        'astral': '\uD806[\uDE00-\uDE4F]'
    }
];


/***/ }),
/* 443 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(37);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _categories = _interopRequireDefault(__webpack_require__(444));

/*!
 * XRegExp Unicode Categories 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2010-present MIT License
 * Unicode data by Mathias Bynens <mathiasbynens.be>
 */
var _default = function _default(XRegExp) {
  /**
   * Adds support for Unicode's general categories. E.g., `\p{Lu}` or `\p{Uppercase Letter}`. See
   * category descriptions in UAX #44 <http://unicode.org/reports/tr44/#GC_Values_Table>. Token
   * names are case insensitive, and any spaces, hyphens, and underscores are ignored.
   *
   * Uses Unicode 11.0.0.
   *
   * @requires XRegExp, Unicode Base
   */
  if (!XRegExp.addUnicodeData) {
    throw new ReferenceError('Unicode Base must be loaded before Unicode Categories');
  }

  XRegExp.addUnicodeData(_categories.default);
};

exports.default = _default;
module.exports = exports["default"];

/***/ }),
/* 444 */
/***/ (function(module, exports) {

module.exports = [
    {
        'name': 'C',
        'alias': 'Other',
        'isBmpLast': true,
        'bmp': '\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EE\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB\u07FC\u082E\u082F\u083F\u085C\u085D\u085F\u086B-\u089F\u08B5\u08BE-\u08D2\u08E2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A77-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D04\u0D0D\u0D11\u0D45\u0D49\u0D50-\u0D53\u0D64\u0D65\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C89-\u1C8F\u1CBB\u1CBC\u1CC8-\u1CCF\u1CFA-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20C0-\u20CF\u20F1-\u20FF\u218C-\u218F\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BC9\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E4F-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FF0-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7BA-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C6-\uA8CD\uA8DA-\uA8DF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF',
        'astral': '\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F-\uDEFF\uDF28-\uDF2F\uDF5A-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCBD\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD47-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5A\uDC5C\uDC5F-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD00-\uDDFF\uDE48-\uDE4F\uDE84\uDE85\uDEA3-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD823-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83F\uD87B-\uD87D\uD87F-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFDF\uDFE2-\uDFFF]|\uD821[\uDFF2-\uDFFF]|\uD822[\uDEF3-\uDFFF]|\uD82C[\uDD1F-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA0-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDE9-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4B-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD6C-\uDD6F\uDDAD-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED5-\uDEDF\uDEED-\uDEEF\uDEFA-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD0F\uDD3F\uDD71\uDD72\uDD77-\uDD79\uDD7B\uDDA3-\uDDAF\uDDBA-\uDDBF\uDDC3-\uDDCF\uDE00-\uDE5F\uDE6E-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]'
    },
    {
        'name': 'Cc',
        'alias': 'Control',
        'bmp': '\0-\x1F\x7F-\x9F'
    },
    {
        'name': 'Cf',
        'alias': 'Format',
        'bmp': '\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB',
        'astral': '\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]'
    },
    {
        'name': 'Cn',
        'alias': 'Unassigned',
        'bmp': '\u0378\u0379\u0380-\u0383\u038B\u038D\u03A2\u0530\u0557\u0558\u058B\u058C\u0590\u05C8-\u05CF\u05EB-\u05EE\u05F5-\u05FF\u061D\u070E\u074B\u074C\u07B2-\u07BF\u07FB\u07FC\u082E\u082F\u083F\u085C\u085D\u085F\u086B-\u089F\u08B5\u08BE-\u08D2\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A77-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D04\u0D0D\u0D11\u0D45\u0D49\u0D50-\u0D53\u0D64\u0D65\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F6\u13F7\u13FE\u13FF\u169D-\u169F\u16F9-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE\u1AAF\u1ABF-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C89-\u1C8F\u1CBB\u1CBC\u1CC8-\u1CCF\u1CFA-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u2065\u2072\u2073\u208F\u209D-\u209F\u20C0-\u20CF\u20F1-\u20FF\u218C-\u218F\u2427-\u243F\u244B-\u245F\u2B74\u2B75\u2B96\u2B97\u2BC9\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E4F-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FF0-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA6F8-\uA6FF\uA7BA-\uA7F6\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C6-\uA8CD\uA8DA-\uA8DF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB66-\uAB6F\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD\uFEFE\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFF8\uFFFE\uFFFF',
        'astral': '\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9C-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD70-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F-\uDEFF\uDF28-\uDF2F\uDF5A-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7E\uDCC2-\uDCCC\uDCCE\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD47-\uDD4F\uDD77-\uDD7F\uDDCE\uDDCF\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5A\uDC5C\uDC5F-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEB8-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF40-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD00-\uDDFF\uDE48-\uDE4F\uDE84\uDE85\uDEA3-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD823-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83F\uD87B-\uD87D\uD87F-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDE70-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFDF\uDFE2-\uDFFF]|\uD821[\uDFF2-\uDFFF]|\uD822[\uDEF3-\uDFFF]|\uD82C[\uDD1F-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDE9-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4B-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDD0D-\uDD0F\uDD6C-\uDD6F\uDDAD-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED5-\uDEDF\uDEED-\uDEEF\uDEFA-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD0F\uDD3F\uDD71\uDD72\uDD77-\uDD79\uDD7B\uDDA3-\uDDAF\uDDBA-\uDDBF\uDDC3-\uDDCF\uDE00-\uDE5F\uDE6E-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]'
    },
    {
        'name': 'Co',
        'alias': 'Private_Use',
        'bmp': '\uE000-\uF8FF',
        'astral': '[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]'
    },
    {
        'name': 'Cs',
        'alias': 'Surrogate',
        'bmp': '\uD800-\uDFFF'
    },
    {
        'name': 'L',
        'alias': 'Letter',
        'bmp': 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
        'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]'
    },
    {
        'name': 'LC',
        'alias': 'Cased_Letter',
        'bmp': 'A-Za-z\xB5\xC0-\xD6\xD8-\xF6\xF8-\u01BA\u01BC-\u01BF\u01C4-\u0293\u0295-\u02AF\u0370-\u0373\u0376\u0377\u037B-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0560-\u0588\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FD-\u10FF\u13A0-\u13F5\u13F8-\u13FD\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2134\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2C7B\u2C7E-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA640-\uA66D\uA680-\uA69B\uA722-\uA76F\uA771-\uA787\uA78B-\uA78E\uA790-\uA7B9\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A',
        'astral': '\uD801[\uDC00-\uDC4F\uDCB0-\uDCD3\uDCD8-\uDCFB]|\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD806[\uDCA0-\uDCDF]|\uD81B[\uDE40-\uDE7F]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDD00-\uDD43]'
    },
    {
        'name': 'Ll',
        'alias': 'Lowercase_Letter',
        'bmp': 'a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A',
        'astral': '\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]'
    },
    {
        'name': 'Lm',
        'alias': 'Modifier_Letter',
        'bmp': '\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C\uA69D\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E\uFF9F',
        'astral': '\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F\uDFE0\uDFE1]'
    },
    {
        'name': 'Lo',
        'alias': 'Other_Letter',
        'bmp': '\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05EF-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1100-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
        'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]'
    },
    {
        'name': 'Lt',
        'alias': 'Titlecase_Letter',
        'bmp': '\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC'
    },
    {
        'name': 'Lu',
        'alias': 'Uppercase_Letter',
        'bmp': 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uFF21-\uFF3A',
        'astral': '\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]'
    },
    {
        'name': 'M',
        'alias': 'Mark',
        'bmp': '\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F',
        'astral': '\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDF46-\uDF50]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]'
    },
    {
        'name': 'Mc',
        'alias': 'Spacing_Mark',
        'bmp': '\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BE-\u09C0\u09C7\u09C8\u09CB\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0D02\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2\u0DF3\u0F3E\u0F3F\u0F7F\u102B\u102C\u1031\u1038\u103B\u103C\u1056\u1057\u1062-\u1064\u1067-\u106D\u1083\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF2\u1CF3\u1CF7\u302E\u302F\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BD-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC',
        'astral': '\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF7E]|\uD834[\uDD65\uDD66\uDD6D-\uDD72]'
    },
    {
        'name': 'Me',
        'alias': 'Enclosing_Mark',
        'bmp': '\u0488\u0489\u1ABE\u20DD-\u20E0\u20E2-\u20E4\uA670-\uA672'
    },
    {
        'name': 'Mn',
        'alias': 'Nonspacing_Mark',
        'bmp': '\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F',
        'astral': '\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]'
    },
    {
        'name': 'N',
        'alias': 'Number',
        'bmp': '0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19',
        'astral': '\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4]|\uD83C[\uDD00-\uDD0C]'
    },
    {
        'name': 'Nd',
        'alias': 'Decimal_Number',
        'bmp': '0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19',
        'astral': '\uD801[\uDCA0-\uDCA9]|\uD803[\uDD30-\uDD39]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9]|\uD807[\uDC50-\uDC59\uDD50-\uDD59\uDDA0-\uDDA9]|\uD81A[\uDE60-\uDE69\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD83A[\uDD50-\uDD59]'
    },
    {
        'name': 'Nl',
        'alias': 'Letter_Number',
        'bmp': '\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF',
        'astral': '\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC6E]'
    },
    {
        'name': 'No',
        'alias': 'Other_Number',
        'bmp': '\xB2\xB3\xB9\xBC-\xBE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D58-\u0D5E\u0D70-\u0D78\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835',
        'astral': '\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54]|\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD805[\uDF3A\uDF3B]|\uD806[\uDCEA-\uDCF2]|\uD807[\uDC5A-\uDC6C]|\uD81A[\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD83A[\uDCC7-\uDCCF]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4]|\uD83C[\uDD00-\uDD0C]'
    },
    {
        'name': 'P',
        'alias': 'Punctuation',
        'bmp': '!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65',
        'astral': '\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]'
    },
    {
        'name': 'Pc',
        'alias': 'Connector_Punctuation',
        'bmp': '_\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F'
    },
    {
        'name': 'Pd',
        'alias': 'Dash_Punctuation',
        'bmp': '\\-\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u2E40\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D'
    },
    {
        'name': 'Pe',
        'alias': 'Close_Punctuation',
        'bmp': '\\)\\]\\}\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u2309\u230B\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3E\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63'
    },
    {
        'name': 'Pf',
        'alias': 'Final_Punctuation',
        'bmp': '\xBB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21'
    },
    {
        'name': 'Pi',
        'alias': 'Initial_Punctuation',
        'bmp': '\xAB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20'
    },
    {
        'name': 'Po',
        'alias': 'Other_Punctuation',
        'bmp': '!-#%-\'\\*,\\.\\/:;\\?@\\\xA1\xA7\xB6\xB7\xBF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u2E3C-\u2E3F\u2E41\u2E43-\u2E4E\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65',
        'astral': '\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]'
    },
    {
        'name': 'Ps',
        'alias': 'Open_Punctuation',
        'bmp': '\\(\\[\\{\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2308\u230A\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u2E42\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3F\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62'
    },
    {
        'name': 'S',
        'alias': 'Symbol',
        'bmp': '\\$\\+<->\\^`\\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B98-\u2BC8\u2BCA-\u2BFE\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD',
        'astral': '\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD83B[\uDCAC\uDCB0\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD6B\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED4\uDEE0-\uDEEC\uDEF0-\uDEF9\uDF00-\uDF73\uDF80-\uDFD8]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD10-\uDD3E\uDD40-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF\uDE60-\uDE6D]'
    },
    {
        'name': 'Sc',
        'alias': 'Currency_Symbol',
        'bmp': '\\$\xA2-\xA5\u058F\u060B\u07FE\u07FF\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BF\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6',
        'astral': '\uD83B\uDCB0'
    },
    {
        'name': 'Sk',
        'alias': 'Modifier_Symbol',
        'bmp': '\\^`\xA8\xAF\xB4\xB8\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u309B\u309C\uA700-\uA716\uA720\uA721\uA789\uA78A\uAB5B\uFBB2-\uFBC1\uFF3E\uFF40\uFFE3',
        'astral': '\uD83C[\uDFFB-\uDFFF]'
    },
    {
        'name': 'Sm',
        'alias': 'Math_Symbol',
        'bmp': '\\+<->\\|~\xAC\xB1\xD7\xF7\u03F6\u0606-\u0608\u2044\u2052\u207A-\u207C\u208A-\u208C\u2118\u2140-\u2144\u214B\u2190-\u2194\u219A\u219B\u21A0\u21A3\u21A6\u21AE\u21CE\u21CF\u21D2\u21D4\u21F4-\u22FF\u2320\u2321\u237C\u239B-\u23B3\u23DC-\u23E1\u25B7\u25C1\u25F8-\u25FF\u266F\u27C0-\u27C4\u27C7-\u27E5\u27F0-\u27FF\u2900-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2AFF\u2B30-\u2B44\u2B47-\u2B4C\uFB29\uFE62\uFE64-\uFE66\uFF0B\uFF1C-\uFF1E\uFF5C\uFF5E\uFFE2\uFFE9-\uFFEC',
        'astral': '\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83B[\uDEF0\uDEF1]'
    },
    {
        'name': 'So',
        'alias': 'Other_Symbol',
        'bmp': '\xA6\xA9\xAE\xB0\u0482\u058D\u058E\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09FA\u0B70\u0BF3-\u0BF8\u0BFA\u0C7F\u0D4F\u0D79\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u214A\u214C\u214D\u214F\u218A\u218B\u2195-\u2199\u219C-\u219F\u21A1\u21A2\u21A4\u21A5\u21A7-\u21AD\u21AF-\u21CD\u21D0\u21D1\u21D3\u21D5-\u21F3\u2300-\u2307\u230C-\u231F\u2322-\u2328\u232B-\u237B\u237D-\u239A\u23B4-\u23DB\u23E2-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u25B6\u25B8-\u25C0\u25C2-\u25F7\u2600-\u266E\u2670-\u2767\u2794-\u27BF\u2800-\u28FF\u2B00-\u2B2F\u2B45\u2B46\u2B4D-\u2B73\u2B76-\u2B95\u2B98-\u2BC8\u2BCA-\u2BFE\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA828-\uA82B\uA836\uA837\uA839\uAA77-\uAA79\uFDFD\uFFE4\uFFE8\uFFED\uFFEE\uFFFC\uFFFD',
        'astral': '\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9B\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD83B\uDCAC|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD10-\uDD6B\uDD70-\uDDAC\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFA]|\uD83D[\uDC00-\uDED4\uDEE0-\uDEEC\uDEF0-\uDEF9\uDF00-\uDF73\uDF80-\uDFD8]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD10-\uDD3E\uDD40-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF\uDE60-\uDE6D]'
    },
    {
        'name': 'Z',
        'alias': 'Separator',
        'bmp': ' \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000'
    },
    {
        'name': 'Zl',
        'alias': 'Line_Separator',
        'bmp': '\u2028'
    },
    {
        'name': 'Zp',
        'alias': 'Paragraph_Separator',
        'bmp': '\u2029'
    },
    {
        'name': 'Zs',
        'alias': 'Space_Separator',
        'bmp': ' \xA0\u1680\u2000-\u200A\u202F\u205F\u3000'
    }
];


/***/ }),
/* 445 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(37);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _properties = _interopRequireDefault(__webpack_require__(446));

/*!
 * XRegExp Unicode Properties 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2012-present MIT License
 * Unicode data by Mathias Bynens <mathiasbynens.be>
 */
var _default = function _default(XRegExp) {
  /**
   * Adds properties to meet the UTS #18 Level 1 RL1.2 requirements for Unicode regex support. See
   * <http://unicode.org/reports/tr18/#RL1.2>. Following are definitions of these properties from
   * UAX #44 <http://unicode.org/reports/tr44/>:
   *
   * - Alphabetic
   *   Characters with the Alphabetic property. Generated from: Lowercase + Uppercase + Lt + Lm +
   *   Lo + Nl + Other_Alphabetic.
   *
   * - Default_Ignorable_Code_Point
   *   For programmatic determination of default ignorable code points. New characters that should
   *   be ignored in rendering (unless explicitly supported) will be assigned in these ranges,
   *   permitting programs to correctly handle the default rendering of such characters when not
   *   otherwise supported.
   *
   * - Lowercase
   *   Characters with the Lowercase property. Generated from: Ll + Other_Lowercase.
   *
   * - Noncharacter_Code_Point
   *   Code points permanently reserved for internal use.
   *
   * - Uppercase
   *   Characters with the Uppercase property. Generated from: Lu + Other_Uppercase.
   *
   * - White_Space
   *   Spaces, separator characters and other control characters which should be treated by
   *   programming languages as "white space" for the purpose of parsing elements.
   *
   * The properties ASCII, Any, and Assigned are also included but are not defined in UAX #44. UTS
   * #18 RL1.2 additionally requires support for Unicode scripts and general categories. These are
   * included in XRegExp's Unicode Categories and Unicode Scripts addons.
   *
   * Token names are case insensitive, and any spaces, hyphens, and underscores are ignored.
   *
   * Uses Unicode 11.0.0.
   *
   * @requires XRegExp, Unicode Base
   */
  if (!XRegExp.addUnicodeData) {
    throw new ReferenceError('Unicode Base must be loaded before Unicode Properties');
  }

  var unicodeData = _properties.default; // Add non-generated data

  unicodeData.push({
    name: 'Assigned',
    // Since this is defined as the inverse of Unicode category Cn (Unassigned), the Unicode
    // Categories addon is required to use this property
    inverseOf: 'Cn'
  });
  XRegExp.addUnicodeData(unicodeData);
};

exports.default = _default;
module.exports = exports["default"];

/***/ }),
/* 446 */
/***/ (function(module, exports) {

module.exports = [
    {
        'name': 'ASCII',
        'bmp': '\0-\x7F'
    },
    {
        'name': 'Alphabetic',
        'bmp': 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0345\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05B0-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0657\u0659-\u065F\u066E-\u06D3\u06D5-\u06DC\u06E1-\u06E8\u06ED-\u06EF\u06FA-\u06FC\u06FF\u0710-\u073F\u074D-\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0817\u081A-\u082C\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08DF\u08E3-\u08E9\u08F0-\u093B\u093D-\u094C\u094E-\u0950\u0955-\u0963\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C4\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09F0\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A42\u0A47\u0A48\u0A4B\u0A4C\u0A51\u0A59-\u0A5C\u0A5E\u0A70-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC5\u0AC7-\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0-\u0AE3\u0AF9-\u0AFC\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D-\u0B44\u0B47\u0B48\u0B4B\u0B4C\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4C\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCC\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E46\u0E4D\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0ECD\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F71-\u0F81\u0F88-\u0F97\u0F99-\u0FBC\u1000-\u1036\u1038\u103B-\u103F\u1050-\u1062\u1065-\u1068\u106E-\u1086\u108E\u109C\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1713\u1720-\u1733\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17B3\u17B6-\u17C8\u17D7\u17DC\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u1938\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A1B\u1A20-\u1A5E\u1A61-\u1A74\u1AA7\u1B00-\u1B33\u1B35-\u1B43\u1B45-\u1B4B\u1B80-\u1BA9\u1BAC-\u1BAF\u1BBA-\u1BE5\u1BE7-\u1BF1\u1C00-\u1C35\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1D00-\u1DBF\u1DE7-\u1DF4\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u24B6-\u24E9\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA674-\uA67B\uA67F-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA827\uA840-\uA873\uA880-\uA8C3\uA8C5\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA92A\uA930-\uA952\uA960-\uA97C\uA980-\uA9B2\uA9B4-\uA9BF\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA60-\uAA76\uAA7A\uAA7E-\uAABE\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC',
        'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC00-\uDC45\uDC82-\uDCB8\uDCD0-\uDCE8\uDD00-\uDD32\uDD44-\uDD46\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD805[\uDC00-\uDC41\uDC43-\uDC45\uDC47-\uDC4A\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDF00-\uDF1A\uDF1D-\uDF2A]|\uD806[\uDC00-\uDC38\uDCA0-\uDCDF\uDCFF\uDE00-\uDE32\uDE35-\uDE3E\uDE50-\uDE83\uDE86-\uDE97\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC3E\uDC40\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD41\uDD43\uDD46\uDD47\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD96\uDD98\uDEE0-\uDEF6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF36\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50-\uDF7E\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD47]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]'
    },
    {
        'name': 'Any',
        'isBmpLast': true,
        'bmp': '\0-\uFFFF',
        'astral': '[\uD800-\uDBFF][\uDC00-\uDFFF]'
    },
    {
        'name': 'Default_Ignorable_Code_Point',
        'bmp': '\xAD\u034F\u061C\u115F\u1160\u17B4\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8',
        'astral': '\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|[\uDB40-\uDB43][\uDC00-\uDFFF]'
    },
    {
        'name': 'Lowercase',
        'bmp': 'a-z\xAA\xB5\xBA\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02B8\u02C0\u02C1\u02E0-\u02E4\u0345\u0371\u0373\u0377\u037A-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0560-\u0588\u10D0-\u10FA\u10FD-\u10FF\u13F8-\u13FD\u1C80-\u1C88\u1D00-\u1DBF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u2071\u207F\u2090-\u209C\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2170-\u217F\u2184\u24D0-\u24E9\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA69D\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AF\uA7B5\uA7B7\uA7B9\uA7F8-\uA7FA\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A',
        'astral': '\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD83A[\uDD22-\uDD43]'
    },
    {
        'name': 'Noncharacter_Code_Point',
        'bmp': '\uFDD0-\uFDEF\uFFFE\uFFFF',
        'astral': '[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]'
    },
    {
        'name': 'Uppercase',
        'bmp': 'A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1C90-\u1CBA\u1CBD-\u1CBF\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2160-\u216F\u2183\u24B6-\u24CF\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AE\uA7B0-\uA7B4\uA7B6\uA7B8\uFF21-\uFF3A',
        'astral': '\uD801[\uDC00-\uDC27\uDCB0-\uDCD3]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]'
    },
    {
        'name': 'White_Space',
        'bmp': '\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000'
    }
];


/***/ }),
/* 447 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__(37);

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _scripts = _interopRequireDefault(__webpack_require__(448));

/*!
 * XRegExp Unicode Scripts 4.2.4
 * <xregexp.com>
 * Steven Levithan (c) 2010-present MIT License
 * Unicode data by Mathias Bynens <mathiasbynens.be>
 */
var _default = function _default(XRegExp) {
  /**
   * Adds support for all Unicode scripts. E.g., `\p{Latin}`. Token names are case insensitive,
   * and any spaces, hyphens, and underscores are ignored.
   *
   * Uses Unicode 11.0.0.
   *
   * @requires XRegExp, Unicode Base
   */
  if (!XRegExp.addUnicodeData) {
    throw new ReferenceError('Unicode Base must be loaded before Unicode Scripts');
  }

  XRegExp.addUnicodeData(_scripts.default);
};

exports.default = _default;
module.exports = exports["default"];

/***/ }),
/* 448 */
/***/ (function(module, exports) {

module.exports = [
    {
        'name': 'Adlam',
        'astral': '\uD83A[\uDD00-\uDD4A\uDD50-\uDD59\uDD5E\uDD5F]'
    },
    {
        'name': 'Ahom',
        'astral': '\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3F]'
    },
    {
        'name': 'Anatolian_Hieroglyphs',
        'astral': '\uD811[\uDC00-\uDE46]'
    },
    {
        'name': 'Arabic',
        'bmp': '\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u08A0-\u08B4\u08B6-\u08BD\u08D3-\u08E1\u08E3-\u08FF\uFB50-\uFBC1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFD\uFE70-\uFE74\uFE76-\uFEFC',
        'astral': '\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]'
    },
    {
        'name': 'Armenian',
        'bmp': '\u0531-\u0556\u0559-\u0588\u058A\u058D-\u058F\uFB13-\uFB17'
    },
    {
        'name': 'Avestan',
        'astral': '\uD802[\uDF00-\uDF35\uDF39-\uDF3F]'
    },
    {
        'name': 'Balinese',
        'bmp': '\u1B00-\u1B4B\u1B50-\u1B7C'
    },
    {
        'name': 'Bamum',
        'bmp': '\uA6A0-\uA6F7',
        'astral': '\uD81A[\uDC00-\uDE38]'
    },
    {
        'name': 'Bassa_Vah',
        'astral': '\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]'
    },
    {
        'name': 'Batak',
        'bmp': '\u1BC0-\u1BF3\u1BFC-\u1BFF'
    },
    {
        'name': 'Bengali',
        'bmp': '\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE'
    },
    {
        'name': 'Bhaiksuki',
        'astral': '\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC45\uDC50-\uDC6C]'
    },
    {
        'name': 'Bopomofo',
        'bmp': '\u02EA\u02EB\u3105-\u312F\u31A0-\u31BA'
    },
    {
        'name': 'Brahmi',
        'astral': '\uD804[\uDC00-\uDC4D\uDC52-\uDC6F\uDC7F]'
    },
    {
        'name': 'Braille',
        'bmp': '\u2800-\u28FF'
    },
    {
        'name': 'Buginese',
        'bmp': '\u1A00-\u1A1B\u1A1E\u1A1F'
    },
    {
        'name': 'Buhid',
        'bmp': '\u1740-\u1753'
    },
    {
        'name': 'Canadian_Aboriginal',
        'bmp': '\u1400-\u167F\u18B0-\u18F5'
    },
    {
        'name': 'Carian',
        'astral': '\uD800[\uDEA0-\uDED0]'
    },
    {
        'name': 'Caucasian_Albanian',
        'astral': '\uD801[\uDD30-\uDD63\uDD6F]'
    },
    {
        'name': 'Chakma',
        'astral': '\uD804[\uDD00-\uDD34\uDD36-\uDD46]'
    },
    {
        'name': 'Cham',
        'bmp': '\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAA5F'
    },
    {
        'name': 'Cherokee',
        'bmp': '\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF'
    },
    {
        'name': 'Common',
        'bmp': '\0-@\\[-`\\{-\xA9\xAB-\xB9\xBB-\xBF\xD7\xF7\u02B9-\u02DF\u02E5-\u02E9\u02EC-\u02FF\u0374\u037E\u0385\u0387\u0589\u0605\u060C\u061B\u061F\u0640\u06DD\u08E2\u0964\u0965\u0E3F\u0FD5-\u0FD8\u10FB\u16EB-\u16ED\u1735\u1736\u1802\u1803\u1805\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u2000-\u200B\u200E-\u2064\u2066-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20BF\u2100-\u2125\u2127-\u2129\u212C-\u2131\u2133-\u214D\u214F-\u215F\u2189-\u218B\u2190-\u2426\u2440-\u244A\u2460-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B98-\u2BC8\u2BCA-\u2BFE\u2E00-\u2E4E\u2FF0-\u2FFB\u3000-\u3004\u3006\u3008-\u3020\u3030-\u3037\u303C-\u303F\u309B\u309C\u30A0\u30FB\u30FC\u3190-\u319F\u31C0-\u31E3\u3220-\u325F\u327F-\u32CF\u3358-\u33FF\u4DC0-\u4DFF\uA700-\uA721\uA788-\uA78A\uA830-\uA839\uA92E\uA9CF\uAB5B\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFF70\uFF9E\uFF9F\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD',
        'astral': '\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9B\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDEE0-\uDEF3\uDF00-\uDF56\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uD83B[\uDC71-\uDCB4]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDD0C\uDD10-\uDD6B\uDD70-\uDDAC\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED4\uDEE0-\uDEEC\uDEF0-\uDEF9\uDF00-\uDF73\uDF80-\uDFD8]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDD00-\uDD0B\uDD10-\uDD3E\uDD40-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF\uDE60-\uDE6D]|\uDB40[\uDC01\uDC20-\uDC7F]'
    },
    {
        'name': 'Coptic',
        'bmp': '\u03E2-\u03EF\u2C80-\u2CF3\u2CF9-\u2CFF'
    },
    {
        'name': 'Cuneiform',
        'astral': '\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]'
    },
    {
        'name': 'Cypriot',
        'astral': '\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]'
    },
    {
        'name': 'Cyrillic',
        'bmp': '\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F'
    },
    {
        'name': 'Deseret',
        'astral': '\uD801[\uDC00-\uDC4F]'
    },
    {
        'name': 'Devanagari',
        'bmp': '\u0900-\u0950\u0953-\u0963\u0966-\u097F\uA8E0-\uA8FF'
    },
    {
        'name': 'Dogra',
        'astral': '\uD806[\uDC00-\uDC3B]'
    },
    {
        'name': 'Duployan',
        'astral': '\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]'
    },
    {
        'name': 'Egyptian_Hieroglyphs',
        'astral': '\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]'
    },
    {
        'name': 'Elbasan',
        'astral': '\uD801[\uDD00-\uDD27]'
    },
    {
        'name': 'Ethiopic',
        'bmp': '\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E'
    },
    {
        'name': 'Georgian',
        'bmp': '\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D'
    },
    {
        'name': 'Glagolitic',
        'bmp': '\u2C00-\u2C2E\u2C30-\u2C5E',
        'astral': '\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]'
    },
    {
        'name': 'Gothic',
        'astral': '\uD800[\uDF30-\uDF4A]'
    },
    {
        'name': 'Grantha',
        'astral': '\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]'
    },
    {
        'name': 'Greek',
        'bmp': '\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65',
        'astral': '\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]'
    },
    {
        'name': 'Gujarati',
        'bmp': '\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF'
    },
    {
        'name': 'Gunjala_Gondi',
        'astral': '\uD807[\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9]'
    },
    {
        'name': 'Gurmukhi',
        'bmp': '\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76'
    },
    {
        'name': 'Han',
        'bmp': '\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DB5\u4E00-\u9FEF\uF900-\uFA6D\uFA70-\uFAD9',
        'astral': '[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]'
    },
    {
        'name': 'Hangul',
        'bmp': '\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC'
    },
    {
        'name': 'Hanifi_Rohingya',
        'astral': '\uD803[\uDD00-\uDD27\uDD30-\uDD39]'
    },
    {
        'name': 'Hanunoo',
        'bmp': '\u1720-\u1734'
    },
    {
        'name': 'Hatran',
        'astral': '\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]'
    },
    {
        'name': 'Hebrew',
        'bmp': '\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F'
    },
    {
        'name': 'Hiragana',
        'bmp': '\u3041-\u3096\u309D-\u309F',
        'astral': '\uD82C[\uDC01-\uDD1E]|\uD83C\uDE00'
    },
    {
        'name': 'Imperial_Aramaic',
        'astral': '\uD802[\uDC40-\uDC55\uDC57-\uDC5F]'
    },
    {
        'name': 'Inherited',
        'bmp': '\u0300-\u036F\u0485\u0486\u064B-\u0655\u0670\u0951\u0952\u1AB0-\u1ABE\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u200D\u20D0-\u20F0\u302A-\u302D\u3099\u309A\uFE00-\uFE0F\uFE20-\uFE2D',
        'astral': '\uD800[\uDDFD\uDEE0]|\uD804\uDF3B|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uDB40[\uDD00-\uDDEF]'
    },
    {
        'name': 'Inscriptional_Pahlavi',
        'astral': '\uD802[\uDF60-\uDF72\uDF78-\uDF7F]'
    },
    {
        'name': 'Inscriptional_Parthian',
        'astral': '\uD802[\uDF40-\uDF55\uDF58-\uDF5F]'
    },
    {
        'name': 'Javanese',
        'bmp': '\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF'
    },
    {
        'name': 'Kaithi',
        'astral': '\uD804[\uDC80-\uDCC1\uDCCD]'
    },
    {
        'name': 'Kannada',
        'bmp': '\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2'
    },
    {
        'name': 'Katakana',
        'bmp': '\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D',
        'astral': '\uD82C\uDC00'
    },
    {
        'name': 'Kayah_Li',
        'bmp': '\uA900-\uA92D\uA92F'
    },
    {
        'name': 'Kharoshthi',
        'astral': '\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58]'
    },
    {
        'name': 'Khmer',
        'bmp': '\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF'
    },
    {
        'name': 'Khojki',
        'astral': '\uD804[\uDE00-\uDE11\uDE13-\uDE3E]'
    },
    {
        'name': 'Khudawadi',
        'astral': '\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]'
    },
    {
        'name': 'Lao',
        'bmp': '\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF'
    },
    {
        'name': 'Latin',
        'bmp': 'A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7B9\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A'
    },
    {
        'name': 'Lepcha',
        'bmp': '\u1C00-\u1C37\u1C3B-\u1C49\u1C4D-\u1C4F'
    },
    {
        'name': 'Limbu',
        'bmp': '\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u194F'
    },
    {
        'name': 'Linear_A',
        'astral': '\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]'
    },
    {
        'name': 'Linear_B',
        'astral': '\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]'
    },
    {
        'name': 'Lisu',
        'bmp': '\uA4D0-\uA4FF'
    },
    {
        'name': 'Lycian',
        'astral': '\uD800[\uDE80-\uDE9C]'
    },
    {
        'name': 'Lydian',
        'astral': '\uD802[\uDD20-\uDD39\uDD3F]'
    },
    {
        'name': 'Mahajani',
        'astral': '\uD804[\uDD50-\uDD76]'
    },
    {
        'name': 'Makasar',
        'astral': '\uD807[\uDEE0-\uDEF8]'
    },
    {
        'name': 'Malayalam',
        'bmp': '\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F'
    },
    {
        'name': 'Mandaic',
        'bmp': '\u0840-\u085B\u085E'
    },
    {
        'name': 'Manichaean',
        'astral': '\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]'
    },
    {
        'name': 'Marchen',
        'astral': '\uD807[\uDC70-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]'
    },
    {
        'name': 'Masaram_Gondi',
        'astral': '\uD807[\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]'
    },
    {
        'name': 'Medefaidrin',
        'astral': '\uD81B[\uDE40-\uDE9A]'
    },
    {
        'name': 'Meetei_Mayek',
        'bmp': '\uAAE0-\uAAF6\uABC0-\uABED\uABF0-\uABF9'
    },
    {
        'name': 'Mende_Kikakui',
        'astral': '\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]'
    },
    {
        'name': 'Meroitic_Cursive',
        'astral': '\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]'
    },
    {
        'name': 'Meroitic_Hieroglyphs',
        'astral': '\uD802[\uDD80-\uDD9F]'
    },
    {
        'name': 'Miao',
        'astral': '\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]'
    },
    {
        'name': 'Modi',
        'astral': '\uD805[\uDE00-\uDE44\uDE50-\uDE59]'
    },
    {
        'name': 'Mongolian',
        'bmp': '\u1800\u1801\u1804\u1806-\u180E\u1810-\u1819\u1820-\u1878\u1880-\u18AA',
        'astral': '\uD805[\uDE60-\uDE6C]'
    },
    {
        'name': 'Mro',
        'astral': '\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]'
    },
    {
        'name': 'Multani',
        'astral': '\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]'
    },
    {
        'name': 'Myanmar',
        'bmp': '\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F'
    },
    {
        'name': 'Nabataean',
        'astral': '\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]'
    },
    {
        'name': 'New_Tai_Lue',
        'bmp': '\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE\u19DF'
    },
    {
        'name': 'Newa',
        'astral': '\uD805[\uDC00-\uDC59\uDC5B\uDC5D\uDC5E]'
    },
    {
        'name': 'Nko',
        'bmp': '\u07C0-\u07FA\u07FD-\u07FF'
    },
    {
        'name': 'Nushu',
        'astral': '\uD81B\uDFE1|\uD82C[\uDD70-\uDEFB]'
    },
    {
        'name': 'Ogham',
        'bmp': '\u1680-\u169C'
    },
    {
        'name': 'Ol_Chiki',
        'bmp': '\u1C50-\u1C7F'
    },
    {
        'name': 'Old_Hungarian',
        'astral': '\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]'
    },
    {
        'name': 'Old_Italic',
        'astral': '\uD800[\uDF00-\uDF23\uDF2D-\uDF2F]'
    },
    {
        'name': 'Old_North_Arabian',
        'astral': '\uD802[\uDE80-\uDE9F]'
    },
    {
        'name': 'Old_Permic',
        'astral': '\uD800[\uDF50-\uDF7A]'
    },
    {
        'name': 'Old_Persian',
        'astral': '\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]'
    },
    {
        'name': 'Old_Sogdian',
        'astral': '\uD803[\uDF00-\uDF27]'
    },
    {
        'name': 'Old_South_Arabian',
        'astral': '\uD802[\uDE60-\uDE7F]'
    },
    {
        'name': 'Old_Turkic',
        'astral': '\uD803[\uDC00-\uDC48]'
    },
    {
        'name': 'Oriya',
        'bmp': '\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77'
    },
    {
        'name': 'Osage',
        'astral': '\uD801[\uDCB0-\uDCD3\uDCD8-\uDCFB]'
    },
    {
        'name': 'Osmanya',
        'astral': '\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]'
    },
    {
        'name': 'Pahawh_Hmong',
        'astral': '\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]'
    },
    {
        'name': 'Palmyrene',
        'astral': '\uD802[\uDC60-\uDC7F]'
    },
    {
        'name': 'Pau_Cin_Hau',
        'astral': '\uD806[\uDEC0-\uDEF8]'
    },
    {
        'name': 'Phags_Pa',
        'bmp': '\uA840-\uA877'
    },
    {
        'name': 'Phoenician',
        'astral': '\uD802[\uDD00-\uDD1B\uDD1F]'
    },
    {
        'name': 'Psalter_Pahlavi',
        'astral': '\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]'
    },
    {
        'name': 'Rejang',
        'bmp': '\uA930-\uA953\uA95F'
    },
    {
        'name': 'Runic',
        'bmp': '\u16A0-\u16EA\u16EE-\u16F8'
    },
    {
        'name': 'Samaritan',
        'bmp': '\u0800-\u082D\u0830-\u083E'
    },
    {
        'name': 'Saurashtra',
        'bmp': '\uA880-\uA8C5\uA8CE-\uA8D9'
    },
    {
        'name': 'Sharada',
        'astral': '\uD804[\uDD80-\uDDCD\uDDD0-\uDDDF]'
    },
    {
        'name': 'Shavian',
        'astral': '\uD801[\uDC50-\uDC7F]'
    },
    {
        'name': 'Siddham',
        'astral': '\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]'
    },
    {
        'name': 'SignWriting',
        'astral': '\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]'
    },
    {
        'name': 'Sinhala',
        'bmp': '\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4',
        'astral': '\uD804[\uDDE1-\uDDF4]'
    },
    {
        'name': 'Sogdian',
        'astral': '\uD803[\uDF30-\uDF59]'
    },
    {
        'name': 'Sora_Sompeng',
        'astral': '\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]'
    },
    {
        'name': 'Soyombo',
        'astral': '\uD806[\uDE50-\uDE83\uDE86-\uDEA2]'
    },
    {
        'name': 'Sundanese',
        'bmp': '\u1B80-\u1BBF\u1CC0-\u1CC7'
    },
    {
        'name': 'Syloti_Nagri',
        'bmp': '\uA800-\uA82B'
    },
    {
        'name': 'Syriac',
        'bmp': '\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A'
    },
    {
        'name': 'Tagalog',
        'bmp': '\u1700-\u170C\u170E-\u1714'
    },
    {
        'name': 'Tagbanwa',
        'bmp': '\u1760-\u176C\u176E-\u1770\u1772\u1773'
    },
    {
        'name': 'Tai_Le',
        'bmp': '\u1950-\u196D\u1970-\u1974'
    },
    {
        'name': 'Tai_Tham',
        'bmp': '\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD'
    },
    {
        'name': 'Tai_Viet',
        'bmp': '\uAA80-\uAAC2\uAADB-\uAADF'
    },
    {
        'name': 'Takri',
        'astral': '\uD805[\uDE80-\uDEB7\uDEC0-\uDEC9]'
    },
    {
        'name': 'Tamil',
        'bmp': '\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA'
    },
    {
        'name': 'Tangut',
        'astral': '\uD81B\uDFE0|[\uD81C-\uD820][\uDC00-\uDFFF]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]'
    },
    {
        'name': 'Telugu',
        'bmp': '\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7F'
    },
    {
        'name': 'Thaana',
        'bmp': '\u0780-\u07B1'
    },
    {
        'name': 'Thai',
        'bmp': '\u0E01-\u0E3A\u0E40-\u0E5B'
    },
    {
        'name': 'Tibetan',
        'bmp': '\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA'
    },
    {
        'name': 'Tifinagh',
        'bmp': '\u2D30-\u2D67\u2D6F\u2D70\u2D7F'
    },
    {
        'name': 'Tirhuta',
        'astral': '\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]'
    },
    {
        'name': 'Ugaritic',
        'astral': '\uD800[\uDF80-\uDF9D\uDF9F]'
    },
    {
        'name': 'Vai',
        'bmp': '\uA500-\uA62B'
    },
    {
        'name': 'Warang_Citi',
        'astral': '\uD806[\uDCA0-\uDCF2\uDCFF]'
    },
    {
        'name': 'Yi',
        'bmp': '\uA000-\uA48C\uA490-\uA4C6'
    },
    {
        'name': 'Zanabazar_Square',
        'astral': '\uD806[\uDE00-\uDE47]'
    }
];


/***/ }),
/* 449 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(0);
var OmniboxAnalytics = /** @class */ (function () {
    function OmniboxAnalytics() {
        this.partialQueries = [];
        this.suggestions = [];
        this.analyticsLengthLimit = 256;
    }
    OmniboxAnalytics.prototype.buildCustomDataForPartialQueries = function () {
        this.partialQuery = underscore_1.last(this.partialQueries);
        return {
            partialQueries: this.cleanCustomData(this.partialQueries),
            suggestionRanking: this.suggestionRanking,
            suggestions: this.cleanCustomData(this.suggestions),
            partialQuery: this.partialQuery
        };
    };
    OmniboxAnalytics.prototype.cleanCustomData = function (toClean, rejectLength) {
        var _this = this;
        if (rejectLength === void 0) { rejectLength = this.analyticsLengthLimit; }
        var filterOutConsecutiveValues = this.filterOutConsecutiveValues(toClean);
        // Custom dimensions cannot be an array in analytics service: Send a string joined by ; instead.
        // Need to replace ;
        var redimensionedArray = filterOutConsecutiveValues.map(function (value) { return _this.removeSemicolons(value); });
        // Reduce right to get the last X words that adds to less then rejectLength
        var reducedToRejectLengthOrLess = this.reduceAnalyticsToLengthLimit(redimensionedArray, rejectLength);
        var cleanStrings = reducedToRejectLengthOrLess.reverse();
        var ret = cleanStrings.join(';');
        // analytics service can store max 256 char in a custom event
        // if we're over that, call cleanup again with an arbitrary 10 less char accepted
        if (ret.length >= this.analyticsLengthLimit) {
            return this.cleanCustomData(cleanStrings, rejectLength - 10);
        }
        return cleanStrings.join(';');
    };
    OmniboxAnalytics.prototype.filterOutConsecutiveValues = function (toClean) {
        return underscore_1.compact(underscore_1.filter(toClean, function (partial, pos, array) {
            return pos === 0 || partial !== array[pos - 1];
        }));
    };
    OmniboxAnalytics.prototype.removeSemicolons = function (partial) {
        return partial.replace(/;/g, '');
    };
    OmniboxAnalytics.prototype.reduceAnalyticsToLengthLimit = function (toClean, rejectLength) {
        var reducedToRejectLengthOrLess = [];
        underscore_1.reduceRight(toClean, function (memo, partial) {
            var totalSoFar = memo + partial.length;
            if (totalSoFar <= rejectLength) {
                reducedToRejectLengthOrLess.push(partial);
            }
            return totalSoFar;
        }, 0);
        return reducedToRejectLengthOrLess;
    };
    return OmniboxAnalytics;
}());
exports.OmniboxAnalytics = OmniboxAnalytics;


/***/ }),
/* 450 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Dom_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(9);
var QueryEvents_1 = __webpack_require__(11);
var underscore_1 = __webpack_require__(0);
var RegisteredNamedMethods_1 = __webpack_require__(30);
var FacetColumnAutoLayoutAdjustment = /** @class */ (function () {
    function FacetColumnAutoLayoutAdjustment() {
    }
    FacetColumnAutoLayoutAdjustment.isAutoLayoutAdjustable = function (component) {
        return 'isCurrentlyDisplayed' in component;
    };
    FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment = function (root, component) {
        var _this = this;
        if (!this.autoLayoutAdjustmentComponent.has(root)) {
            this.autoLayoutAdjustmentComponent.set(root, []);
        }
        this.autoLayoutAdjustmentComponent.get(root).push(component);
        if (this.autoLayoutAdjustmentHandlers.has(root)) {
            return;
        }
        var hiddenClass = 'coveo-no-visible-facet';
        var handler = function () {
            return Dom_1.$$(root).on(QueryEvents_1.QueryEvents.deferredQuerySuccess, function () {
                var column = _this.findColumn(root);
                if (_this.everyStandardComponentsAreInvisible(root) && _this.columnsDoesNotContainVisibleCustomElement(column)) {
                    Dom_1.$$(root).addClass(hiddenClass);
                }
                else {
                    Dom_1.$$(root).removeClass(hiddenClass);
                }
            });
        };
        handler();
        this.autoLayoutAdjustmentHandlers.set(root, handler);
    };
    FacetColumnAutoLayoutAdjustment.columnsDoesNotContainVisibleCustomElement = function (column) {
        var _this = this;
        if (!column) {
            return true;
        }
        var children = Dom_1.$$(column).children();
        var shouldBeIgnored = ['coveo-facet-header-filter-by-container', 'coveo-topSpace', 'coveo-bottomSpace'];
        var columnDoesNotContainVisibleCustomElement = underscore_1.every(children, function (child) {
            var willBeIgnored = underscore_1.find(shouldBeIgnored, function (toIgnore) {
                return Dom_1.$$(child).hasClass(toIgnore);
            });
            if (willBeIgnored != null) {
                return true;
            }
            try {
                var component = RegisteredNamedMethods_1.get(child);
                if (component && _this.isAutoLayoutAdjustable(component)) {
                    return true;
                }
            }
            catch (e) { }
            return !Dom_1.$$(child).isVisible();
        });
        return columnDoesNotContainVisibleCustomElement;
    };
    FacetColumnAutoLayoutAdjustment.everyStandardComponentsAreInvisible = function (root) {
        var components = this.autoLayoutAdjustmentComponent.get(root);
        return underscore_1.every(components, function (component) { return !component.isCurrentlyDisplayed(); });
    };
    FacetColumnAutoLayoutAdjustment.findColumn = function (root) {
        var column = Dom_1.$$(root).find('.coveo-facet-column');
        if (!column) {
            var logger = new Logger_1.Logger('ResponsiveFacets');
            logger.info('No element with class coveo-facet-column. Facet column auto layout adjustment cannot be enabled');
        }
        return column;
    };
    FacetColumnAutoLayoutAdjustment.autoLayoutAdjustmentComponent = new Map();
    FacetColumnAutoLayoutAdjustment.autoLayoutAdjustmentHandlers = new Map();
    return FacetColumnAutoLayoutAdjustment;
}());
exports.FacetColumnAutoLayoutAdjustment = FacetColumnAutoLayoutAdjustment;


/***/ }),
/* 451 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var QueryStateModel_1 = __webpack_require__(13);
var ComponentsTypes_1 = __webpack_require__(47);
var FacetValueStateHandler = /** @class */ (function () {
    function FacetValueStateHandler(searchInterface) {
        this.searchInterface = searchInterface;
    }
    FacetValueStateHandler.prototype.handleFacetValueState = function (stateToSet) {
        var allFacets = ComponentsTypes_1.ComponentsTypes.getAllFacetsFromSearchInterface(this.searchInterface);
        var fvState = stateToSet.fv;
        var facetValueStateToFacetState = new FacetValueStateToFacetStateTransformer(stateToSet, fvState, allFacets);
        var facetValueStateToHiddenQuery = new FacetValueStateToHiddenQueryTransformer(stateToSet, fvState);
        var allFieldIdsInFacetValueState = Object.keys(fvState);
        var remainingFields = allFieldIdsInFacetValueState
            .filter(function (field) { return fvState[field] && fvState[field].length > 0; })
            .filter(function (field) { return !facetValueStateToFacetState.tryTransform(field, fvState[field]); });
        facetValueStateToHiddenQuery.transform(remainingFields);
    };
    return FacetValueStateHandler;
}());
exports.FacetValueStateHandler = FacetValueStateHandler;
var FacetValueStateToFacetStateTransformer = /** @class */ (function () {
    function FacetValueStateToFacetStateTransformer(queryState, facetValueState, allFacets) {
        this.queryState = queryState;
        this.facetValueState = facetValueState;
        this.allFacets = allFacets;
    }
    FacetValueStateToFacetStateTransformer.prototype.tryTransform = function (fieldId, valueInState) {
        var _this = this;
        var facetsWithField = this.allFacets.filter(function (facet) { return facet.options.field == fieldId; });
        if (facetsWithField.length > 0) {
            delete this.facetValueState[fieldId];
            facetsWithField.forEach(function (facet) { return (_this.queryState[QueryStateModel_1.QueryStateModel.getFacetId(facet.options.id)] = valueInState); });
            return true;
        }
        else {
            return false;
        }
    };
    return FacetValueStateToFacetStateTransformer;
}());
var FacetValueStateToHiddenQueryTransformer = /** @class */ (function () {
    function FacetValueStateToHiddenQueryTransformer(queryState, facetValueState) {
        this.queryState = queryState;
        this.facetValueState = facetValueState;
    }
    FacetValueStateToHiddenQueryTransformer.prototype.transform = function (fieldIds) {
        var _this = this;
        var valuesTransformedToHiddenQuery = fieldIds.map(function (fieldId) { return _this.facetValueIntoQuery(fieldId); });
        if (valuesTransformedToHiddenQuery.length > 0) {
            this.queryState[QueryStateModel_1.QueryStateModel.attributesEnum.hq] = valuesTransformedToHiddenQuery.join(' AND ');
        }
    };
    FacetValueStateToHiddenQueryTransformer.prototype.facetValueIntoQuery = function (fieldId) {
        var value = this.facetValueState[fieldId];
        delete this.facetValueState[fieldId];
        return fieldId + "==\"" + value + "\"";
    };
    return FacetValueStateToHiddenQueryTransformer;
}());


/***/ }),
/* 452 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var ResultListEvents_1 = __webpack_require__(29);
var Dom_1 = __webpack_require__(1);
var Logger_1 = __webpack_require__(9);
var StorageUtils_1 = __webpack_require__(209);
var ScrollRestorer = /** @class */ (function () {
    function ScrollRestorer(root, queryStateModel) {
        var _this = this;
        this.root = root;
        this.queryStateModel = queryStateModel;
        this.ID = 'ScrollRestorer';
        this.restorationTimeOutInMs = 5000;
        this.tryToScrollIntervalInMs = 50;
        this.scrollInfoStorage = new StorageUtils_1.StorageUtils(this.ID, 'session');
        window.addEventListener('beforeunload', function () {
            _this.saveScrollInfo();
        });
        Dom_1.$$(this.root).on(ResultListEvents_1.ResultListEvents.newResultsDisplayed, function (event, args) {
            return _this.handleNewResultsDisplayed(args);
        });
    }
    ScrollRestorer.prototype.saveScrollInfo = function () {
        var scrollInfo = {
            pageHeight: window.document.body.scrollHeight,
            lastPosition: window.pageYOffset
        };
        var key = this.getKeyForCurrentQuery();
        var prevScrollInfo = this.scrollInfoStorage.load();
        this.scrollInfoStorage.save(__assign({}, prevScrollInfo, (_a = {}, _a[key] = scrollInfo, _a)));
        var _a;
    };
    ScrollRestorer.prototype.handleNewResultsDisplayed = function (args) {
        if (args.isInfiniteScrollEnabled) {
            new Logger_1.Logger(this).warn('Scroll restoration is not supported on result lists with infinite scrolling enabled.');
            this.resetScrollInfo();
            return;
        }
        var scrollInfo = this.getScrollInfoForCurrentQuery();
        this.resetScrollInfo();
        if (scrollInfo && scrollInfo.lastPosition) {
            var stopTryingAt = Date.now() + this.restorationTimeOutInMs;
            this.tryToRestoreScrollPosition(scrollInfo, stopTryingAt);
        }
    };
    ScrollRestorer.prototype.resetScrollInfo = function () {
        this.scrollInfoStorage.remove(this.getKeyForCurrentQuery());
    };
    ScrollRestorer.prototype.tryToRestoreScrollPosition = function (scrollInfo, stopAt) {
        var _this = this;
        var html = window.document.documentElement;
        var body = window.document.body;
        var documentHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
        clearTimeout(this.timeoutHandle);
        if (documentHeight >= scrollInfo.pageHeight || Date.now() >= stopAt) {
            window.scrollTo(0, scrollInfo.lastPosition);
        }
        else {
            this.timeoutHandle = setTimeout(function () { return _this.tryToRestoreScrollPosition(scrollInfo, stopAt); }, this.tryToScrollIntervalInMs);
        }
    };
    ScrollRestorer.prototype.getScrollInfoForCurrentQuery = function () {
        var scrollInfo = this.scrollInfoStorage.load() || {};
        return scrollInfo[this.getKeyForCurrentQuery()];
    };
    ScrollRestorer.prototype.getKeyForCurrentQuery = function () {
        return JSON.stringify(this.queryStateModel.getAttributes());
    };
    return ScrollRestorer;
}());
exports.ScrollRestorer = ScrollRestorer;


/***/ }),
/* 453 */
/***/ (function(module, exports) {

module.exports = function(module) {
	if(!module.webpackPolyfill) {
		module.deprecate = function() {};
		module.paths = [];
		// module.parent = undefined by default
		if(!module.children) module.children = [];
		Object.defineProperty(module, "loaded", {
			enumerable: true,
			get: function() {
				return module.l;
			}
		});
		Object.defineProperty(module, "id", {
			enumerable: true,
			get: function() {
				return module.i;
			}
		});
		module.webpackPolyfill = 1;
	}
	return module;
};


/***/ }),
/* 454 */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),
/* 455 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Component_1 = __webpack_require__(7);
var Dom_1 = __webpack_require__(1);
var _ = __webpack_require__(0);
var Initialization_1 = __webpack_require__(2);
var UtilsModules_1 = __webpack_require__(74);
var InitializationHelper = /** @class */ (function () {
    function InitializationHelper() {
    }
    InitializationHelper.findDOMElementsToIgnore = function (container, componentIdsToIgnore) {
        var _this = this;
        var htmlElementsToIgnore = [];
        _.each(componentIdsToIgnore, function (componentIdToIgnore) {
            var rootsToIgnore = _this.findDOMElementsMatchingComponentId(container, componentIdToIgnore);
            htmlElementsToIgnore = UtilsModules_1.Utils.concatWithoutDuplicate(htmlElementsToIgnore, rootsToIgnore);
            _.each(rootsToIgnore, function (rootToIgnore) {
                var childsElementsToIgnore = Dom_1.$$(rootToIgnore).findAll('*');
                htmlElementsToIgnore = UtilsModules_1.Utils.concatWithoutDuplicate(htmlElementsToIgnore, childsElementsToIgnore);
            });
        });
        return htmlElementsToIgnore;
    };
    InitializationHelper.findDOMElementsToInitialize = function (container, htmlElementsToIgnore) {
        var _this = this;
        var elementsToInitialize = [];
        _.each(Initialization_1.Initialization.getListOfRegisteredComponents(), function (componentClassId) {
            var htmlElements = [];
            htmlElements = UtilsModules_1.Utils.concatWithoutDuplicate(htmlElements, _this.findDOMElementsMatchingComponentId(container, componentClassId));
            var aliases = Initialization_1.Initialization.componentAliases[componentClassId];
            _.each(aliases, function (alias) {
                htmlElements = UtilsModules_1.Utils.concatWithoutDuplicate(htmlElements, _this.findDOMElementsMatchingComponentId(container, alias));
            });
            if (Dom_1.$$(container).hasClass(Component_1.Component.computeCssClassNameForType("" + componentClassId)) &&
                !_.contains(htmlElementsToIgnore, container)) {
                htmlElements.push(container);
            }
            elementsToInitialize.push({
                componentClassId: componentClassId,
                htmlElements: _.difference(htmlElements, htmlElementsToIgnore)
            });
        });
        return elementsToInitialize;
    };
    InitializationHelper.findDOMElementsMatchingComponentId = function (container, componentId) {
        var classname = Component_1.Component.computeCssClassNameForType("" + componentId);
        return Dom_1.$$(container).findAll("." + classname);
    };
    return InitializationHelper;
}());
exports.InitializationHelper = InitializationHelper;


/***/ }),
/* 456 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
var MultiAnalyticsClient = /** @class */ (function () {
    function MultiAnalyticsClient(analyticsClients) {
        if (analyticsClients === void 0) { analyticsClients = []; }
        this.analyticsClients = analyticsClients;
        this.isContextual = false;
        this.endpoint = _.first(this.analyticsClients).endpoint;
    }
    MultiAnalyticsClient.prototype.isActivated = function () {
        return _.some(this.analyticsClients, function (analyticsClient) { return analyticsClient.isActivated(); });
    };
    MultiAnalyticsClient.prototype.getCurrentEventCause = function () {
        return _.find(_.map(this.analyticsClients, function (analyticsClient) { return analyticsClient.getCurrentEventCause(); }), function (currentEventCause) { return currentEventCause != null; });
    };
    MultiAnalyticsClient.prototype.getCurrentEventMeta = function () {
        return _.find(_.map(this.analyticsClients, function (analyticsClient) { return analyticsClient.getCurrentEventMeta(); }), function (currentEventMeta) { return currentEventMeta != null; });
    };
    MultiAnalyticsClient.prototype.logSearchEvent = function (actionCause, meta) {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.logSearchEvent(actionCause, meta); });
    };
    MultiAnalyticsClient.prototype.logSearchAsYouType = function (actionCause, meta) {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.logSearchEvent(actionCause, meta); });
    };
    MultiAnalyticsClient.prototype.logClickEvent = function (actionCause, meta, result, element) {
        return Promise.all(_.map(this.analyticsClients, function (analyticsClient) {
            return analyticsClient.logClickEvent(actionCause, meta, result, element);
        })).then(function (responses) { return _.first(responses); });
    };
    MultiAnalyticsClient.prototype.logCustomEvent = function (actionCause, meta, element) {
        return Promise.all(_.map(this.analyticsClients, function (analyticsClient) {
            return analyticsClient.logCustomEvent(actionCause, meta, element);
        })).then(function (responses) { return _.first(responses); });
    };
    MultiAnalyticsClient.prototype.getTopQueries = function (params) {
        var _this = this;
        return Promise.all(_.map(this.analyticsClients, function (client) {
            return client.getTopQueries(params);
        })).then(function (values) {
            return _this.mergeTopQueries(values, params.pageSize);
        });
    };
    MultiAnalyticsClient.prototype.getCurrentVisitIdPromise = function () {
        return _.first(this.analyticsClients).getCurrentVisitIdPromise();
    };
    MultiAnalyticsClient.prototype.getCurrentVisitId = function () {
        return _.first(this.analyticsClients).getCurrentVisitId();
    };
    MultiAnalyticsClient.prototype.sendAllPendingEvents = function () {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.sendAllPendingEvents(); });
    };
    MultiAnalyticsClient.prototype.warnAboutSearchEvent = function () {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.warnAboutSearchEvent(); });
    };
    MultiAnalyticsClient.prototype.cancelAllPendingEvents = function () {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.cancelAllPendingEvents(); });
    };
    MultiAnalyticsClient.prototype.getPendingSearchEvent = function () {
        return _.first(this.analyticsClients).getPendingSearchEvent();
    };
    MultiAnalyticsClient.prototype.setOriginContext = function (originContext) {
        _.each(this.analyticsClients, function (analyticsClient) { return analyticsClient.setOriginContext(originContext); });
    };
    MultiAnalyticsClient.prototype.getOriginContext = function () {
        return _.first(this.analyticsClients).getOriginContext();
    };
    MultiAnalyticsClient.prototype.getUserDisplayName = function () {
        return _.first(this.analyticsClients).getUserDisplayName();
    };
    MultiAnalyticsClient.prototype.mergeTopQueries = function (values, pageSize) {
        if (pageSize === void 0) { pageSize = 5; }
        return _.chain(values).flatten().first(pageSize).value();
    };
    return MultiAnalyticsClient;
}());
exports.MultiAnalyticsClient = MultiAnalyticsClient;


/***/ }),
/* 457 */
/***/ (function(module, exports, __webpack_require__) {

/*!
 * Pikaday
 *
 * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
 */

(function (root, factory)
{
    'use strict';

    var moment;
    if (true) {
        // CommonJS module
        // Load moment.js as an optional dependency
        try { moment = __webpack_require__(103); } catch (e) {}
        module.exports = factory(moment);
    } else if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(function (req)
        {
            // Load moment.js as an optional dependency
            var id = 'moment';
            try { moment = req(id); } catch (e) {}
            return factory(moment);
        });
    } else {
        root.Pikaday = factory(root.moment);
    }
}(this, function (moment)
{
    'use strict';

    /**
     * feature detection and helper functions
     */
    var hasMoment = typeof moment === 'function',

    hasEventListeners = !!window.addEventListener,

    document = window.document,

    sto = window.setTimeout,

    addEvent = function(el, e, callback, capture)
    {
        if (hasEventListeners) {
            el.addEventListener(e, callback, !!capture);
        } else {
            el.attachEvent('on' + e, callback);
        }
    },

    removeEvent = function(el, e, callback, capture)
    {
        if (hasEventListeners) {
            el.removeEventListener(e, callback, !!capture);
        } else {
            el.detachEvent('on' + e, callback);
        }
    },

    trim = function(str)
    {
        return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,'');
    },

    hasClass = function(el, cn)
    {
        return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;
    },

    addClass = function(el, cn)
    {
        if (!hasClass(el, cn)) {
            el.className = (el.className === '') ? cn : el.className + ' ' + cn;
        }
    },

    removeClass = function(el, cn)
    {
        el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));
    },

    isArray = function(obj)
    {
        return (/Array/).test(Object.prototype.toString.call(obj));
    },

    isDate = function(obj)
    {
        return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());
    },

    isWeekend = function(date)
    {
        var day = date.getDay();
        return day === 0 || day === 6;
    },

    isLeapYear = function(year)
    {
        // solution by Matti Virkkunen: http://stackoverflow.com/a/4881951
        return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
    },

    getDaysInMonth = function(year, month)
    {
        return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
    },

    setToStartOfDay = function(date)
    {
        if (isDate(date)) date.setHours(0,0,0,0);
    },

    compareDates = function(a,b)
    {
        // weak date comparison (use setToStartOfDay(date) to ensure correct result)
        return a.getTime() === b.getTime();
    },

    extend = function(to, from, overwrite)
    {
        var prop, hasProp;
        for (prop in from) {
            hasProp = to[prop] !== undefined;
            if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {
                if (isDate(from[prop])) {
                    if (overwrite) {
                        to[prop] = new Date(from[prop].getTime());
                    }
                }
                else if (isArray(from[prop])) {
                    if (overwrite) {
                        to[prop] = from[prop].slice(0);
                    }
                } else {
                    to[prop] = extend({}, from[prop], overwrite);
                }
            } else if (overwrite || !hasProp) {
                to[prop] = from[prop];
            }
        }
        return to;
    },

    fireEvent = function(el, eventName, data)
    {
        var ev;

        if (document.createEvent) {
            ev = document.createEvent('HTMLEvents');
            ev.initEvent(eventName, true, false);
            ev = extend(ev, data);
            el.dispatchEvent(ev);
        } else if (document.createEventObject) {
            ev = document.createEventObject();
            ev = extend(ev, data);
            el.fireEvent('on' + eventName, ev);
        }
    },

    adjustCalendar = function(calendar) {
        if (calendar.month < 0) {
            calendar.year -= Math.ceil(Math.abs(calendar.month)/12);
            calendar.month += 12;
        }
        if (calendar.month > 11) {
            calendar.year += Math.floor(Math.abs(calendar.month)/12);
            calendar.month -= 12;
        }
        return calendar;
    },

    /**
     * defaults and localisation
     */
    defaults = {

        // bind the picker to a form field
        field: null,

        // automatically show/hide the picker on `field` focus (default `true` if `field` is set)
        bound: undefined,

        // position of the datepicker, relative to the field (default to bottom & left)
        // ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)
        position: 'bottom left',

        // automatically fit in the viewport even if it means repositioning from the position option
        reposition: true,

        // the default output format for `.toString()` and `field` value
        format: 'YYYY-MM-DD',

        // the toString function which gets passed a current date object and format
        // and returns a string
        toString: null,

        // used to create date object from current input string
        parse: null,

        // the initial date to view when first opened
        defaultDate: null,

        // make the `defaultDate` the initial selected value
        setDefaultDate: false,

        // first day of week (0: Sunday, 1: Monday etc)
        firstDay: 0,

        // the default flag for moment's strict date parsing
        formatStrict: false,

        // the minimum/earliest date that can be selected
        minDate: null,
        // the maximum/latest date that can be selected
        maxDate: null,

        // number of years either side, or array of upper/lower range
        yearRange: 10,

        // show week numbers at head of row
        showWeekNumber: false,

        // Week picker mode
        pickWholeWeek: false,

        // used internally (don't config outside)
        minYear: 0,
        maxYear: 9999,
        minMonth: undefined,
        maxMonth: undefined,

        startRange: null,
        endRange: null,

        isRTL: false,

        // Additional text to append to the year in the calendar title
        yearSuffix: '',

        // Render the month after year in the calendar title
        showMonthAfterYear: false,

        // Render days of the calendar grid that fall in the next or previous month
        showDaysInNextAndPreviousMonths: false,

        // Allows user to select days that fall in the next or previous month
        enableSelectionDaysInNextAndPreviousMonths: false,

        // how many months are visible
        numberOfMonths: 1,

        // when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)
        // only used for the first display or when a selected date is not visible
        mainCalendar: 'left',

        // Specify a DOM element to render the calendar in
        container: undefined,

        // Blur field when date is selected
        blurFieldOnSelect : true,

        // internationalization
        i18n: {
            previousMonth : 'Previous Month',
            nextMonth     : 'Next Month',
            months        : ['January','February','March','April','May','June','July','August','September','October','November','December'],
            weekdays      : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
            weekdaysShort : ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']
        },

        // Theme Classname
        theme: null,

        // events array
        events: [],

        // callback function
        onSelect: null,
        onOpen: null,
        onClose: null,
        onDraw: null,

        // Enable keyboard input
        keyboardInput: true
    },


    /**
     * templating functions to abstract HTML rendering
     */
    renderDayName = function(opts, day, abbr)
    {
        day += opts.firstDay;
        while (day >= 7) {
            day -= 7;
        }
        return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];
    },

    renderDay = function(opts)
    {
        var arr = [];
        var ariaSelected = 'false';
        if (opts.isEmpty) {
            if (opts.showDaysInNextAndPreviousMonths) {
                arr.push('is-outside-current-month');

                if(!opts.enableSelectionDaysInNextAndPreviousMonths) {
                    arr.push('is-selection-disabled');
                }

            } else {
                return '<td class="is-empty"></td>';
            }
        }
        if (opts.isDisabled) {
            arr.push('is-disabled');
        }
        if (opts.isToday) {
            arr.push('is-today');
        }
        if (opts.isSelected) {
            arr.push('is-selected');
            ariaSelected = 'true';
        }
        if (opts.hasEvent) {
            arr.push('has-event');
        }
        if (opts.isInRange) {
            arr.push('is-inrange');
        }
        if (opts.isStartRange) {
            arr.push('is-startrange');
        }
        if (opts.isEndRange) {
            arr.push('is-endrange');
        }
        return '<td data-day="' + opts.day + '" class="' + arr.join(' ') + '" aria-selected="' + ariaSelected + '">' +
                 '<button class="pika-button pika-day" type="button" ' +
                    'data-pika-year="' + opts.year + '" data-pika-month="' + opts.month + '" data-pika-day="' + opts.day + '">' +
                        opts.day +
                 '</button>' +
               '</td>';
    },

    renderWeek = function (d, m, y) {
        // Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.
        var onejan = new Date(y, 0, 1),
            weekNum = Math.ceil((((new Date(y, m, d) - onejan) / 86400000) + onejan.getDay()+1)/7);
        return '<td class="pika-week">' + weekNum + '</td>';
    },

    renderRow = function(days, isRTL, pickWholeWeek, isRowSelected)
    {
        return '<tr class="pika-row' + (pickWholeWeek ? ' pick-whole-week' : '') + (isRowSelected ? ' is-selected' : '') + '">' + (isRTL ? days.reverse() : days).join('') + '</tr>';
    },

    renderBody = function(rows)
    {
        return '<tbody>' + rows.join('') + '</tbody>';
    },

    renderHead = function(opts)
    {
        var i, arr = [];
        if (opts.showWeekNumber) {
            arr.push('<th></th>');
        }
        for (i = 0; i < 7; i++) {
            arr.push('<th scope="col"><abbr title="' + renderDayName(opts, i) + '">' + renderDayName(opts, i, true) + '</abbr></th>');
        }
        return '<thead><tr>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</tr></thead>';
    },

    renderTitle = function(instance, c, year, month, refYear, randId)
    {
        var i, j, arr,
            opts = instance._o,
            isMinYear = year === opts.minYear,
            isMaxYear = year === opts.maxYear,
            html = '<div id="' + randId + '" class="pika-title" role="heading" aria-live="assertive">',
            monthHtml,
            yearHtml,
            prev = true,
            next = true;

        for (arr = [], i = 0; i < 12; i++) {
            arr.push('<option value="' + (year === refYear ? i - c : 12 + i - c) + '"' +
                (i === month ? ' selected="selected"': '') +
                ((isMinYear && i < opts.minMonth) || (isMaxYear && i > opts.maxMonth) ? 'disabled="disabled"' : '') + '>' +
                opts.i18n.months[i] + '</option>');
        }

        monthHtml = '<div class="pika-label">' + opts.i18n.months[month] + '<select class="pika-select pika-select-month" tabindex="-1">' + arr.join('') + '</select></div>';

        if (isArray(opts.yearRange)) {
            i = opts.yearRange[0];
            j = opts.yearRange[1] + 1;
        } else {
            i = year - opts.yearRange;
            j = 1 + year + opts.yearRange;
        }

        for (arr = []; i < j && i <= opts.maxYear; i++) {
            if (i >= opts.minYear) {
                arr.push('<option value="' + i + '"' + (i === year ? ' selected="selected"': '') + '>' + (i) + '</option>');
            }
        }
        yearHtml = '<div class="pika-label">' + year + opts.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + arr.join('') + '</select></div>';

        if (opts.showMonthAfterYear) {
            html += yearHtml + monthHtml;
        } else {
            html += monthHtml + yearHtml;
        }

        if (isMinYear && (month === 0 || opts.minMonth >= month)) {
            prev = false;
        }

        if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {
            next = false;
        }

        if (c === 0) {
            html += '<button class="pika-prev' + (prev ? '' : ' is-disabled') + '" type="button">' + opts.i18n.previousMonth + '</button>';
        }
        if (c === (instance._o.numberOfMonths - 1) ) {
            html += '<button class="pika-next' + (next ? '' : ' is-disabled') + '" type="button">' + opts.i18n.nextMonth + '</button>';
        }

        return html += '</div>';
    },

    renderTable = function(opts, data, randId)
    {
        return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + randId + '">' + renderHead(opts) + renderBody(data) + '</table>';
    },


    /**
     * Pikaday constructor
     */
    Pikaday = function(options)
    {
        var self = this,
            opts = self.config(options);

        self._onMouseDown = function(e)
        {
            if (!self._v) {
                return;
            }
            e = e || window.event;
            var target = e.target || e.srcElement;
            if (!target) {
                return;
            }

            if (!hasClass(target, 'is-disabled')) {
                if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {
                    self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));
                    if (opts.bound) {
                        sto(function() {
                            self.hide();
                            if (opts.blurFieldOnSelect && opts.field) {
                                opts.field.blur();
                            }
                        }, 100);
                    }
                }
                else if (hasClass(target, 'pika-prev')) {
                    self.prevMonth();
                }
                else if (hasClass(target, 'pika-next')) {
                    self.nextMonth();
                }
            }
            if (!hasClass(target, 'pika-select')) {
                // if this is touch event prevent mouse events emulation
                if (e.preventDefault) {
                    e.preventDefault();
                } else {
                    e.returnValue = false;
                    return false;
                }
            } else {
                self._c = true;
            }
        };

        self._onChange = function(e)
        {
            e = e || window.event;
            var target = e.target || e.srcElement;
            if (!target) {
                return;
            }
            if (hasClass(target, 'pika-select-month')) {
                self.gotoMonth(target.value);
            }
            else if (hasClass(target, 'pika-select-year')) {
                self.gotoYear(target.value);
            }
        };

        self._onKeyChange = function(e)
        {
            e = e || window.event;

            if (self.isVisible()) {

                switch(e.keyCode){
                    case 13:
                    case 27:
                        if (opts.field) {
                            opts.field.blur();
                        }
                        break;
                    case 37:
                        e.preventDefault();
                        self.adjustDate('subtract', 1);
                        break;
                    case 38:
                        self.adjustDate('subtract', 7);
                        break;
                    case 39:
                        self.adjustDate('add', 1);
                        break;
                    case 40:
                        self.adjustDate('add', 7);
                        break;
                }
            }
        };

        self._onInputChange = function(e)
        {
            var date;

            if (e.firedBy === self) {
                return;
            }
            if (opts.parse) {
                date = opts.parse(opts.field.value, opts.format);
            } else if (hasMoment) {
                date = moment(opts.field.value, opts.format, opts.formatStrict);
                date = (date && date.isValid()) ? date.toDate() : null;
            }
            else {
                date = new Date(Date.parse(opts.field.value));
            }
            if (isDate(date)) {
              self.setDate(date);
            }
            if (!self._v) {
                self.show();
            }
        };

        self._onInputFocus = function()
        {
            self.show();
        };

        self._onInputClick = function()
        {
            self.show();
        };

        self._onInputBlur = function()
        {
            // IE allows pika div to gain focus; catch blur the input field
            var pEl = document.activeElement;
            do {
                if (hasClass(pEl, 'pika-single')) {
                    return;
                }
            }
            while ((pEl = pEl.parentNode));

            if (!self._c) {
                self._b = sto(function() {
                    self.hide();
                }, 50);
            }
            self._c = false;
        };

        self._onClick = function(e)
        {
            e = e || window.event;
            var target = e.target || e.srcElement,
                pEl = target;
            if (!target) {
                return;
            }
            if (!hasEventListeners && hasClass(target, 'pika-select')) {
                if (!target.onchange) {
                    target.setAttribute('onchange', 'return;');
                    addEvent(target, 'change', self._onChange);
                }
            }
            do {
                if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {
                    return;
                }
            }
            while ((pEl = pEl.parentNode));
            if (self._v && target !== opts.trigger && pEl !== opts.trigger) {
                self.hide();
            }
        };

        self.el = document.createElement('div');
        self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');

        addEvent(self.el, 'mousedown', self._onMouseDown, true);
        addEvent(self.el, 'touchend', self._onMouseDown, true);
        addEvent(self.el, 'change', self._onChange);

        if (opts.keyboardInput) {
            addEvent(document, 'keydown', self._onKeyChange);
        }

        if (opts.field) {
            if (opts.container) {
                opts.container.appendChild(self.el);
            } else if (opts.bound) {
                document.body.appendChild(self.el);
            } else {
                opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);
            }
            addEvent(opts.field, 'change', self._onInputChange);

            if (!opts.defaultDate) {
                if (hasMoment && opts.field.value) {
                    opts.defaultDate = moment(opts.field.value, opts.format).toDate();
                } else {
                    opts.defaultDate = new Date(Date.parse(opts.field.value));
                }
                opts.setDefaultDate = true;
            }
        }

        var defDate = opts.defaultDate;

        if (isDate(defDate)) {
            if (opts.setDefaultDate) {
                self.setDate(defDate, true);
            } else {
                self.gotoDate(defDate);
            }
        } else {
            self.gotoDate(new Date());
        }

        if (opts.bound) {
            this.hide();
            self.el.className += ' is-bound';
            addEvent(opts.trigger, 'click', self._onInputClick);
            addEvent(opts.trigger, 'focus', self._onInputFocus);
            addEvent(opts.trigger, 'blur', self._onInputBlur);
        } else {
            this.show();
        }
    };


    /**
     * public Pikaday API
     */
    Pikaday.prototype = {


        /**
         * configure functionality
         */
        config: function(options)
        {
            if (!this._o) {
                this._o = extend({}, defaults, true);
            }

            var opts = extend(this._o, options, true);

            opts.isRTL = !!opts.isRTL;

            opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;

            opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;

            opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);

            opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;

            opts.disableWeekends = !!opts.disableWeekends;

            opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;

            var nom = parseInt(opts.numberOfMonths, 10) || 1;
            opts.numberOfMonths = nom > 4 ? 4 : nom;

            if (!isDate(opts.minDate)) {
                opts.minDate = false;
            }
            if (!isDate(opts.maxDate)) {
                opts.maxDate = false;
            }
            if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {
                opts.maxDate = opts.minDate = false;
            }
            if (opts.minDate) {
                this.setMinDate(opts.minDate);
            }
            if (opts.maxDate) {
                this.setMaxDate(opts.maxDate);
            }

            if (isArray(opts.yearRange)) {
                var fallback = new Date().getFullYear() - 10;
                opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;
                opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;
            } else {
                opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;
                if (opts.yearRange > 100) {
                    opts.yearRange = 100;
                }
            }

            return opts;
        },

        /**
         * return a formatted string of the current selection (using Moment.js if available)
         */
        toString: function(format)
        {
            format = format || this._o.format;
            if (!isDate(this._d)) {
                return '';
            }
            if (this._o.toString) {
              return this._o.toString(this._d, format);
            }
            if (hasMoment) {
              return moment(this._d).format(format);
            }
            return this._d.toDateString();
        },

        /**
         * return a Moment.js object of the current selection (if available)
         */
        getMoment: function()
        {
            return hasMoment ? moment(this._d) : null;
        },

        /**
         * set the current selection from a Moment.js object (if available)
         */
        setMoment: function(date, preventOnSelect)
        {
            if (hasMoment && moment.isMoment(date)) {
                this.setDate(date.toDate(), preventOnSelect);
            }
        },

        /**
         * return a Date object of the current selection
         */
        getDate: function()
        {
            return isDate(this._d) ? new Date(this._d.getTime()) : null;
        },

        /**
         * set the current selection
         */
        setDate: function(date, preventOnSelect)
        {
            if (!date) {
                this._d = null;

                if (this._o.field) {
                    this._o.field.value = '';
                    fireEvent(this._o.field, 'change', { firedBy: this });
                }

                return this.draw();
            }
            if (typeof date === 'string') {
                date = new Date(Date.parse(date));
            }
            if (!isDate(date)) {
                return;
            }

            var min = this._o.minDate,
                max = this._o.maxDate;

            if (isDate(min) && date < min) {
                date = min;
            } else if (isDate(max) && date > max) {
                date = max;
            }

            this._d = new Date(date.getTime());
            setToStartOfDay(this._d);
            this.gotoDate(this._d);

            if (this._o.field) {
                this._o.field.value = this.toString();
                fireEvent(this._o.field, 'change', { firedBy: this });
            }
            if (!preventOnSelect && typeof this._o.onSelect === 'function') {
                this._o.onSelect.call(this, this.getDate());
            }
        },

        /**
         * change view to a specific date
         */
        gotoDate: function(date)
        {
            var newCalendar = true;

            if (!isDate(date)) {
                return;
            }

            if (this.calendars) {
                var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),
                    lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),
                    visibleDate = date.getTime();
                // get the end of the month
                lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);
                lastVisibleDate.setDate(lastVisibleDate.getDate()-1);
                newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);
            }

            if (newCalendar) {
                this.calendars = [{
                    month: date.getMonth(),
                    year: date.getFullYear()
                }];
                if (this._o.mainCalendar === 'right') {
                    this.calendars[0].month += 1 - this._o.numberOfMonths;
                }
            }

            this.adjustCalendars();
        },

        adjustDate: function(sign, days) {

            var day = this.getDate() || new Date();
            var difference = parseInt(days)*24*60*60*1000;

            var newDay;

            if (sign === 'add') {
                newDay = new Date(day.valueOf() + difference);
            } else if (sign === 'subtract') {
                newDay = new Date(day.valueOf() - difference);
            }

            this.setDate(newDay);
        },

        adjustCalendars: function() {
            this.calendars[0] = adjustCalendar(this.calendars[0]);
            for (var c = 1; c < this._o.numberOfMonths; c++) {
                this.calendars[c] = adjustCalendar({
                    month: this.calendars[0].month + c,
                    year: this.calendars[0].year
                });
            }
            this.draw();
        },

        gotoToday: function()
        {
            this.gotoDate(new Date());
        },

        /**
         * change view to a specific month (zero-index, e.g. 0: January)
         */
        gotoMonth: function(month)
        {
            if (!isNaN(month)) {
                this.calendars[0].month = parseInt(month, 10);
                this.adjustCalendars();
            }
        },

        nextMonth: function()
        {
            this.calendars[0].month++;
            this.adjustCalendars();
        },

        prevMonth: function()
        {
            this.calendars[0].month--;
            this.adjustCalendars();
        },

        /**
         * change view to a specific full year (e.g. "2012")
         */
        gotoYear: function(year)
        {
            if (!isNaN(year)) {
                this.calendars[0].year = parseInt(year, 10);
                this.adjustCalendars();
            }
        },

        /**
         * change the minDate
         */
        setMinDate: function(value)
        {
            if(value instanceof Date) {
                setToStartOfDay(value);
                this._o.minDate = value;
                this._o.minYear  = value.getFullYear();
                this._o.minMonth = value.getMonth();
            } else {
                this._o.minDate = defaults.minDate;
                this._o.minYear  = defaults.minYear;
                this._o.minMonth = defaults.minMonth;
                this._o.startRange = defaults.startRange;
            }

            this.draw();
        },

        /**
         * change the maxDate
         */
        setMaxDate: function(value)
        {
            if(value instanceof Date) {
                setToStartOfDay(value);
                this._o.maxDate = value;
                this._o.maxYear = value.getFullYear();
                this._o.maxMonth = value.getMonth();
            } else {
                this._o.maxDate = defaults.maxDate;
                this._o.maxYear = defaults.maxYear;
                this._o.maxMonth = defaults.maxMonth;
                this._o.endRange = defaults.endRange;
            }

            this.draw();
        },

        setStartRange: function(value)
        {
            this._o.startRange = value;
        },

        setEndRange: function(value)
        {
            this._o.endRange = value;
        },

        /**
         * refresh the HTML
         */
        draw: function(force)
        {
            if (!this._v && !force) {
                return;
            }
            var opts = this._o,
                minYear = opts.minYear,
                maxYear = opts.maxYear,
                minMonth = opts.minMonth,
                maxMonth = opts.maxMonth,
                html = '',
                randId;

            if (this._y <= minYear) {
                this._y = minYear;
                if (!isNaN(minMonth) && this._m < minMonth) {
                    this._m = minMonth;
                }
            }
            if (this._y >= maxYear) {
                this._y = maxYear;
                if (!isNaN(maxMonth) && this._m > maxMonth) {
                    this._m = maxMonth;
                }
            }

            randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);

            for (var c = 0; c < opts.numberOfMonths; c++) {
                html += '<div class="pika-lendar">' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '</div>';
            }

            this.el.innerHTML = html;

            if (opts.bound) {
                if(opts.field.type !== 'hidden') {
                    sto(function() {
                        opts.trigger.focus();
                    }, 1);
                }
            }

            if (typeof this._o.onDraw === 'function') {
                this._o.onDraw(this);
            }

            if (opts.bound) {
                // let the screen reader user know to use arrow keys
                opts.field.setAttribute('aria-label', 'Use the arrow keys to pick a date');
            }
        },

        adjustPosition: function()
        {
            var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect;

            if (this._o.container) return;

            this.el.style.position = 'absolute';

            field = this._o.trigger;
            pEl = field;
            width = this.el.offsetWidth;
            height = this.el.offsetHeight;
            viewportWidth = window.innerWidth || document.documentElement.clientWidth;
            viewportHeight = window.innerHeight || document.documentElement.clientHeight;
            scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;

            if (typeof field.getBoundingClientRect === 'function') {
                clientRect = field.getBoundingClientRect();
                left = clientRect.left + window.pageXOffset;
                top = clientRect.bottom + window.pageYOffset;
            } else {
                left = pEl.offsetLeft;
                top  = pEl.offsetTop + pEl.offsetHeight;
                while((pEl = pEl.offsetParent)) {
                    left += pEl.offsetLeft;
                    top  += pEl.offsetTop;
                }
            }

            // default position is bottom & left
            if ((this._o.reposition && left + width > viewportWidth) ||
                (
                    this._o.position.indexOf('right') > -1 &&
                    left - width + field.offsetWidth > 0
                )
            ) {
                left = left - width + field.offsetWidth;
            }
            if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||
                (
                    this._o.position.indexOf('top') > -1 &&
                    top - height - field.offsetHeight > 0
                )
            ) {
                top = top - height - field.offsetHeight;
            }

            this.el.style.left = left + 'px';
            this.el.style.top = top + 'px';
        },

        /**
         * render HTML for a particular month
         */
        render: function(year, month, randId)
        {
            var opts   = this._o,
                now    = new Date(),
                days   = getDaysInMonth(year, month),
                before = new Date(year, month, 1).getDay(),
                data   = [],
                row    = [];
            setToStartOfDay(now);
            if (opts.firstDay > 0) {
                before -= opts.firstDay;
                if (before < 0) {
                    before += 7;
                }
            }
            var previousMonth = month === 0 ? 11 : month - 1,
                nextMonth = month === 11 ? 0 : month + 1,
                yearOfPreviousMonth = month === 0 ? year - 1 : year,
                yearOfNextMonth = month === 11 ? year + 1 : year,
                daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);
            var cells = days + before,
                after = cells;
            while(after > 7) {
                after -= 7;
            }
            cells += 7 - after;
            var isWeekSelected = false;
            for (var i = 0, r = 0; i < cells; i++)
            {
                var day = new Date(year, month, 1 + (i - before)),
                    isSelected = isDate(this._d) ? compareDates(day, this._d) : false,
                    isToday = compareDates(day, now),
                    hasEvent = opts.events.indexOf(day.toDateString()) !== -1 ? true : false,
                    isEmpty = i < before || i >= (days + before),
                    dayNumber = 1 + (i - before),
                    monthNumber = month,
                    yearNumber = year,
                    isStartRange = opts.startRange && compareDates(opts.startRange, day),
                    isEndRange = opts.endRange && compareDates(opts.endRange, day),
                    isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,
                    isDisabled = (opts.minDate && day < opts.minDate) ||
                                 (opts.maxDate && day > opts.maxDate) ||
                                 (opts.disableWeekends && isWeekend(day)) ||
                                 (opts.disableDayFn && opts.disableDayFn(day));

                if (isEmpty) {
                    if (i < before) {
                        dayNumber = daysInPreviousMonth + dayNumber;
                        monthNumber = previousMonth;
                        yearNumber = yearOfPreviousMonth;
                    } else {
                        dayNumber = dayNumber - days;
                        monthNumber = nextMonth;
                        yearNumber = yearOfNextMonth;
                    }
                }

                var dayConfig = {
                        day: dayNumber,
                        month: monthNumber,
                        year: yearNumber,
                        hasEvent: hasEvent,
                        isSelected: isSelected,
                        isToday: isToday,
                        isDisabled: isDisabled,
                        isEmpty: isEmpty,
                        isStartRange: isStartRange,
                        isEndRange: isEndRange,
                        isInRange: isInRange,
                        showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths,
                        enableSelectionDaysInNextAndPreviousMonths: opts.enableSelectionDaysInNextAndPreviousMonths
                    };

                if (opts.pickWholeWeek && isSelected) {
                    isWeekSelected = true;
                }

                row.push(renderDay(dayConfig));

                if (++r === 7) {
                    if (opts.showWeekNumber) {
                        row.unshift(renderWeek(i - before, month, year));
                    }
                    data.push(renderRow(row, opts.isRTL, opts.pickWholeWeek, isWeekSelected));
                    row = [];
                    r = 0;
                    isWeekSelected = false;
                }
            }
            return renderTable(opts, data, randId);
        },

        isVisible: function()
        {
            return this._v;
        },

        show: function()
        {
            if (!this.isVisible()) {
                this._v = true;
                this.draw();
                removeClass(this.el, 'is-hidden');
                if (this._o.bound) {
                    addEvent(document, 'click', this._onClick);
                    this.adjustPosition();
                }
                if (typeof this._o.onOpen === 'function') {
                    this._o.onOpen.call(this);
                }
            }
        },

        hide: function()
        {
            var v = this._v;
            if (v !== false) {
                if (this._o.bound) {
                    removeEvent(document, 'click', this._onClick);
                }
                this.el.style.position = 'static'; // reset
                this.el.style.left = 'auto';
                this.el.style.top = 'auto';
                addClass(this.el, 'is-hidden');
                this._v = false;
                if (v !== undefined && typeof this._o.onClose === 'function') {
                    this._o.onClose.call(this);
                }
            }
        },

        /**
         * GAME OVER
         */
        destroy: function()
        {
            var opts = this._o;

            this.hide();
            removeEvent(this.el, 'mousedown', this._onMouseDown, true);
            removeEvent(this.el, 'touchend', this._onMouseDown, true);
            removeEvent(this.el, 'change', this._onChange);
            if (opts.keyboardInput) {
                removeEvent(document, 'keydown', this._onKeyChange);
            }
            if (opts.field) {
                removeEvent(opts.field, 'change', this._onInputChange);
                if (opts.bound) {
                    removeEvent(opts.trigger, 'click', this._onInputClick);
                    removeEvent(opts.trigger, 'focus', this._onInputFocus);
                    removeEvent(opts.trigger, 'blur', this._onInputBlur);
                }
            }
            if (this.el.parentNode) {
                this.el.parentNode.removeChild(this.el);
            }
        }

    };

    return Pikaday;
}));


/***/ }),
/* 458 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var TemplateHelpers_1 = __webpack_require__(122);
exports.TemplateHelpers = TemplateHelpers_1.TemplateHelpers;
var TemplateList_1 = __webpack_require__(96);
exports.TemplateList = TemplateList_1.TemplateList;
var TemplateCache_1 = __webpack_require__(68);
exports.TemplateCache = TemplateCache_1.TemplateCache;
var HtmlTemplate_1 = __webpack_require__(108);
exports.HtmlTemplate = HtmlTemplate_1.HtmlTemplate;
var UnderscoreTemplate_1 = __webpack_require__(59);
exports.UnderscoreTemplate = UnderscoreTemplate_1.UnderscoreTemplate;


/***/ }),
/* 459 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var fields = ['sflikedby', 'sflikedbyid', 'clickableuri', 'sffeeditemid'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ChatterLikedBy', fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 460 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var fields = ['sfcontentversionid', 'sffeeditemid', 'sfcontentfilename', 'sftitle', 'sf_title'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ChatterPostAttachment', fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 461 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var fields = ['sfcreatedby', 'sfcreatedbyid', 'sffeeditemid', 'sfuserid', 'sfinsertedbyid', 'sfparentid', 'sfparentname'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ChatterPostedBy', fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 462 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var fields = ['coveochatterfeedtopics'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ChatterTopic', fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 463 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var fields = ['objecttype', 'filetype'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('Icon', fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 464 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var fields = ['parents'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('PrintableUri', fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 465 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var fields = [
    'urihash',
    'collection',
    'source',
    'author',
    'date' // used in header of the quickview
];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('Quickview', fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 466 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
exports.fields = [
    'outlookformacuri',
    'outlookuri',
    'connectortype',
    'urihash',
    'collection',
    'source',
    'author' // analytics
];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('ResultLink', exports.fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 467 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var fields = ['urihash'];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('FollowItem', fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 468 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var fields = [
    'outlookformacuri',
    'outlookuri',
    'connectortype',
    'urihash',
    'collection',
    'source' //        ⎭
];
function registerFields() {
    Initialization_1.Initialization.registerComponentFields('Thumbnail', fields);
}
exports.registerFields = registerFields;


/***/ }),
/* 469 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var _ = __webpack_require__(0);
// Webpack output a library target with a temporary name.
// It does not take care of merging the namespace if the global variable already exists.
// If another piece of code in the page use the Coveo namespace (eg: extension), then they get overwritten
// This code swap the current module to the "real" Coveo variable, without overwriting the whole global var.
function swapVar(scope) {
    if (window['Coveo'] == undefined) {
        window['Coveo'] = scope;
    }
    else {
        _.each(_.keys(scope), function (k) {
            window['Coveo'][k] = scope[k];
        });
    }
    if (window['__extends'] == undefined) {
        var __extends = function (d, b) {
            for (var p in b) {
                if (b.hasOwnProperty(p)) {
                    d[p] = b[p];
                }
            }
            function __() {
                this.constructor = d;
            }
            d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __());
        };
        window['__extends'] = __extends;
    }
}
exports.swapVar = swapVar;


/***/ }),
/* 470 */,
/* 471 */,
/* 472 */,
/* 473 */,
/* 474 */,
/* 475 */,
/* 476 */,
/* 477 */,
/* 478 */,
/* 479 */,
/* 480 */,
/* 481 */,
/* 482 */,
/* 483 */,
/* 484 */,
/* 485 */,
/* 486 */,
/* 487 */,
/* 488 */,
/* 489 */,
/* 490 */,
/* 491 */,
/* 492 */,
/* 493 */,
/* 494 */,
/* 495 */,
/* 496 */,
/* 497 */,
/* 498 */,
/* 499 */,
/* 500 */,
/* 501 */,
/* 502 */,
/* 503 */,
/* 504 */,
/* 505 */,
/* 506 */,
/* 507 */,
/* 508 */,
/* 509 */,
/* 510 */,
/* 511 */,
/* 512 */,
/* 513 */,
/* 514 */,
/* 515 */,
/* 516 */,
/* 517 */,
/* 518 */,
/* 519 */,
/* 520 */,
/* 521 */,
/* 522 */,
/* 523 */,
/* 524 */,
/* 525 */,
/* 526 */,
/* 527 */,
/* 528 */,
/* 529 */,
/* 530 */,
/* 531 */,
/* 532 */,
/* 533 */,
/* 534 */,
/* 535 */,
/* 536 */,
/* 537 */,
/* 538 */,
/* 539 */,
/* 540 */,
/* 541 */,
/* 542 */,
/* 543 */,
/* 544 */,
/* 545 */,
/* 546 */,
/* 547 */,
/* 548 */,
/* 549 */,
/* 550 */,
/* 551 */,
/* 552 */,
/* 553 */,
/* 554 */,
/* 555 */,
/* 556 */,
/* 557 */,
/* 558 */,
/* 559 */,
/* 560 */,
/* 561 */,
/* 562 */,
/* 563 */,
/* 564 */,
/* 565 */,
/* 566 */,
/* 567 */,
/* 568 */,
/* 569 */,
/* 570 */,
/* 571 */,
/* 572 */,
/* 573 */,
/* 574 */,
/* 575 */,
/* 576 */,
/* 577 */,
/* 578 */,
/* 579 */,
/* 580 */,
/* 581 */,
/* 582 */,
/* 583 */,
/* 584 */,
/* 585 */,
/* 586 */,
/* 587 */,
/* 588 */,
/* 589 */,
/* 590 */,
/* 591 */,
/* 592 */,
/* 593 */,
/* 594 */,
/* 595 */,
/* 596 */,
/* 597 */,
/* 598 */,
/* 599 */,
/* 600 */,
/* 601 */,
/* 602 */,
/* 603 */,
/* 604 */,
/* 605 */,
/* 606 */,
/* 607 */,
/* 608 */,
/* 609 */,
/* 610 */,
/* 611 */,
/* 612 */,
/* 613 */,
/* 614 */,
/* 615 */,
/* 616 */,
/* 617 */,
/* 618 */,
/* 619 */,
/* 620 */,
/* 621 */,
/* 622 */,
/* 623 */,
/* 624 */,
/* 625 */,
/* 626 */,
/* 627 */,
/* 628 */,
/* 629 */,
/* 630 */,
/* 631 */,
/* 632 */,
/* 633 */,
/* 634 */,
/* 635 */,
/* 636 */,
/* 637 */,
/* 638 */,
/* 639 */,
/* 640 */,
/* 641 */,
/* 642 */,
/* 643 */,
/* 644 */,
/* 645 */,
/* 646 */,
/* 647 */,
/* 648 */,
/* 649 */,
/* 650 */,
/* 651 */,
/* 652 */,
/* 653 */,
/* 654 */,
/* 655 */,
/* 656 */,
/* 657 */,
/* 658 */,
/* 659 */,
/* 660 */,
/* 661 */,
/* 662 */,
/* 663 */,
/* 664 */,
/* 665 */,
/* 666 */,
/* 667 */,
/* 668 */,
/* 669 */,
/* 670 */,
/* 671 */,
/* 672 */,
/* 673 */,
/* 674 */,
/* 675 */,
/* 676 */,
/* 677 */,
/* 678 */,
/* 679 */,
/* 680 */,
/* 681 */,
/* 682 */,
/* 683 */,
/* 684 */,
/* 685 */,
/* 686 */,
/* 687 */,
/* 688 */,
/* 689 */,
/* 690 */,
/* 691 */,
/* 692 */,
/* 693 */,
/* 694 */,
/* 695 */,
/* 696 */,
/* 697 */,
/* 698 */,
/* 699 */,
/* 700 */,
/* 701 */,
/* 702 */,
/* 703 */,
/* 704 */,
/* 705 */,
/* 706 */,
/* 707 */,
/* 708 */,
/* 709 */,
/* 710 */,
/* 711 */,
/* 712 */
/***/ (function(module, exports) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function() {
	var list = [];

	// return the list of modules as css string
	list.toString = function toString() {
		var result = [];
		for(var i = 0; i < this.length; i++) {
			var item = this[i];
			if(item[2]) {
				result.push("@media " + item[2] + "{" + item[1] + "}");
			} else {
				result.push(item[1]);
			}
		}
		return result.join("");
	};

	// import a list of modules into the list
	list.i = function(modules, mediaQuery) {
		if(typeof modules === "string")
			modules = [[null, modules, ""]];
		var alreadyImportedModules = {};
		for(var i = 0; i < this.length; i++) {
			var id = this[i][0];
			if(typeof id === "number")
				alreadyImportedModules[id] = true;
		}
		for(i = 0; i < modules.length; i++) {
			var item = modules[i];
			// skip already imported module
			// this implementation is not 100% perfect for weird media query combinations
			//  when a module is imported multiple times with different media queries.
			//  I hope this will never occur (Hey this way we have smaller bundles)
			if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
				if(mediaQuery && !item[2]) {
					item[2] = mediaQuery;
				} else if(mediaQuery) {
					item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
				}
				list.push(item);
			}
		}
	};
	return list;
};


/***/ }),
/* 713 */
/***/ (function(module, exports, __webpack_require__) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/

var stylesInDom = {};

var	memoize = function (fn) {
	var memo;

	return function () {
		if (typeof memo === "undefined") memo = fn.apply(this, arguments);
		return memo;
	};
};

var isOldIE = memoize(function () {
	// Test for IE <= 9 as proposed by Browserhacks
	// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
	// Tests for existence of standard globals is to allow style-loader
	// to operate correctly into non-standard environments
	// @see https://github.com/webpack-contrib/style-loader/issues/177
	return window && document && document.all && !window.atob;
});

var getElement = (function (fn) {
	var memo = {};

	return function(selector) {
		if (typeof memo[selector] === "undefined") {
			var styleTarget = fn.call(this, selector);
			// Special case to return head of iframe instead of iframe itself
			if (styleTarget instanceof window.HTMLIFrameElement) {
				try {
					// This will throw an exception if access to iframe is blocked
					// due to cross-origin restrictions
					styleTarget = styleTarget.contentDocument.head;
				} catch(e) {
					styleTarget = null;
				}
			}
			memo[selector] = styleTarget;
		}
		return memo[selector]
	};
})(function (target) {
	return document.querySelector(target)
});

var singleton = null;
var	singletonCounter = 0;
var	stylesInsertedAtTop = [];

var	fixUrls = __webpack_require__(307);

module.exports = function(list, options) {
	if (typeof DEBUG !== "undefined" && DEBUG) {
		if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
	}

	options = options || {};

	options.attrs = typeof options.attrs === "object" ? options.attrs : {};

	// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
	// tags it will allow on a page
	if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();

	// By default, add <style> tags to the <head> element
	if (!options.insertInto) options.insertInto = "head";

	// By default, add <style> tags to the bottom of the target
	if (!options.insertAt) options.insertAt = "bottom";

	var styles = listToStyles(list, options);

	addStylesToDom(styles, options);

	return function update (newList) {
		var mayRemove = [];

		for (var i = 0; i < styles.length; i++) {
			var item = styles[i];
			var domStyle = stylesInDom[item.id];

			domStyle.refs--;
			mayRemove.push(domStyle);
		}

		if(newList) {
			var newStyles = listToStyles(newList, options);
			addStylesToDom(newStyles, options);
		}

		for (var i = 0; i < mayRemove.length; i++) {
			var domStyle = mayRemove[i];

			if(domStyle.refs === 0) {
				for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();

				delete stylesInDom[domStyle.id];
			}
		}
	};
};

function addStylesToDom (styles, options) {
	for (var i = 0; i < styles.length; i++) {
		var item = styles[i];
		var domStyle = stylesInDom[item.id];

		if(domStyle) {
			domStyle.refs++;

			for(var j = 0; j < domStyle.parts.length; j++) {
				domStyle.parts[j](item.parts[j]);
			}

			for(; j < item.parts.length; j++) {
				domStyle.parts.push(addStyle(item.parts[j], options));
			}
		} else {
			var parts = [];

			for(var j = 0; j < item.parts.length; j++) {
				parts.push(addStyle(item.parts[j], options));
			}

			stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
		}
	}
}

function listToStyles (list, options) {
	var styles = [];
	var newStyles = {};

	for (var i = 0; i < list.length; i++) {
		var item = list[i];
		var id = options.base ? item[0] + options.base : item[0];
		var css = item[1];
		var media = item[2];
		var sourceMap = item[3];
		var part = {css: css, media: media, sourceMap: sourceMap};

		if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
		else newStyles[id].parts.push(part);
	}

	return styles;
}

function insertStyleElement (options, style) {
	var target = getElement(options.insertInto)

	if (!target) {
		throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
	}

	var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];

	if (options.insertAt === "top") {
		if (!lastStyleElementInsertedAtTop) {
			target.insertBefore(style, target.firstChild);
		} else if (lastStyleElementInsertedAtTop.nextSibling) {
			target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
		} else {
			target.appendChild(style);
		}
		stylesInsertedAtTop.push(style);
	} else if (options.insertAt === "bottom") {
		target.appendChild(style);
	} else if (typeof options.insertAt === "object" && options.insertAt.before) {
		var nextSibling = getElement(options.insertInto + " " + options.insertAt.before);
		target.insertBefore(style, nextSibling);
	} else {
		throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
	}
}

function removeStyleElement (style) {
	if (style.parentNode === null) return false;
	style.parentNode.removeChild(style);

	var idx = stylesInsertedAtTop.indexOf(style);
	if(idx >= 0) {
		stylesInsertedAtTop.splice(idx, 1);
	}
}

function createStyleElement (options) {
	var style = document.createElement("style");

	options.attrs.type = "text/css";

	addAttrs(style, options.attrs);
	insertStyleElement(options, style);

	return style;
}

function createLinkElement (options) {
	var link = document.createElement("link");

	options.attrs.type = "text/css";
	options.attrs.rel = "stylesheet";

	addAttrs(link, options.attrs);
	insertStyleElement(options, link);

	return link;
}

function addAttrs (el, attrs) {
	Object.keys(attrs).forEach(function (key) {
		el.setAttribute(key, attrs[key]);
	});
}

function addStyle (obj, options) {
	var style, update, remove, result;

	// If a transform function was defined, run it on the css
	if (options.transform && obj.css) {
	    result = options.transform(obj.css);

	    if (result) {
	    	// If transform returns a value, use that instead of the original css.
	    	// This allows running runtime transformations on the css.
	    	obj.css = result;
	    } else {
	    	// If the transform function returns a falsy value, don't add this css.
	    	// This allows conditional loading of css
	    	return function() {
	    		// noop
	    	};
	    }
	}

	if (options.singleton) {
		var styleIndex = singletonCounter++;

		style = singleton || (singleton = createStyleElement(options));

		update = applyToSingletonTag.bind(null, style, styleIndex, false);
		remove = applyToSingletonTag.bind(null, style, styleIndex, true);

	} else if (
		obj.sourceMap &&
		typeof URL === "function" &&
		typeof URL.createObjectURL === "function" &&
		typeof URL.revokeObjectURL === "function" &&
		typeof Blob === "function" &&
		typeof btoa === "function"
	) {
		style = createLinkElement(options);
		update = updateLink.bind(null, style, options);
		remove = function () {
			removeStyleElement(style);

			if(style.href) URL.revokeObjectURL(style.href);
		};
	} else {
		style = createStyleElement(options);
		update = applyToTag.bind(null, style);
		remove = function () {
			removeStyleElement(style);
		};
	}

	update(obj);

	return function updateStyle (newObj) {
		if (newObj) {
			if (
				newObj.css === obj.css &&
				newObj.media === obj.media &&
				newObj.sourceMap === obj.sourceMap
			) {
				return;
			}

			update(obj = newObj);
		} else {
			remove();
		}
	};
}

var replaceText = (function () {
	var textStore = [];

	return function (index, replacement) {
		textStore[index] = replacement;

		return textStore.filter(Boolean).join('\n');
	};
})();

function applyToSingletonTag (style, index, remove, obj) {
	var css = remove ? "" : obj.css;

	if (style.styleSheet) {
		style.styleSheet.cssText = replaceText(index, css);
	} else {
		var cssNode = document.createTextNode(css);
		var childNodes = style.childNodes;

		if (childNodes[index]) style.removeChild(childNodes[index]);

		if (childNodes.length) {
			style.insertBefore(cssNode, childNodes[index]);
		} else {
			style.appendChild(cssNode);
		}
	}
}

function applyToTag (style, obj) {
	var css = obj.css;
	var media = obj.media;

	if(media) {
		style.setAttribute("media", media)
	}

	if(style.styleSheet) {
		style.styleSheet.cssText = css;
	} else {
		while(style.firstChild) {
			style.removeChild(style.firstChild);
		}

		style.appendChild(document.createTextNode(css));
	}
}

function updateLink (link, options, obj) {
	var css = obj.css;
	var sourceMap = obj.sourceMap;

	/*
		If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
		and there is no publicPath defined then lets turn convertToAbsoluteUrls
		on by default.  Otherwise default to the convertToAbsoluteUrls option
		directly
	*/
	var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;

	if (options.convertToAbsoluteUrls || autoFixUrls) {
		css = fixUrls(css);
	}

	if (sourceMap) {
		// http://stackoverflow.com/a/26603875
		css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
	}

	var blob = new Blob([css], { type: "text/css" });

	var oldSrc = link.href;

	link.href = URL.createObjectURL(blob);

	if(oldSrc) URL.revokeObjectURL(oldSrc);
}


/***/ }),
/* 714 */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(715);


/***/ }),
/* 715 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(__webpack_require__(20));
var Dom_1 = __webpack_require__(1);
exports.$$ = Dom_1.$$;
exports.Dom = Dom_1.Dom;
var SearchInterface_1 = __webpack_require__(19);
exports.SearchInterface = SearchInterface_1.SearchInterface;
exports.StandaloneSearchInterface = SearchInterface_1.StandaloneSearchInterface;
var PublicPathUtils_1 = __webpack_require__(129);
exports.PublicPathUtils = PublicPathUtils_1.PublicPathUtils;
var PublicPathUtils_2 = __webpack_require__(129);
PublicPathUtils_2.PublicPathUtils.detectPublicPath();
var Initialization_1 = __webpack_require__(2);
Initialization_1.Initialization.componentsFactory = Initialization_1.LazyInitialization.componentsFactory;
var Initialization_2 = __webpack_require__(2);
exports.LazyInitialization = Initialization_2.LazyInitialization;
exports.EagerInitialization = Initialization_2.EagerInitialization;
exports.Initialization = Initialization_2.Initialization;
var Analytics_1 = __webpack_require__(130);
Analytics_1.Analytics.doExport();
var LazyAdvancedSearch_1 = __webpack_require__(716);
LazyAdvancedSearch_1.lazyAdvancedSearch();
var LazyAggregate_1 = __webpack_require__(717);
LazyAggregate_1.lazyAggregate();
var LazyAnalyticsSuggestions_1 = __webpack_require__(718);
LazyAnalyticsSuggestions_1.lazyAnalyticsSuggestions();
var LazyAuthenticationProvider_1 = __webpack_require__(719);
LazyAuthenticationProvider_1.lazyAuthenticationProvider();
var LazyBackdrop_1 = __webpack_require__(720);
LazyBackdrop_1.lazyBackdrop();
var LazyBadge_1 = __webpack_require__(721);
LazyBadge_1.lazyBadge();
var LazyBreadcrumb_1 = __webpack_require__(722);
LazyBreadcrumb_1.lazyBreadcrumb();
var LazyCardActionBar_1 = __webpack_require__(723);
LazyCardActionBar_1.lazyCardActionBar();
var LazyCardOverlay_1 = __webpack_require__(724);
LazyCardOverlay_1.lazyCardOverlay();
var LazyChatterLikedBy_1 = __webpack_require__(725);
LazyChatterLikedBy_1.lazyChatterLikedBy();
var ChatterLikedByFields_1 = __webpack_require__(459);
ChatterLikedByFields_1.registerFields();
var LazyChatterPostAttachment_1 = __webpack_require__(726);
LazyChatterPostAttachment_1.lazyChatterPostAttachment();
var ChatterPostAttachmentFields_1 = __webpack_require__(460);
ChatterPostAttachmentFields_1.registerFields();
var LazyChatterPostedBy_1 = __webpack_require__(727);
LazyChatterPostedBy_1.lazyChatterPostedBy();
var ChatterPostedByFields_1 = __webpack_require__(461);
ChatterPostedByFields_1.registerFields();
var LazyChatterTopic_1 = __webpack_require__(728);
LazyChatterTopic_1.lazyChatterTopic();
var ChatterTopicFields_1 = __webpack_require__(462);
ChatterTopicFields_1.registerFields();
var LazyDebug_1 = __webpack_require__(729);
LazyDebug_1.lazyDebug();
var LazyDidYouMean_1 = __webpack_require__(730);
LazyDidYouMean_1.lazyDidYouMean();
var LazyDistanceResources_1 = __webpack_require__(731);
LazyDistanceResources_1.lazyDistanceResources();
var LazyErrorReport_1 = __webpack_require__(732);
LazyErrorReport_1.lazyErrorReport();
var LazyExcerpt_1 = __webpack_require__(733);
LazyExcerpt_1.lazyExcerpt();
var LazyExportToExcel_1 = __webpack_require__(734);
LazyExportToExcel_1.lazyExportToExcel();
var LazyFacet_1 = __webpack_require__(735);
LazyFacet_1.lazyFacet();
var LazyFacetRange_1 = __webpack_require__(736);
LazyFacetRange_1.lazyFacetRange();
var LazyFacetSlider_1 = __webpack_require__(737);
LazyFacetSlider_1.lazyFacetSlider();
var LazyFieldSuggestions_1 = __webpack_require__(738);
LazyFieldSuggestions_1.lazyFieldSuggestions();
var LazyFacetValueSuggestions_1 = __webpack_require__(739);
LazyFacetValueSuggestions_1.lazyFacetValueSuggestions();
var LazyFieldTable_1 = __webpack_require__(740);
LazyFieldTable_1.lazyFieldTable();
var LazyFieldValue_1 = __webpack_require__(741);
LazyFieldValue_1.lazyFieldValue();
var LazyFolding_1 = __webpack_require__(742);
LazyFolding_1.lazyFolding();
var LazyFoldingForThread_1 = __webpack_require__(743);
LazyFoldingForThread_1.lazyFoldingForThread();
var LazyHiddenQuery_1 = __webpack_require__(744);
LazyHiddenQuery_1.lazyHiddenQuery();
var LazyCategoryFacet_1 = __webpack_require__(745);
LazyCategoryFacet_1.lazyCategoryFacet();
var LazyHierarchicalFacet_1 = __webpack_require__(746);
LazyHierarchicalFacet_1.lazyHierarchicalFacet();
var LazyIcon_1 = __webpack_require__(747);
LazyIcon_1.lazyIcon();
var IconFields_1 = __webpack_require__(463);
IconFields_1.registerFields();
var LazyLogo_1 = __webpack_require__(748);
LazyLogo_1.lazyLogo();
var LazyMatrix_1 = __webpack_require__(749);
LazyMatrix_1.lazyMatrix();
var LazyOmnibox_1 = __webpack_require__(750);
LazyOmnibox_1.lazyOmnibox();
var LazyOmniboxResultList_1 = __webpack_require__(751);
LazyOmniboxResultList_1.lazyOmniboxResultList();
var LazyPager_1 = __webpack_require__(752);
LazyPager_1.lazyPager();
var LazyPipelineContext_1 = __webpack_require__(753);
LazyPipelineContext_1.lazyPipelineContext();
var LazyPreferencesPanel_1 = __webpack_require__(754);
LazyPreferencesPanel_1.lazyPreferencesPanel();
var LazyPrintableUri_1 = __webpack_require__(755);
LazyPrintableUri_1.lazyPrintableUri();
var PrintableUriFields_1 = __webpack_require__(464);
PrintableUriFields_1.registerFields();
var LazyQuerybox_1 = __webpack_require__(756);
LazyQuerybox_1.lazyQuerybox();
var LazyQueryDuration_1 = __webpack_require__(757);
LazyQueryDuration_1.lazyQueryDuration();
var LazyQuerySummary_1 = __webpack_require__(758);
LazyQuerySummary_1.lazyQuerySummary();
var LazyQuickview_1 = __webpack_require__(759);
LazyQuickview_1.lazyQuickview();
var QuickviewFields_1 = __webpack_require__(465);
QuickviewFields_1.registerFields();
var LazyRecommendation_1 = __webpack_require__(760);
LazyRecommendation_1.lazyRecommendation();
var LazyResultActionsMenu_1 = __webpack_require__(761);
LazyResultActionsMenu_1.lazyResultActionsMenu();
var LazyResultAttachments_1 = __webpack_require__(762);
LazyResultAttachments_1.lazyResultAttachment();
var LazyResultFolding_1 = __webpack_require__(763);
LazyResultFolding_1.lazyResultFolding();
var LazyResultLayoutSelector_1 = __webpack_require__(764);
LazyResultLayoutSelector_1.lazyResultLayoutSelector();
var LazyResultLink_1 = __webpack_require__(765);
LazyResultLink_1.lazyResultLink();
var ResultLinkFields_1 = __webpack_require__(466);
ResultLinkFields_1.registerFields();
var LazyResultList_1 = __webpack_require__(766);
LazyResultList_1.lazyResultList();
var LazyResultRating_1 = __webpack_require__(767);
LazyResultRating_1.lazyResultRating();
var LazyStarRating_1 = __webpack_require__(768);
LazyStarRating_1.lazyStarRating();
var LazyResultsFiltersPreferences_1 = __webpack_require__(769);
LazyResultsFiltersPreferences_1.lazyResultsFiltersPreferences();
var LazyResultsPerPage_1 = __webpack_require__(770);
LazyResultsPerPage_1.lazyResultsPerPage();
var LazyResultsPreferences_1 = __webpack_require__(771);
LazyResultsPreferences_1.lazyResultsPreferences();
var LazyResultTagging_1 = __webpack_require__(772);
LazyResultTagging_1.lazyResultTagging();
var LazyFollowItem_1 = __webpack_require__(773);
LazyFollowItem_1.lazyFollowItem();
var FollowItemFields_1 = __webpack_require__(467);
FollowItemFields_1.registerFields();
var LazySearchAlerts_1 = __webpack_require__(774);
LazySearchAlerts_1.lazySearchAlerts();
var LazySearchbox_1 = __webpack_require__(775);
LazySearchbox_1.lazySearchbox();
var LazySearchButton_1 = __webpack_require__(776);
LazySearchButton_1.lazySearchButton();
var LazySettings_1 = __webpack_require__(777);
LazySettings_1.lazySettings();
var LazyShareQuery_1 = __webpack_require__(778);
LazyShareQuery_1.lazyShareQuery();
var LazySort_1 = __webpack_require__(779);
LazySort_1.lazySort();
var LazyTab_1 = __webpack_require__(780);
LazyTab_1.lazyTab();
var LazyTemplateLoader_1 = __webpack_require__(781);
LazyTemplateLoader_1.lazyTemplateLoader();
var LazyText_1 = __webpack_require__(782);
LazyText_1.lazyText();
var LazyThumbnail_1 = __webpack_require__(783);
LazyThumbnail_1.lazyThumbnail();
var ThumbnailFields_1 = __webpack_require__(468);
ThumbnailFields_1.registerFields();
var LazyTriggers_1 = __webpack_require__(784);
LazyTriggers_1.lazyTriggers();
var LazyYouTubeThumbnail_1 = __webpack_require__(785);
LazyYouTubeThumbnail_1.lazyYouTubeThumbnail();
var YouTubeThumbnailFields_1 = __webpack_require__(214);
YouTubeThumbnailFields_1.registerFields();
var LazyCheckbox_1 = __webpack_require__(786);
LazyCheckbox_1.lazyCheckbox();
var LazyDatePicker_1 = __webpack_require__(787);
LazyDatePicker_1.lazyDatePicker();
var LazyDropdown_1 = __webpack_require__(788);
LazyDropdown_1.lazyDropdown();
var LazyFormGroup_1 = __webpack_require__(789);
LazyFormGroup_1.lazyFormGroup();
var LazyMultiSelect_1 = __webpack_require__(790);
LazyMultiSelect_1.lazyMultiSelect();
var LazyNumericSpinner_1 = __webpack_require__(791);
LazyNumericSpinner_1.lazyNumericSpinner();
var LazyRadioButton_1 = __webpack_require__(792);
LazyRadioButton_1.lazyRadioButton();
var LazyTextInput_1 = __webpack_require__(793);
LazyTextInput_1.lazyTextInput();
var LazySimpleFilter_1 = __webpack_require__(794);
LazySimpleFilter_1.lazySimpleFilter();
var LazyTimespanFacet_1 = __webpack_require__(795);
LazyTimespanFacet_1.lazyTimespanFacet();
var LazyPromotedResultsBadge_1 = __webpack_require__(796);
LazyPromotedResultsBadge_1.lazyPromotedResultsBadge();
var LazyDynamicHierarchicalFacet_1 = __webpack_require__(797);
LazyDynamicHierarchicalFacet_1.lazyDynamicHierarchicalFacet();
var LazyDynamicFacet_1 = __webpack_require__(798);
LazyDynamicFacet_1.lazyDynamicFacet();
var LazyDynamicFacetRange_1 = __webpack_require__(799);
LazyDynamicFacetRange_1.lazyDynamicFacetRange();
var LazyDynamicFacetManager_1 = __webpack_require__(800);
LazyDynamicFacetManager_1.lazyDynamicFacetManager();
var LazyMissingTerms_1 = __webpack_require__(801);
LazyMissingTerms_1.lazyMissingTerms();
var SwapVar_1 = __webpack_require__(469);
SwapVar_1.swapVar(this);
var LazyImageFieldValue_1 = __webpack_require__(802);
LazyImageFieldValue_1.lazyImageFieldValue();
var LazyQuerySuggestPreview_1 = __webpack_require__(803);
LazyQuerySuggestPreview_1.lazyQuerySuggestPreview();
var LazyCommerceQuery_1 = __webpack_require__(804);
LazyCommerceQuery_1.lazyCommerceQuery();
var LazySortDropdown_1 = __webpack_require__(805);
LazySortDropdown_1.lazySortDropdown();
var LazySmartSnippet_1 = __webpack_require__(806);
LazySmartSnippet_1.lazySmartSnippet();
var LazySmartSnippetSuggestions_1 = __webpack_require__(807);
LazySmartSnippetSuggestions_1.lazySmartSnippetSuggestions();
var LazyFacetsMobileMode_1 = __webpack_require__(808);
LazyFacetsMobileMode_1.lazyFacetsMobileMode();


/***/ }),
/* 716 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(3);
var Initialization_1 = __webpack_require__(2);
function lazyAdvancedSearch() {
    Initialization_1.LazyInitialization.registerLazyComponent('AdvancedSearch', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(14).then((function () {
                var loaded = __webpack_require__(237)['AdvancedSearch'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('AdvancedSearch', resolve));
        });
    });
}
exports.lazyAdvancedSearch = lazyAdvancedSearch;


/***/ }),
/* 717 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(3);
var Initialization_1 = __webpack_require__(2);
function lazyAggregate() {
    Initialization_1.LazyInitialization.registerLazyComponent('Aggregate', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(87).then((function () {
                var loaded = __webpack_require__(238)['Aggregate'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Aggregate', resolve));
        });
    });
}
exports.lazyAggregate = lazyAggregate;


/***/ }),
/* 718 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var GlobalExports_1 = __webpack_require__(3);
var Initialization_1 = __webpack_require__(2);
function lazyAnalyticsSuggestions() {
    Initialization_1.LazyInitialization.registerLazyComponent('AnalyticsSuggestions', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(54).then((function () {
                var loaded = __webpack_require__(239)['AnalyticsSuggestions'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('AnalyticsSuggestions', resolve));
        });
    });
}
exports.lazyAnalyticsSuggestions = lazyAnalyticsSuggestions;


/***/ }),
/* 719 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyAuthenticationProvider() {
    Initialization_1.LazyInitialization.registerLazyComponent('AuthenticationProvider', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(77).then((function () {
                var loaded = __webpack_require__(240)['AuthenticationProvider'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('AuthenticationProvider', resolve));
        });
    });
}
exports.lazyAuthenticationProvider = lazyAuthenticationProvider;


/***/ }),
/* 720 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyBackdrop() {
    Initialization_1.LazyInitialization.registerLazyComponent('Backdrop', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(23).then((function () {
                var loaded = __webpack_require__(241)['Backdrop'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Backdrop', resolve));
        });
    });
}
exports.lazyBackdrop = lazyBackdrop;


/***/ }),
/* 721 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyBadge() {
    Initialization_1.LazyInitialization.registerLazyComponent('Badge', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(34).then((function () {
                var loaded = __webpack_require__(242)['Badge'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Badge', resolve));
        });
    });
}
exports.lazyBadge = lazyBadge;


/***/ }),
/* 722 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyBreadcrumb() {
    Initialization_1.LazyInitialization.registerLazyComponent('Breadcrumb', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(76).then((function () {
                var loaded = __webpack_require__(243)['Breadcrumb'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Breadcrumb', resolve));
        });
    });
}
exports.lazyBreadcrumb = lazyBreadcrumb;


/***/ }),
/* 723 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyCardActionBar() {
    Initialization_1.LazyInitialization.registerLazyComponent('CardActionBar', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(75).then((function () {
                var loaded = __webpack_require__(244)['CardActionBar'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('CardActionBar', resolve));
        });
    });
}
exports.lazyCardActionBar = lazyCardActionBar;


/***/ }),
/* 724 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyCardOverlay() {
    Initialization_1.LazyInitialization.registerLazyComponent('CardOverlay', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(49).then((function () {
                var loaded = __webpack_require__(245)['CardOverlay'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('CardOverlay', resolve));
        });
    });
}
exports.lazyCardOverlay = lazyCardOverlay;


/***/ }),
/* 725 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyChatterLikedBy() {
    Initialization_1.LazyInitialization.registerLazyComponent('ChatterLikedBy', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(53).then((function () {
                var loaded = __webpack_require__(246)['ChatterLikedBy'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ChatterLikedBy', resolve));
        });
    });
}
exports.lazyChatterLikedBy = lazyChatterLikedBy;


/***/ }),
/* 726 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyChatterPostAttachment() {
    Initialization_1.LazyInitialization.registerLazyComponent('ChatterPostAttachment', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(52).then((function () {
                var loaded = __webpack_require__(247)['ChatterPostAttachment'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ChatterPostAttachment', resolve));
        });
    });
}
exports.lazyChatterPostAttachment = lazyChatterPostAttachment;


/***/ }),
/* 727 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyChatterPostedBy() {
    Initialization_1.LazyInitialization.registerLazyComponent('ChatterPostedBy', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(51).then((function () {
                var loaded = __webpack_require__(248)['ChatterPostedBy'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ChatterPostedBy', resolve));
        });
    });
}
exports.lazyChatterPostedBy = lazyChatterPostedBy;


/***/ }),
/* 728 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyChatterTopic() {
    Initialization_1.LazyInitialization.registerLazyComponent('ChatterTopic', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(86).then((function () {
                var loaded = __webpack_require__(249)['ChatterTopic'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ChatterTopic', resolve));
        });
    });
}
exports.lazyChatterTopic = lazyChatterTopic;


/***/ }),
/* 729 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyDebug() {
    Initialization_1.LazyInitialization.registerLazyComponent('Debug', function () {
        return new Promise(function (resolve, reject) {
            new Promise(function(resolve) { resolve(); }).then((function () {
                var loaded = __webpack_require__(160)['Debug'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Debug', resolve));
        });
    });
}
exports.lazyDebug = lazyDebug;


/***/ }),
/* 730 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyDidYouMean() {
    Initialization_1.LazyInitialization.registerLazyComponent('DidYouMean', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(74).then((function () {
                var loaded = __webpack_require__(250)['DidYouMean'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('DidYouMean', resolve));
        });
    });
}
exports.lazyDidYouMean = lazyDidYouMean;


/***/ }),
/* 731 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyDistanceResources() {
    Initialization_1.LazyInitialization.registerLazyComponent('DistanceResources', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(33).then((function () {
                var loaded = __webpack_require__(251)['DistanceResources'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('DistanceResources', resolve));
        });
    });
}
exports.lazyDistanceResources = lazyDistanceResources;


/***/ }),
/* 732 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyErrorReport() {
    Initialization_1.LazyInitialization.registerLazyComponent('ErrorReport', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(73).then((function () {
                var loaded = __webpack_require__(252)['ErrorReport'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ErrorReport', resolve));
        });
    });
}
exports.lazyErrorReport = lazyErrorReport;


/***/ }),
/* 733 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyExcerpt() {
    Initialization_1.LazyInitialization.registerLazyComponent('Excerpt', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(72).then((function () {
                var loaded = __webpack_require__(253)['Excerpt'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Excerpt', resolve));
        });
    });
}
exports.lazyExcerpt = lazyExcerpt;


/***/ }),
/* 734 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyExportToExcel() {
    Initialization_1.LazyInitialization.registerLazyComponent('ExportToExcel', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(71).then((function () {
                var loaded = __webpack_require__(254)['ExportToExcel'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ExportToExcel', resolve));
        });
    });
}
exports.lazyExportToExcel = lazyExportToExcel;


/***/ }),
/* 735 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFacet() {
    Initialization_1.LazyInitialization.registerLazyComponent('Facet', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(1/* duplicate */).then((function () {
                var loaded = __webpack_require__(70)['Facet'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Facet', resolve));
        });
    });
}
exports.lazyFacet = lazyFacet;


/***/ }),
/* 736 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFacetRange() {
    Initialization_1.LazyInitialization.registerLazyComponent('FacetRange', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(7).then((function () {
                var loaded = __webpack_require__(190)['FacetRange'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FacetRange', resolve));
        });
    });
}
exports.lazyFacetRange = lazyFacetRange;


/***/ }),
/* 737 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFacetSlider() {
    Initialization_1.LazyInitialization.registerLazyComponent('FacetSlider', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(13).then((function () {
                var loaded = __webpack_require__(199)['FacetSlider'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FacetSlider', resolve));
        });
    });
}
exports.lazyFacetSlider = lazyFacetSlider;


/***/ }),
/* 738 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFieldSuggestions() {
    Initialization_1.LazyInitialization.registerLazyComponent('FieldSuggestions', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(47).then((function () {
                var loaded = __webpack_require__(255)['FieldSuggestions'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FieldSuggestions', resolve));
        });
    });
}
exports.lazyFieldSuggestions = lazyFieldSuggestions;


/***/ }),
/* 739 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFacetValueSuggestions() {
    Initialization_1.LazyInitialization.registerLazyComponent('FacetValueSuggestions', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(48).then((function () {
                var loaded = __webpack_require__(256)['FacetValueSuggestions'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FacetValueSuggestions', resolve));
        });
    });
}
exports.lazyFacetValueSuggestions = lazyFacetValueSuggestions;


/***/ }),
/* 740 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFieldTable() {
    Initialization_1.LazyInitialization.registerLazyComponent('FieldTable', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(31).then((function () {
                var loaded = __webpack_require__(257)['FieldTable'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FieldTable', resolve));
        });
    });
}
exports.lazyFieldTable = lazyFieldTable;


/***/ }),
/* 741 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFieldValue() {
    Initialization_1.LazyInitialization.registerLazyComponent('FieldValue', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(40).then((function () {
                var loaded = __webpack_require__(125)['FieldValue'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FieldValue', resolve));
        });
    });
}
exports.lazyFieldValue = lazyFieldValue;


/***/ }),
/* 742 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFolding() {
    Initialization_1.LazyInitialization.registerLazyComponent('Folding', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(50).then((function () {
                var loaded = __webpack_require__(191)['Folding'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Folding', resolve));
        });
    });
}
exports.lazyFolding = lazyFolding;


/***/ }),
/* 743 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFoldingForThread() {
    Initialization_1.LazyInitialization.registerLazyComponent('FoldingForThread', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(39).then((function () {
                var loaded = __webpack_require__(258)['FoldingForThread'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FoldingForThread', resolve));
        });
    });
}
exports.lazyFoldingForThread = lazyFoldingForThread;


/***/ }),
/* 744 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyHiddenQuery() {
    Initialization_1.LazyInitialization.registerLazyComponent('HiddenQuery', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(70).then((function () {
                var loaded = __webpack_require__(259)['HiddenQuery'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('HiddenQuery', resolve));
        });
    });
}
exports.lazyHiddenQuery = lazyHiddenQuery;


/***/ }),
/* 745 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyCategoryFacet() {
    Initialization_1.LazyInitialization.registerLazyComponent('CategoryFacet', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(1/* duplicate */).then((function () {
                var loaded = __webpack_require__(95)['CategoryFacet'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('CategoryFacet', resolve));
        });
    });
}
exports.lazyCategoryFacet = lazyCategoryFacet;


/***/ }),
/* 746 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyHierarchicalFacet() {
    Initialization_1.LazyInitialization.registerLazyComponent('HierarchicalFacet', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(5).then((function () {
                var loaded = __webpack_require__(260)['HierarchicalFacet'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('HierarchicalFacet', resolve));
        });
    });
}
exports.lazyHierarchicalFacet = lazyHierarchicalFacet;


/***/ }),
/* 747 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyIcon() {
    Initialization_1.LazyInitialization.registerLazyComponent('Icon', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(82).then((function () {
                var loaded = __webpack_require__(192)['Icon'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Icon', resolve));
        });
    });
}
exports.lazyIcon = lazyIcon;


/***/ }),
/* 748 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyLogo() {
    Initialization_1.LazyInitialization.registerLazyComponent('Logo', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(81).then((function () {
                var loaded = __webpack_require__(261)['Logo'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Logo', resolve));
        });
    });
}
exports.lazyLogo = lazyLogo;


/***/ }),
/* 749 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyMatrix() {
    Initialization_1.LazyInitialization.registerLazyComponent('Matrix', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(38).then((function () {
                var loaded = __webpack_require__(262)['Matrix'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Matrix', resolve));
        });
    });
}
exports.lazyMatrix = lazyMatrix;


/***/ }),
/* 750 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyOmnibox() {
    Initialization_1.LazyInitialization.registerLazyComponent('Omnibox', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(10).then((function () {
                var loaded = __webpack_require__(193)['Omnibox'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Omnibox', resolve));
        });
    });
}
exports.lazyOmnibox = lazyOmnibox;


/***/ }),
/* 751 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyOmniboxResultList() {
    Initialization_1.LazyInitialization.registerLazyComponent('OmniboxResultList', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(17).then((function () {
                var loaded = __webpack_require__(263)['OmniboxResultList'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('OmniboxResultList', resolve));
        });
    });
}
exports.lazyOmniboxResultList = lazyOmniboxResultList;


/***/ }),
/* 752 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyPager() {
    Initialization_1.LazyInitialization.registerLazyComponent('Pager', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(16).then((function () {
                var loaded = __webpack_require__(264)['Pager'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Pager', resolve));
        });
    });
}
exports.lazyPager = lazyPager;


/***/ }),
/* 753 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyPipelineContext() {
    Initialization_1.LazyInitialization.registerLazyComponent('PipelineContext', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(80).then((function () {
                var loaded = __webpack_require__(265)['PipelineContext'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('PipelineContext', resolve));
        });
    });
}
exports.lazyPipelineContext = lazyPipelineContext;


/***/ }),
/* 754 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyPreferencesPanel() {
    Initialization_1.LazyInitialization.registerLazyComponent('PreferencesPanel', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(37).then((function () {
                var loaded = __webpack_require__(266)['PreferencesPanel'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('lazyPreferencesPanel', resolve));
        });
    });
}
exports.lazyPreferencesPanel = lazyPreferencesPanel;


/***/ }),
/* 755 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyPrintableUri() {
    Initialization_1.LazyInitialization.registerLazyComponent('PrintableUri', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(30).then((function () {
                var loaded = __webpack_require__(267)['PrintableUri'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('PrintableUri', resolve));
        });
    });
}
exports.lazyPrintableUri = lazyPrintableUri;


/***/ }),
/* 756 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyQuerybox() {
    Initialization_1.LazyInitialization.registerLazyComponent('Querybox', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(11).then((function () {
                var loaded = __webpack_require__(139)['Querybox'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Querybox', resolve));
        });
    });
}
exports.lazyQuerybox = lazyQuerybox;


/***/ }),
/* 757 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyQueryDuration() {
    Initialization_1.LazyInitialization.registerLazyComponent('QueryDuration', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(67).then((function () {
                var loaded = __webpack_require__(268)['QueryDuration'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('QueryDuration', resolve));
        });
    });
}
exports.lazyQueryDuration = lazyQueryDuration;


/***/ }),
/* 758 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyQuerySummary() {
    Initialization_1.LazyInitialization.registerLazyComponent('QuerySummary', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(46).then((function () {
                var loaded = __webpack_require__(269)['QuerySummary'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('QuerySummary', resolve));
        });
    });
}
exports.lazyQuerySummary = lazyQuerySummary;


/***/ }),
/* 759 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyQuickview() {
    Initialization_1.LazyInitialization.registerLazyComponent('Quickview', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(20).then((function () {
                var loaded = __webpack_require__(270)['Quickview'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Quickview', resolve));
        });
    });
}
exports.lazyQuickview = lazyQuickview;


/***/ }),
/* 760 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyRecommendation() {
    Initialization_1.LazyInitialization.registerLazyComponent('Recommendation', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(22).then((function () {
                var loaded = __webpack_require__(200)['Recommendation'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Recommendation', resolve));
        });
    });
}
exports.lazyRecommendation = lazyRecommendation;


/***/ }),
/* 761 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultActionsMenu() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultActionsMenu', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(66).then((function () {
                var loaded = __webpack_require__(271)['ResultActionsMenu'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultActionsMenu', resolve));
        });
    });
}
exports.lazyResultActionsMenu = lazyResultActionsMenu;


/***/ }),
/* 762 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultAttachment() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultAttachments', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(45).then((function () {
                var loaded = __webpack_require__(272)['ResultAttachments'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultAttachments', resolve));
        });
    });
}
exports.lazyResultAttachment = lazyResultAttachment;


/***/ }),
/* 763 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultFolding() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultFolding', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(44).then((function () {
                var loaded = __webpack_require__(273)['ResultFolding'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultFolding', resolve));
        });
    });
}
exports.lazyResultFolding = lazyResultFolding;


/***/ }),
/* 764 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultLayoutSelector() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultLayoutSelector', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(43).then((function () {
                var loaded = __webpack_require__(201)['ResultLayoutSelector'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultLayoutSelector', resolve));
        });
    }, ['ResultLayout']);
}
exports.lazyResultLayoutSelector = lazyResultLayoutSelector;


/***/ }),
/* 765 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultLink() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultLink', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(42).then((function () {
                var loaded = __webpack_require__(71)['ResultLink'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultLink', resolve));
        });
    });
}
exports.lazyResultLink = lazyResultLink;


/***/ }),
/* 766 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultList() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultList', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(19).then((function () {
                var loaded = __webpack_require__(93)['ResultList'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultList', resolve));
        });
    });
}
exports.lazyResultList = lazyResultList;


/***/ }),
/* 767 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultRating() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultRating', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(65).then((function () {
                var loaded = __webpack_require__(274)['ResultRating'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultRating', resolve));
        });
    });
}
exports.lazyResultRating = lazyResultRating;


/***/ }),
/* 768 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyStarRating() {
    Initialization_1.LazyInitialization.registerLazyComponent('StarRating', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(61).then((function () {
                var loaded = __webpack_require__(275)['StarRating'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('StarRating', resolve));
        });
    });
}
exports.lazyStarRating = lazyStarRating;


/***/ }),
/* 769 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultsFiltersPreferences() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultsFiltersPreferences', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(26).then((function () {
                var loaded = __webpack_require__(276)['ResultsFiltersPreferences'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultsFiltersPreferences', resolve));
        });
    });
}
exports.lazyResultsFiltersPreferences = lazyResultsFiltersPreferences;


/***/ }),
/* 770 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultsPerPage() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultsPerPage', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(15).then((function () {
                var loaded = __webpack_require__(277)['ResultsPerPage'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultsPerPage', resolve));
        });
    });
}
exports.lazyResultsPerPage = lazyResultsPerPage;


/***/ }),
/* 771 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultsPreferences() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultsPreferences', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(25).then((function () {
                var loaded = __webpack_require__(278)['ResultsPreferences'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultsPreferences', resolve));
        });
    });
}
exports.lazyResultsPreferences = lazyResultsPreferences;


/***/ }),
/* 772 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyResultTagging() {
    Initialization_1.LazyInitialization.registerLazyComponent('ResultTagging', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(64).then((function () {
                var loaded = __webpack_require__(279)['ResultTagging'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ResultTagging', resolve));
        });
    });
}
exports.lazyResultTagging = lazyResultTagging;


/***/ }),
/* 773 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFollowItem() {
    Initialization_1.LazyInitialization.registerLazyComponent('FollowItem', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(55).then((function () {
                var loaded = __webpack_require__(280)['FollowItem'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FollowItem', resolve));
        });
    });
}
exports.lazyFollowItem = lazyFollowItem;


/***/ }),
/* 774 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazySearchAlerts() {
    Initialization_1.LazyInitialization.registerLazyComponent('SearchAlerts', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(35).then((function () {
                var loaded = __webpack_require__(281)['SearchAlerts'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('SearchAlerts', resolve));
        });
    });
}
exports.lazySearchAlerts = lazySearchAlerts;


/***/ }),
/* 775 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazySearchbox() {
    Initialization_1.LazyInitialization.registerLazyComponent('Searchbox', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(9).then((function () {
                var loaded = __webpack_require__(282)['Searchbox'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Searchbox', resolve));
        });
    });
}
exports.lazySearchbox = lazySearchbox;


/***/ }),
/* 776 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazySearchButton() {
    Initialization_1.LazyInitialization.registerLazyComponent('SearchButton', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(79).then((function () {
                var loaded = __webpack_require__(195)['SearchButton'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('SearchButton', resolve));
        });
    });
}
exports.lazySearchButton = lazySearchButton;


/***/ }),
/* 777 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazySettings() {
    Initialization_1.LazyInitialization.registerLazyComponent('Settings', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(63).then((function () {
                var loaded = __webpack_require__(283)['Settings'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Settings', resolve));
        });
    });
}
exports.lazySettings = lazySettings;


/***/ }),
/* 778 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyShareQuery() {
    Initialization_1.LazyInitialization.registerLazyComponent('ShareQuery', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(62).then((function () {
                var loaded = __webpack_require__(284)['ShareQuery'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ShareQuery', resolve));
        });
    });
}
exports.lazyShareQuery = lazyShareQuery;


/***/ }),
/* 779 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazySort() {
    Initialization_1.LazyInitialization.registerLazyComponent('Sort', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(41).then((function () {
                var loaded = __webpack_require__(196)['Sort'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Sort', resolve));
        });
    });
}
exports.lazySort = lazySort;


/***/ }),
/* 780 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyTab() {
    Initialization_1.LazyInitialization.registerLazyComponent('Tab', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(29).then((function () {
                var loaded = __webpack_require__(202)['Tab'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Tab', resolve));
        });
    });
}
exports.lazyTab = lazyTab;


/***/ }),
/* 781 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyTemplateLoader() {
    Initialization_1.LazyInitialization.registerLazyComponent('TemplateLoader', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(78).then((function () {
                var loaded = __webpack_require__(285)['TemplateLoader'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('TemplateLoader', resolve));
        });
    });
}
exports.lazyTemplateLoader = lazyTemplateLoader;


/***/ }),
/* 782 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyText() {
    Initialization_1.LazyInitialization.registerLazyComponent('Text', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(60).then((function () {
                var loaded = __webpack_require__(286)['Text'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Text', resolve));
        });
    });
}
exports.lazyText = lazyText;


/***/ }),
/* 783 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyThumbnail() {
    Initialization_1.LazyInitialization.registerLazyComponent('Thumbnail', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(28).then((function () {
                var loaded = __webpack_require__(287)['Thumbnail'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Thumbnail', resolve));
        });
    });
}
exports.lazyThumbnail = lazyThumbnail;


/***/ }),
/* 784 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyTriggers() {
    Initialization_1.LazyInitialization.registerLazyComponent('Triggers', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(59).then((function () {
                var loaded = __webpack_require__(288)['Triggers'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Triggers', resolve));
        });
    });
}
exports.lazyTriggers = lazyTriggers;


/***/ }),
/* 785 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var YouTubeThumbnailFields_1 = __webpack_require__(214);
var GlobalExports_1 = __webpack_require__(3);
function lazyYouTubeThumbnail() {
    YouTubeThumbnailFields_1.registerFields();
    Initialization_1.LazyInitialization.registerLazyComponent('YouTubeThumbnail', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(27).then((function () {
                var loaded = __webpack_require__(189)['YouTubeThumbnail'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('YouTubeThumbnail', resolve));
        });
    });
}
exports.lazyYouTubeThumbnail = lazyYouTubeThumbnail;


/***/ }),
/* 786 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyCheckbox() {
    Initialization_1.LazyInitialization.registerLazyModule('Checkbox', function () {
        return new Promise(function (resolve, reject) {
            new Promise(function(resolve) { resolve(); }).then((function () {
                var loaded = __webpack_require__(66)['Checkbox'];
                GlobalExports_1.lazyExportModule(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Checkbox', resolve));
        });
    });
}
exports.lazyCheckbox = lazyCheckbox;


/***/ }),
/* 787 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyDatePicker() {
    Initialization_1.LazyInitialization.registerLazyModule('Datepicker', function () {
        return new Promise(function (resolve, reject) {
            new Promise(function(resolve) { resolve(); }).then((function () {
                var loaded = __webpack_require__(90)['DatePicker'];
                GlobalExports_1.lazyExportModule(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('DatePicker', resolve));
        });
    });
}
exports.lazyDatePicker = lazyDatePicker;


/***/ }),
/* 788 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyDropdown() {
    Initialization_1.LazyInitialization.registerLazyModule('Dropdown', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(84).then((function () {
                var loaded = __webpack_require__(64)['Dropdown'];
                GlobalExports_1.lazyExportModule(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('Dropdown', resolve));
        });
    });
}
exports.lazyDropdown = lazyDropdown;


/***/ }),
/* 789 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFormGroup() {
    Initialization_1.LazyInitialization.registerLazyModule('FormGroup', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(58).then((function () {
                var loaded = __webpack_require__(141)['FormGroup'];
                GlobalExports_1.lazyExportModule(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FormGroup', resolve));
        });
    });
}
exports.lazyFormGroup = lazyFormGroup;


/***/ }),
/* 790 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyMultiSelect() {
    Initialization_1.LazyInitialization.registerLazyModule('MultiSelect', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(57).then((function () {
                var loaded = __webpack_require__(194)['MultiSelect'];
                GlobalExports_1.lazyExportModule(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('MultiSelect', resolve));
        });
    });
}
exports.lazyMultiSelect = lazyMultiSelect;


/***/ }),
/* 791 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyNumericSpinner() {
    Initialization_1.LazyInitialization.registerLazyModule('NumericSpinner', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(83).then((function () {
                var loaded = __webpack_require__(127)['NumericSpinner'];
                GlobalExports_1.lazyExportModule(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('NumericSpinner', resolve));
        });
    });
}
exports.lazyNumericSpinner = lazyNumericSpinner;


/***/ }),
/* 792 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyRadioButton() {
    Initialization_1.LazyInitialization.registerLazyModule('RadioButton', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(56).then((function () {
                var loaded = __webpack_require__(99)['RadioButton'];
                GlobalExports_1.lazyExportModule(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('RadioButton', resolve));
        });
    });
}
exports.lazyRadioButton = lazyRadioButton;


/***/ }),
/* 793 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyTextInput() {
    Initialization_1.LazyInitialization.registerLazyModule('TextInput', function () {
        return new Promise(function (resolve, reject) {
            new Promise(function(resolve) { resolve(); }).then((function () {
                var loaded = __webpack_require__(57)['TextInput'];
                GlobalExports_1.lazyExportModule(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('TextInput', resolve));
        });
    });
}
exports.lazyTextInput = lazyTextInput;


/***/ }),
/* 794 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazySimpleFilter() {
    Initialization_1.LazyInitialization.registerLazyComponent('SimpleFilter', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(36).then((function () {
                var loaded = __webpack_require__(289)['SimpleFilter'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('SimpleFilter', resolve));
        });
    });
}
exports.lazySimpleFilter = lazySimpleFilter;


/***/ }),
/* 795 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyTimespanFacet() {
    Initialization_1.LazyInitialization.registerLazyComponent('TimespanFacet', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(6).then((function () {
                var loaded = __webpack_require__(290)['TimespanFacet'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('TimespanFacet', resolve));
        });
    });
}
exports.lazyTimespanFacet = lazyTimespanFacet;


/***/ }),
/* 796 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyPromotedResultsBadge() {
    Initialization_1.LazyInitialization.registerLazyComponent('PromotedResultsBadge', function () {
        return new Promise(function (resolve) {
            __webpack_require__.e/* require.ensure */(68).then((function () {
                var loaded = __webpack_require__(291)['PromotedResultsBadge'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('PromotedResultsBadge', resolve));
        });
    });
}
exports.lazyPromotedResultsBadge = lazyPromotedResultsBadge;


/***/ }),
/* 797 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyDynamicHierarchicalFacet() {
    Initialization_1.LazyInitialization.registerLazyComponent('DynamicHierarchicalFacet', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(4).then((function () {
                var loaded = __webpack_require__(292)['DynamicHierarchicalFacet'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('DynamicHierarchicalFacet', resolve));
        });
    });
}
exports.lazyDynamicHierarchicalFacet = lazyDynamicHierarchicalFacet;


/***/ }),
/* 798 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyDynamicFacet() {
    Initialization_1.LazyInitialization.registerLazyComponent('DynamicFacet', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(2).then((function () {
                var loaded = __webpack_require__(142)['DynamicFacet'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('DynamicFacet', resolve));
        });
    });
}
exports.lazyDynamicFacet = lazyDynamicFacet;


/***/ }),
/* 799 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyDynamicFacetRange() {
    Initialization_1.LazyInitialization.registerLazyComponent('DynamicFacetRange', function () {
        return new Promise(function (resolve) {
            __webpack_require__.e/* require.ensure */(8).then((function () {
                var loaded = __webpack_require__(293)['DynamicFacetRange'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('DynamicFacetRange', resolve));
        });
    });
}
exports.lazyDynamicFacetRange = lazyDynamicFacetRange;


/***/ }),
/* 800 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyDynamicFacetManager() {
    Initialization_1.LazyInitialization.registerLazyComponent('DynamicFacetManager', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(2).then((function () {
                var loaded = __webpack_require__(294)['DynamicFacetManager'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('DynamicFacetManager', resolve));
        });
    });
}
exports.lazyDynamicFacetManager = lazyDynamicFacetManager;


/***/ }),
/* 801 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyMissingTerms() {
    Initialization_1.LazyInitialization.registerLazyComponent('MissingTerms', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(69).then((function () {
                var loaded = __webpack_require__(295)['MissingTerms'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('MissingTerms', resolve));
        });
    });
}
exports.lazyMissingTerms = lazyMissingTerms;


/***/ }),
/* 802 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyImageFieldValue() {
    Initialization_1.LazyInitialization.registerLazyComponent('ImageFieldValue', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(32).then((function () {
                var loaded = __webpack_require__(197)['ImageFieldValue'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('ImageFieldValue', resolve));
        });
    });
}
exports.lazyImageFieldValue = lazyImageFieldValue;


/***/ }),
/* 803 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyQuerySuggestPreview() {
    Initialization_1.LazyInitialization.registerLazyComponent('QuerySuggestPreview', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(12).then((function () {
                var loaded = __webpack_require__(296)['QuerySuggestPreview'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('QuerySuggestPreview', resolve));
        });
    });
}
exports.lazyQuerySuggestPreview = lazyQuerySuggestPreview;


/***/ }),
/* 804 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyCommerceQuery() {
    Initialization_1.LazyInitialization.registerLazyComponent('CommerceQuery', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(85).then((function () {
                var loaded = __webpack_require__(297)['CommerceQuery'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('CommerceQuery', resolve));
        });
    });
}
exports.lazyCommerceQuery = lazyCommerceQuery;


/***/ }),
/* 805 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazySortDropdown() {
    Initialization_1.LazyInitialization.registerLazyComponent('SortDropdown', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(24).then((function () {
                var loaded = __webpack_require__(298)['SortDropdown'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('SortDropdown', resolve));
        });
    });
}
exports.lazySortDropdown = lazySortDropdown;


/***/ }),
/* 806 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazySmartSnippet() {
    Initialization_1.LazyInitialization.registerLazyComponent('SmartSnippet', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(18).then((function () {
                var loaded = __webpack_require__(299)['SmartSnippet'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('SmartSnippet', resolve));
        });
    });
}
exports.lazySmartSnippet = lazySmartSnippet;


/***/ }),
/* 807 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazySmartSnippetSuggestions() {
    Initialization_1.LazyInitialization.registerLazyComponent('SmartSnippetSuggestions', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(21).then((function () {
                var loaded = __webpack_require__(300)['SmartSnippetSuggestions'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('SmartSnippetSuggestions', resolve));
        });
    });
}
exports.lazySmartSnippetSuggestions = lazySmartSnippetSuggestions;


/***/ }),
/* 808 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Initialization_1 = __webpack_require__(2);
var GlobalExports_1 = __webpack_require__(3);
function lazyFacetsMobileMode() {
    Initialization_1.LazyInitialization.registerLazyComponent('FacetsMobileMode', function () {
        return new Promise(function (resolve, reject) {
            __webpack_require__.e/* require.ensure */(3).then((function () {
                var loaded = __webpack_require__(86)['FacetsMobileMode'];
                GlobalExports_1.lazyExport(loaded, resolve);
            }).bind(null, __webpack_require__)).catch(Initialization_1.LazyInitialization.buildErrorCallback('FacetsMobileMode', resolve));
        });
    });
}
exports.lazyFacetsMobileMode = lazyFacetsMobileMode;


/***/ })
/******/ ]);
});
//# sourceMappingURL=CoveoJsSearch.Lazy.js.map