coveo-search-ui
Version:
Coveo JavaScript Search Framework
1,014 lines (1,009 loc) • 8.99 MB
JavaScript
var coveotest =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // 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;
/******/ }
/******/
/******/
/******/ // 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 = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 869);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var underscore_1 = __webpack_require__(1);
var Assert_1 = __webpack_require__(12);
var Logger_1 = __webpack_require__(18);
var JQueryutils_1 = __webpack_require__(212);
var Utils_1 = __webpack_require__(5);
var DeviceUtils_1 = __webpack_require__(42);
/**
* 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.$$ = $$;
/***/ }),
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__index_default_js__ = __webpack_require__(873);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__index_default_js__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__index_js__ = __webpack_require__(279);
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "VERSION", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["VERSION"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "restArguments", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["restArguments"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isObject"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isNull", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isNull"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isUndefined"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isBoolean"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isElement", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isElement"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isString", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isString"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isNumber", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isNumber"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isDate"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isRegExp"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isError", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isError"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isSymbol", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isSymbol"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isArrayBuffer", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isArrayBuffer"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isDataView", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isDataView"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isArray"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isFunction"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isArguments", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isArguments"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isFinite", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isFinite"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isNaN", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isNaN"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isTypedArray", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isTypedArray"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isEmpty"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isMatch", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isMatch"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isEqual"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isMap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isMap"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isWeakMap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isWeakMap"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isSet", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isSet"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "isWeakSet", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["isWeakSet"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["keys"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "allKeys", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["allKeys"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["values"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["pairs"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "invert", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["invert"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "functions", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["functions"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "methods", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["methods"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["extend"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "extendOwn", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["extendOwn"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "assign", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["assign"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "defaults", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["defaults"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "create", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["create"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["clone"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["tap"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "get", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["get"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "has", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["has"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "mapObject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["mapObject"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["identity"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "constant", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["constant"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["noop"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "toPath", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["toPath"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "property", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["property"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "propertyOf", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["propertyOf"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["matcher"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "matches", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["matches"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "times", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["times"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "random", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["random"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "now", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["now"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "escape", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["escape"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "unescape", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["unescape"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "templateSettings", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["templateSettings"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "template", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["template"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "result", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["result"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "uniqueId", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["uniqueId"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "chain", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["chain"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "iteratee", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["iteratee"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "partial", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["partial"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "bind", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["bind"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "bindAll", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["bindAll"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "memoize", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["memoize"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["delay"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["defer"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["throttle"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["debounce"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["wrap"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "negate", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["negate"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["compose"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "after", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["after"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "before", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["before"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "once", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["once"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "findKey", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findKey"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findIndex"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "findLastIndex", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findLastIndex"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "sortedIndex", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["sortedIndex"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "indexOf", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["indexOf"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "lastIndexOf", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["lastIndexOf"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "find", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["find"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "detect", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["detect"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "findWhere", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["findWhere"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "each", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["each"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["forEach"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["map"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "collect", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["collect"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["reduce"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "foldl", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["foldl"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "inject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["inject"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "reduceRight", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["reduceRight"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "foldr", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["foldr"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["filter"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "select", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["select"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "reject", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["reject"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "every", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["every"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "all", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["all"]; });
/* harmony namespace reexport (by provided) */ __webpack_require__.d(__webpack_exports__, "some", function() { return __WEBPACK_IMPORTED_MODULE_1__index_js__["some"]; });
/* ha